Thread (36 messages) 36 messages, 8 authors, 2023-02-01

Re: [PATCH 0/2] vhost: improve livepatch switching for heavily loaded vhost worker kthreads

From: Josh Poimboeuf <jpoimboe@kernel.org>
Date: 2023-01-31 16:38:42
Also in: kvm, live-patching, lkml

On Tue, Jan 31, 2023 at 10:22:09AM +0000, Mark Rutland wrote:
quoted
Hm, it might be nice if our out-of-line static call implementation would
automatically do a static key check as part of static_call_cond() for
NULL-type static calls.

But the best answer is probably to just add inline static calls to
arm64.  Is the lack of objtool the only thing blocking that?
The major issues were branch range limitations (and needing the linker to add
PLTs),
Does the compiler do the right thing (e.g., force PLT) if the branch
target is outside the translation unit?  I'm wondering if we could for
example use objtool to help enforce such rules at the call site.
and painful instruction patching requirements (e.g. the architecture's
"CMODX" rules for Concurrent MODification and eXecution of instructions). We
went with the static key scheme above because that was what our assembled code
generation would devolve to anyway.

If we knew each call-site would only call a particular function or skip the
call, then we could do better (and would probably need something like objtool
to NOP that out at compile time), but since we don't know the callee at build
time we can't ensure we have a PLT in range when necessary.
Unfortunately most static calls have multiple destinations.  And most
don't have the option of being NULL.

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