From: Kees Cook Date: Wed, 9 Apr 2025 15:11:58 +0000 (-0700) Subject: hardening: Disable GCC randstruct for COMPILE_TEST X-Git-Tag: v6.15-rc3~19^2~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f5c68a4e84f9feca3be578199ec648b676db2030;p=linux-block.git hardening: Disable GCC randstruct for COMPILE_TEST There is a GCC crash bug in the randstruct for latest GCC versions that is being tickled by landlock[1]. Temporarily disable GCC randstruct for COMPILE_TEST builds to unbreak CI systems for the coming -rc2. This can be restored once the bug is fixed. Suggested-by: Mark Brown Link: https://lore.kernel.org/all/20250407-kbuild-disable-gcc-plugins-v1-1-5d46ae583f5e@kernel.org/ [1] Acked-by: Mark Brown Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20250409151154.work.872-kees@kernel.org Signed-off-by: Kees Cook --- diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index c17366ce8224..3fe9d7b945c4 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 && (GCC_PLUGINS || CC_HAS_RANDSTRUCT) + default RANDSTRUCT_FULL if COMPILE_TEST && CC_HAS_RANDSTRUCT default RANDSTRUCT_NONE help If you enable this, the layouts of structures that are entirely