summaryrefslogtreecommitdiff
path: root/scripts/livepatch
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2026-08-02 20:24:25 -0700
committerIngo Molnar <mingo@kernel.org>2026-08-03 07:12:38 +0200
commit5ca8c91d1ea6534842e7e0065d15104d802506cd (patch)
tree239f5103cb9a26ecdddfceac7643251d5c4ec34a /scripts/livepatch
parent8668bf91e0508abeb8e98b4edd89032be02228a1 (diff)
downloadlinux-5ca8c91d1ea6534842e7e0065d15104d802506cd.tar.gz
linux-5ca8c91d1ea6534842e7e0065d15104d802506cd.zip
objtool/klp: Fix false module dependencies caused by dead relocs
When creating a klp reloc, klp-diff keeps the original relocation but converts the referenced symbol to an UNDEF/WEAK placeholder tombstone symbol, which gets fully disabled later by klp post-link. The tombstone symbol is only needed to avoid confusing objtool when it does the final run on the patch module. However, for references to exported symbols, modpost sees the reference to the tombstone symbol as a real reference to an exported symbol, resulting in a false module dependency getting created. Further, for a reference to a tombstone symbol which is exported into a module namespace, e.g. via EXPORT_SYMBOL_FOR_KVM_INTERNAL(), modpost can't satisfy the dependency, resulting in a warning like the following: module ... uses symbol kvm_flush_remote_tlbs from namespace module:kvm-amd,kvm-intel, but does not import it. Rename the placeholder tombstone symbols to ".klp.tombstone.<name>" so modpost no longer recognizes them. Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files") Reported-by: Ben Procknow <bprockno@redhat.com> Reported-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: live-patching@vger.kernel.org Link: https://lore.kernel.org/20260720145658.1103243-5-joe.lawrence@redhat.com Link: https://patch.msgid.link/9548393f4d89ec3b498f4f69aa6ef6b9bb7150fe.1785727106.git.jpoimboe@kernel.org
Diffstat (limited to 'scripts/livepatch')
0 files changed, 0 insertions, 0 deletions