]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "hardening: Disable GCC randstruct for COMPILE_TEST"
authorKees Cook <kees@kernel.org>
Sat, 26 Apr 2025 07:37:55 +0000 (00:37 -0700)
committerKees Cook <kees@kernel.org>
Thu, 8 May 2025 16:42:40 +0000 (09:42 -0700)
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>
security/Kconfig.hardening

index 3fe9d7b945c43e86d97a1b3f0868cf763a7ede26..c17366ce8224ef3bea7465eecf9fdd145cb27fd8 100644 (file)
@@ -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