aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-04-26 00:37:55 -0700
committerKees Cook <kees@kernel.org>2025-05-08 09:42:40 -0700
commitf0cd6012c40da99b45f8f63052b97ec89d5f307b (patch)
tree44b08b5ed3b4dd4ea84b6d5170b6e271aaafd88d
parentlib/tests: randstruct: Add deep function pointer layout test (diff)
downloadlinux-rng-f0cd6012c40da99b45f8f63052b97ec89d5f307b.tar.xz
linux-rng-f0cd6012c40da99b45f8f63052b97ec89d5f307b.zip
Revert "hardening: Disable GCC randstruct for COMPILE_TEST"
This reverts commit f5c68a4e84f9feca3be578199ec648b676db2030. It is again possible to build "allmodconfig" with the randstruct GCC plugin, so enable it for COMPILE_TEST to catch future bugs. Signed-off-by: Kees Cook <kees@kernel.org>
-rw-r--r--security/Kconfig.hardening2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening
index 3fe9d7b945c4..c17366ce8224 100644
--- a/security/Kconfig.hardening
+++ b/security/Kconfig.hardening
@@ -344,7 +344,7 @@ config CC_HAS_RANDSTRUCT
choice
prompt "Randomize layout of sensitive kernel structures"
- default RANDSTRUCT_FULL if COMPILE_TEST && CC_HAS_RANDSTRUCT
+ default RANDSTRUCT_FULL if COMPILE_TEST && (GCC_PLUGINS || CC_HAS_RANDSTRUCT)
default RANDSTRUCT_NONE
help
If you enable this, the layouts of structures that are entirely