diff options
| author | Kees Cook <kees@kernel.org> | 2025-07-23 22:50:28 -0700 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-07-26 14:28:35 -0700 |
| commit | a8f0b1f8ef628bd1003eed650862836e97b89fdd (patch) | |
| tree | f3c9973b97d3076e8c73d0b1db53236b1518b088 /security | |
| parent | kstack_erase: Add -mgeneral-regs-only to silence Clang warnings (diff) | |
| download | linux-a8f0b1f8ef628bd1003eed650862836e97b89fdd.tar.gz linux-a8f0b1f8ef628bd1003eed650862836e97b89fdd.zip | |
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>
Diffstat (limited to 'security')
| -rw-r--r-- | security/Kconfig.hardening | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index f7aa2024ab25..b9a5bc3430aa 100644 --- a/security/Kconfig.hardening +++ b/security/Kconfig.hardening @@ -82,10 +82,13 @@ choice endchoice +config CC_HAS_SANCOV_STACK_DEPTH_CALLBACK + def_bool $(cc-option,-fsanitize-coverage-stack-depth-callback-min=1) + config KSTACK_ERASE bool "Poison kernel stack before returning from syscalls" depends on HAVE_ARCH_KSTACK_ERASE - depends on GCC_PLUGINS + depends on GCC_PLUGINS || CC_HAS_SANCOV_STACK_DEPTH_CALLBACK help This option makes the kernel erase the kernel stack before returning from system calls. This has the effect of leaving |
