diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2025-09-05 10:24:47 +0200 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-10-16 11:13:47 +0200 |
| commit | 8a5c6cbfe4a35c6a22d2f8bbaf49b8cc3f45fcc6 (patch) | |
| tree | 0d963feafee2ea519b5cb4558c6c42fda1270e13 /arch/x86/include/asm/insn.h | |
| parent | 866cf36bfee4fba6a492d2dcc5133f857e3446b0 (diff) | |
x86/insn,uprobes,alternative: Unify insn_is_nop()
Both uprobes and alternatives have insn_is_nop() variants, unify them
and make sure insn_is_nop() works for both x86_64 and i386.
Specifically, uprobe must not compare userspace instructions to kernel
nops as that does not work right in the compat case.
For the uprobe case we therefore must recognise common 32bit and 64bit
nops. Because uprobe will consume the instruction as a nop, it must
not mistakenly claim a non-nop instruction to be a nop. Eg. 'REX.b3
NOP' is 'xchg %r8,%rax' - not a nop.
For the kernel case similar constraints apply, is it used to optimize
NOPs by replacing strings of short(er) nops with longer nops. Must not
claim an instruction is a nop if it really isn't. Not recognising a
nop is non-fatal.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'arch/x86/include/asm/insn.h')
0 files changed, 0 insertions, 0 deletions
