Commit Graph

3 Commits

Author SHA1 Message Date
Kees Cook
fc525d625a kstack_erase: Fix missed export of renamed KSTACK_ERASE_CFLAGS
Certain targets disable kstack_erase by filtering out KSTACK_ERASE_CFLAGS
rather than adding DISABLE_KSTACK_ERASE. The renaming to kstack_erase
missed the CFLAGS export, which broke those build targets (e.g. x86
vdso32).

Fixes: 76261fc7d1 ("stackleak: Split KSTACK_ERASE_CFLAGS from GCC_PLUGINS_CFLAGS")
Signed-off-by: Kees Cook <kees@kernel.org>
2025-07-29 17:17:46 -07:00
Kees Cook
a8f0b1f8ef kstack_erase: Support Clang stack depth tracking
Wire up CONFIG_KSTACK_ERASE to Clang 21's new stack depth tracking
callback[1] option.

Link: https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-stack-depth [1]
Acked-by: Nicolas Schier <n.schier@avm.de>
Link: https://lore.kernel.org/r/20250724055029.3623499-4-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2025-07-26 14:28:35 -07:00
Kees Cook
76261fc7d1 stackleak: Split KSTACK_ERASE_CFLAGS from GCC_PLUGINS_CFLAGS
In preparation for Clang stack depth tracking for KSTACK_ERASE,
split the stackleak-specific cflags out of GCC_PLUGINS_CFLAGS into
KSTACK_ERASE_CFLAGS.

Link: https://lore.kernel.org/r/20250717232519.2984886-3-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2025-07-21 21:40:57 -07:00