From: Pengpeng Hou <hppiscas@163.com>
To: Kees Cook <kees@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Pengpeng Hou <hppiscas@163.com>
Subject: [PATCH] lkdtm: update KASAN_SANITIZE rule for kstack_erase.o
Date: Fri, 4 Dec 2026 09:57:33 +0800 [thread overview]
Message-ID: <179634945360.74470.16012931286396272427@163.com> (raw)
Kbuild now compiles kstack_erase.o for the LKDTM stack erasure tests,
but the per-object KASAN exclusion still names stackleak.o. The
exclusion no longer applies to the object it was written for.
Update the object name; leave instrumentation of other LKDTM objects
alone.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 57fbad15c2ee ("stackleak: Rename STACKLEAK to KSTACK_ERASE")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
Built kstack_erase.o with Clang 18 and W=1 on x86-64 with generic KASAN
enabled. The original compile command contained
-fsanitize=kernel-address and the patched one did not. The LKDTM test
itself was not run.
drivers/misc/lkdtm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/lkdtm/Makefile b/drivers/misc/lkdtm/Makefile
index 4e58d16fc01e55b3facce6087f14d1d9f9627016..8e2b9075fdc5d9c7147088c7b199d83598a711ab 100644
--- a/drivers/misc/lkdtm/Makefile
+++ b/drivers/misc/lkdtm/Makefile
@@ -13,7 +13,7 @@ lkdtm-$(CONFIG_LKDTM) += cfi.o
lkdtm-$(CONFIG_LKDTM) += fortify.o
lkdtm-$(CONFIG_PPC_BOOK3S_64) += powerpc.o
-KASAN_SANITIZE_stackleak.o := n
+KASAN_SANITIZE_kstack_erase.o := n
CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) $(RETHUNK_CFLAGS) $(CC_FLAGS_CFI)
base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
reply other threads:[~2026-12-04 1:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179634945360.74470.16012931286396272427@163.com \
--to=hppiscas@163.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®