[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250908121721.GB5489@redhat.com>
Date: Mon, 8 Sep 2025 14:17:21 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Andrii Nakryiko <andrii@...nel.org>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
x86@...nel.org, Song Liu <songliubraving@...com>,
Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
Hao Luo <haoluo@...gle.com>, Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCHv2 perf/core 2/4] uprobe: Do not emulate/sstep original
instruction when ip is changed
On 09/08, Jiri Olsa wrote:
>
> If user decided to take execution elsewhere, it makes little sense
> to execute the original instruction, so let's skip it.
...
> @@ -2768,6 +2768,13 @@ static void handle_swbp(struct pt_regs *regs)
> /* Try to optimize after first hit. */
> arch_uprobe_optimize(&uprobe->arch, bp_vaddr);
>
> + /*
> + * If user decided to take execution elsewhere, it makes little sense
> + * to execute the original instruction, so let's skip it.
> + */
> + if (instruction_pointer(regs) != bp_vaddr)
> + goto out;
> +
Acked-by: Oleg Nesterov <oleg@...hat.com>
Powered by blists - more mailing lists