mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lkdtm: update KASAN_SANITIZE rule for kstack_erase.o
@ 2026-12-04  1:57 Pengpeng Hou
  0 siblings, 0 replies; only message in thread
From: Pengpeng Hou @ 2026-12-04  1:57 UTC (permalink / raw)
  To: Kees Cook, Arnd Bergmann, Greg Kroah-Hartman; +Cc: linux-kernel, Pengpeng Hou

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-04  1:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-04  1:57 [PATCH] lkdtm: update KASAN_SANITIZE rule for kstack_erase.o Pengpeng Hou

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®