Jakub Kicinski
unread,May 29, 2025, 11:38:14 AM5/29/25Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Richard Fitzgerald, brendan...@linux.dev, davi...@google.com, rm...@google.com, linux-k...@vger.kernel.org, kuni...@googlegroups.com, linux-...@vger.kernel.org, pat...@opensource.cirrus.com
This breaks kunit for older compilers:
$ ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64
Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=x86_64 O=.kunit olddefconfig
ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
This is probably due to unsatisfied dependencies.
Missing: CONFIG_INIT_STACK_ALL_PATTERN=y
$ gcc --version
gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5)
IIUC GCC 11.5 is supported so pattern init can't be a hard requirement.
How about we do this instead? Can you check if it'd work for you?
diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening
index c17366ce8224..904b99f34cd0 100644
--- a/security/Kconfig.hardening
+++ b/security/Kconfig.hardening
@@ -113,6 +113,7 @@ choice
bool "pattern-init everything (strongest)"
+ default KUNIT_ALL_TESTS
depends on CC_HAS_AUTO_VAR_INIT_PATTERN
depends on !KMSAN
help
Initializes everything on the stack (including padding)
with a specific debug value. This is intended to eliminate