randstruct: Force full rebuild when seed changes
authorKees Cook <kees@kernel.org>
Sat, 3 May 2025 18:46:19 +0000 (11:46 -0700)
committerKees Cook <kees@kernel.org>
Thu, 8 May 2025 16:42:06 +0000 (09:42 -0700)
commit056000c471ea41db56de58f71b9fe727d6e68b9b
treee59dea397c3f169770f592d45d2aee7b0a8393e9
parent0cecd37daef3d57e6656c0023978d5ec2d7409c1
randstruct: Force full rebuild when seed changes

While the randstruct GCC plugin was being rebuilt if the randstruct seed
changed, Clang builds did not notice the change. This could result in
differing struct layouts in a target depending on when it was built.

Include the existing generated header file in compiler-version.h when
its associated feature name, RANDSTRUCT, is defined. This will be picked
up by fixdep and force rebuilds where needed.

Link: https://lore.kernel.org/r/20250503184623.2572355-2-kees@kernel.org
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Tested-by: Nicolas Schier <n.schier@avm.de>
Signed-off-by: Kees Cook <kees@kernel.org>
include/linux/compiler-version.h
include/linux/vermagic.h