diff options
| author | Josh Poimboeuf <jpoimboe@kernel.org> | 2026-08-28 10:48:50 -0700 |
|---|---|---|
| committer | Josh Poimboeuf <jpoimboe@kernel.org> | 2026-08-31 17:50:16 -0700 |
| commit | ac323c9467092479dc1e5bc138c9abbe015b0069 (patch) | |
| tree | c246111307e09c9f9b15c6ff725c37cfbe0eec41 /scripts/basic/split-include.c | |
| parent | 4825ef699cda4c6f2f0586b17a5e225560481da6 (diff) | |
| download | linux-stable-ac323c9467092479dc1e5bc138c9abbe015b0069.tar.gz linux-stable-ac323c9467092479dc1e5bc138c9abbe015b0069.zip | |
objtool/klp: Fix checksums for constant pool references
Adding a line of code to __link_shadow_page() with a literal string
causes a false positive changed function with GCC:
arch/x86/kvm/kvm.ko.o: changed function: kvm_tdp_mmu_map_private_pfn
While the patch only touched __link_shadow_page(), the string addition
triggered a rename of .LC64 -> .LC65 in kvm_tdp_mmu_map_private_pfn()
even though the underlying referenced constant data didn't change.
So for .LC* symbols, the suffix is arbitrary but the data isn't. Add
the underlying data to the checksum calculation rather than the symbol
name.
Clang also uses .LC* symbols, but also uses anonymous data. Both
compilers put this data in .rodata.cst<num> sections.
Fixes: 0d83da43b1e1 ("objtool/klp: Add --checksum option to generate per-function checksums")
Link: https://patch.msgid.link/f3a9e74ceebc6475ce94bcfe985401140857814a.1787939301.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
