| Message ID | 20251210000737.180797-26-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325390; bh=7ubv+0h2HhJz2jRAZOu9jv/ypovV0ziKQDtwl/+0n4s=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RnQiaaMelYpflBvfWzafnlyZhceVJQtCZ+C6K+cJh2SJqcncXwjnPM/pK8DBk9uts 2MMqUmSx6ChTKfGPssNjXbAb0bx8rwEq97X1QtM67pwx76ZwOP/igJCPjSzJTm4SRU T19idgk0CsSoKHFYh7PtWrvDPf5ls5OuEY4FB42PyYmBs3FRey9FjGH5NVHVQG1d/m ZfD/McIZQtvE74dMgINf+X6bWDnLvR4/T5pl+7/V/yHejJsVB41ruwxqHW6jCKjiSx CBGwasZ12+dvB3FxxyorYTbnSFGQIaOQwn6z+mwe1Tw+jUnpaE4CGchSl9HiwGvuai 06N4/sil0TzZw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F31AD68A45 for <u-boot-concept@u-boot.org>; Tue, 9 Dec 2025 17:09:50 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id rVW6Wv-qQzL2 for <u-boot-concept@u-boot.org>; Tue, 9 Dec 2025 17:09:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325390; bh=7ubv+0h2HhJz2jRAZOu9jv/ypovV0ziKQDtwl/+0n4s=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RnQiaaMelYpflBvfWzafnlyZhceVJQtCZ+C6K+cJh2SJqcncXwjnPM/pK8DBk9uts 2MMqUmSx6ChTKfGPssNjXbAb0bx8rwEq97X1QtM67pwx76ZwOP/igJCPjSzJTm4SRU T19idgk0CsSoKHFYh7PtWrvDPf5ls5OuEY4FB42PyYmBs3FRey9FjGH5NVHVQG1d/m ZfD/McIZQtvE74dMgINf+X6bWDnLvR4/T5pl+7/V/yHejJsVB41ruwxqHW6jCKjiSx CBGwasZ12+dvB3FxxyorYTbnSFGQIaOQwn6z+mwe1Tw+jUnpaE4CGchSl9HiwGvuai 06N4/sil0TzZw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DF5246884F for <u-boot-concept@u-boot.org>; Tue, 9 Dec 2025 17:09:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325389; bh=/2tPwBkePD8cSHCtUSt4wu6SK9xnJ05cZU7FiVsuy/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OjiUmhCBT+1Lve0/5r1H21xsNtVSJ08QWMbqLqWf5C5o7drsD1HLYCxz7e5H5B7Wv aeU5DWR71GxBCA+4vyYputGhQaoGKkW38efNf3MjDESQa+9ExvtaKUFe7jjUR1EqOE RmyM4QyzGrF0/k5zZ1EO8LC/cHi3otmdSUS8edGaNdUjAhIVeLQm8vGcis8SvvwNhI Rw4C1BoVe7s8i5IAwEu4gd3Tbq8Y9RETKN18xBHpDjvhtKb7FyWC6calb7TumQ5TzQ FRLx6Th3ACU1zfMbO96LlSr6SSBML2elx6ATyUaEpJKCGJNYnM5XjOXSfWTWVjOcMO j8rv2IXK09gxA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C1BD4689EA; Tue, 9 Dec 2025 17:09:49 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id VVCterPAERoS; Tue, 9 Dec 2025 17:09:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325388; bh=D193XXLIqnQ2u56E63ob29cCaH9bXSp0m66uVdHJB8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YS6Ua6hEQSdunhHNM6iS/jzDK84o0FkGrTiAL47DB+9i3yj0eZV+GMrqxSZSc6BF6 eOnmVHB6cTA1d+NG76LxwJfzQWp107Hvrf5eplyXhc5npSeLvsvrTEpf7HxgaMtW5O NbFwTVXq2UFpuQeJ0zBpv7dJkDrmMhwdnsjx8ZnncX3nPQJmuP3NUkReOK+S8oigjl SrhWdgRF3PjNWAxDnYBH+e1VYyreB8PjV56ceD22tpBxDIkPPQ5GknN4iDwUK9/m0m uiby6xouByLlLd7+hOzBBzEP2fdcJux9DU9fG/FaJMDgufGROuGncQ2hrDon9qWlOU 1YELQCNu3b17w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 068126884F; Tue, 9 Dec 2025 17:09:47 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Tue, 9 Dec 2025 17:07:16 -0700 Message-ID: <20251210000737.180797-26-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251210000737.180797-1-sjg@u-boot.org> References: <20251210000737.180797-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: Q3OCO3ERXCHMW5YNOBGC5L243Y7K2JDW X-Message-ID-Hash: Q3OCO3ERXCHMW5YNOBGC5L243Y7K2JDW X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com>, Claude <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 25/35] sandbox: Enable mcheck heap protection List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/Q3OCO3ERXCHMW5YNOBGC5L243Y7K2JDW/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
malloc: Add heap debugging commands and mcheck caller tracking
|
|
Commit Message
Simon Glass
Dec. 10, 2025, 12:07 a.m. UTC
From: Simon Glass <simon.glass@canonical.com> Enable CONFIG_MCHECK_HEAP_PROTECTION for the sandbox board to detect heap corruption during development and testing. Increase the heap size from 96 MiB to 128 MiB to account for the additional overhead of mcheck metadata (~48 bytes per allocation). Increase the console-out buffer to 128K to allow space for the new malloc dump, when checked in tests. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- configs/sandbox_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 44185ccb7eb..b1b2e725b4c 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -1,5 +1,5 @@ CONFIG_TEXT_BASE=0 -CONFIG_SYS_MALLOC_LEN=0x6000000 +CONFIG_SYS_MALLOC_LEN=0x8000000 CONFIG_BLOBLIST_SIZE_RELOC=0x20000 CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x2000 @@ -12,6 +12,7 @@ CONFIG_DEBUG_UART=y CONFIG_SYS_MEMTEST_START=0x00100000 CONFIG_SYS_MEMTEST_END=0x00101000 CONFIG_ULIB=y +CONFIG_MCHECK_HEAP_PROTECTION=y CONFIG_EXAMPLES=y CONFIG_EFI_SECURE_BOOT=y CONFIG_EFI_RT_VOLATILE_STORE=y @@ -49,7 +50,7 @@ CONFIG_IMAGE_PRE_LOAD=y CONFIG_IMAGE_PRE_LOAD_SIG=y CONFIG_CEDIT=y CONFIG_CONSOLE_RECORD=y -CONFIG_CONSOLE_RECORD_OUT_SIZE=0x6000 +CONFIG_CONSOLE_RECORD_OUT_SIZE=0x20000 CONFIG_PRE_CONSOLE_BUFFER=y CONFIG_LOG=y CONFIG_LOG_MAX_LEVEL=9