On Fri, Sep 5, 2025 at 4:24 AM Peter Zijlstra <[email protected]> wrote:
>
> On Thu, Sep 04, 2025 at 11:58:26PM +0200, Peter Zijlstra wrote:
> > On Thu, Sep 04, 2025 at 11:56:17PM +0200, Peter Zijlstra wrote:
> >
> > > 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 <[email protected]>

>
> ---
>  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(-)
>

[...]

Reply via email to