Re: [PATCHv2 perf/core 1/2] uprobes/x86: Add support to emulate nop instructions
From: Oleg Nesterov
Date: Fri Apr 11 2025 - 08:54:34 EST
On 04/11, Jiri Olsa wrote:
>
> --- a/arch/x86/kernel/uprobes.c
> +++ b/arch/x86/kernel/uprobes.c
> @@ -840,6 +840,12 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)
> insn_byte_t p;
> int i;
>
> + /* x86_nops[i]; same as jmp with .offs = 0 */
> + for (i = 1; i <= ASM_NOP_MAX; ++i) {
> + if (!memcmp(insn->kaddr, x86_nops[i], i))
> + goto setup;
> + }
Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>