Thread (28 messages) flat view 28 messages, 5 authors, 2d ago

Re: [PATCH 03/14] objtool/klp: Fix false module dependencies caused by dead relocs

From: Dylan Hatch <hidden>
Date: 2026-08-14 20:44:20
Also in: live-patching, lkml

Hi Josh,

On Wed, Aug 12, 2026 at 1:27 PM Josh Poimboeuf [off-list ref] wrote:
On Wed, Aug 12, 2026 at 10:33:51AM -0700, Sean Christopherson wrote:
quoted
E.g. if (not-so-hypothetically) one were to try to livepatch
nested_vmx_enter_non_root_mode(), how would livepatch.ko get at things like
kvm_service_local_tlb_flush_requests() and kvm_spurious_fault() without also
creating copies of those functions?  Wouldn't the kernel need something like the
below to exempt livepatch modules from the restriction?
Indeed, though we approached it from the tooling side, see this (not yet
merged) patched:

  https://lore.kernel.org/fe5a00818e06ec613344d41d5944de054fcd8832.1786138493.git.jpoimboe@kernel.org (local)
In the case where KVM is built as a module, a livepatch to
nested_vmx_enter_non_root_mode() doesn't seem to work because
livepatch doesn't allow KLP relocs for vmlinux symbols when they're in
a patch function originating in a module. I was able to recreate this
failure with a simple module/livepatch combo:

https://github.com/dylanbhatch/linux/tree/mod-ns-lp

Is there a way to work around this issue in the .patch source itself,
or some other way to allow these relocs?

I'll also send a reply to your V3 patch with some more details on my findings.

Thanks,
Dylan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help