summaryrefslogtreecommitdiff
path: root/include/linux/execmem.h
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2026-06-17 15:46:23 -0700
committerNathan Chancellor <nathan@kernel.org>2026-06-18 11:35:22 -0700
commit9a289cc425bf469642533e4afa01c90f08971d01 (patch)
treea331ea6359e1d01765bd6b1e0dc613441966ee75 /include/linux/execmem.h
parent7158c5b67e92e52c2ca9a3617a7e768a84031da1 (diff)
modpost: Ignore Clang LTO suffixes in symbol matching
When building the kernel with Clang ThinLTO enabled, the compiler can mangle static variable names by appending suffixes such as ".llvm.<hash>" to prevent naming collisions across translation units. This name mangling breaks the section mismatch whitelisting in modpost. modpost relies on glob patterns (e.g., "*_ops" or "*_probe") to identify safe references between permanent data and initialization code. Because the LTO suffix modifies the end of the symbol name, legitimately whitelisted structures fail the match, resulting in false positive warnings. For example, a static pernet_operations struct triggers the following: WARNING: modpost: vmlinux: section mismatch in reference: \ ping_v4_net_ops.llvm.5641696707737373282 (section: .data) -> \ ping_v4_proc_init_net (section: .init.text) Fix this by ignoring "*_ops.llvm.*" in "from" symbol names (the same as "*_ops"). Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202606111233.kM8oo8Df-lkp@intel.com/ Signed-off-by: Rong Xu <xur@google.com> Link: https://patch.msgid.link/20260617224623.1346309-1-xur@google.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'include/linux/execmem.h')
0 files changed, 0 insertions, 0 deletions