Thread (64 messages) 64 messages, 8 authors, 2025-09-10

Re: nop5-optimized USDTs WAS: Re: [PATCHv6 perf/core 09/22] uprobes/x86: Add uprobe syscall to speed up uprobe

From: Andrii Nakryiko <hidden>
Date: 2025-09-10 14:30:53
Also in: bpf, lkml

On Fri, Sep 5, 2025 at 4:24 AM Peter Zijlstra [off-list ref] wrote:
On Thu, Sep 04, 2025 at 11:58:26PM +0200, Peter Zijlstra wrote:
quoted
On Thu, Sep 04, 2025 at 11:56:17PM +0200, Peter Zijlstra wrote:
quoted
Ooh, that suggests we do something like so:
N/m, I need to go sleep, that doesn't work right for the 32bit nops that
use lea instead of nopl. I'll see if I can come up with something more
sensible.
Something like this. Can someone please look very critical at this fancy
insn_is_nop()?
Can't truly review that low-level instruction decoding logic (and you
seem to have found an issue yourself), but superficially the cases
that are claimed to be handled seem like legit no-op instructions. And
the overall logic of nop handling in can_optimize and emulation seems
to be intact as well.

Thanks for generalizing all this!

To the extent that this means anything:

Acked-by: Andrii Nakryiko <andrii@kernel.org>
---
 arch/x86/include/asm/insn-eval.h |  2 +
 arch/x86/kernel/alternative.c    | 20 +--------
 arch/x86/kernel/uprobes.c        | 32 ++------------
 arch/x86/lib/insn-eval.c         | 92 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 98 insertions(+), 48 deletions(-)
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help