kunit/stackinit: Use fill byte different from Clang i386 pattern
[ Upstream commit d985e439 ] The byte initialization values used with -ftrivial-auto-var-init=pattern (CONFIG_INIT_STACK_ALL_PATTERN=y) depends on the compiler, architecture, and byte position relative to struct member types. On i386 with Clang, this includes the 0xFF value, which means it looks like nothing changes between the leaf byte filling pass and the expected "stack wiping" pass of the stackinit test. Use the byte fill value of 0x99 instead, fixing the test for i386 Clang builds. Reported-by: ernsteiswuerfel Closes: https://github.com/ClangBuiltLinux/linux/issues/2071 Fixes: 8c30d32b ("lib/test_stackinit: Handle Clang auto-initialization pattern") Tested-by:Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20250304225606.work.030-kees@kernel.org Signed-off-by:
Kees Cook <kees@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
Please sign in to comment