[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251208153056.3a4e9cd3511ccf00dc12e265@kernel.org>
Date: Mon, 8 Dec 2025 15:30:56 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Jiri Olsa <jolsa@...nel.org>, 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>, Steven Rostedt <rostedt@...dmis.org>, Ingo
Molnar <mingo@...nel.org>, David Laight <David.Laight@...lab.com>
Subject: Re: [RFC PATCH 0/8] uprobe/x86: Add support to optimize prologue
On Mon, 24 Nov 2025 19:12:42 +0100
Oleg Nesterov <oleg@...hat.com> wrote:
> On 11/17, Jiri Olsa wrote:
> >
> > This patchset adds support to optimize uprobe on top of instruction
> > that could be emulated and also adds support to emulate particular
> > versions of mov and sub instructions to cover some of the user space
> > functions prologues, like:
> >
> > pushq %rbp
> > movq %rsp,%rbp
> > subq $0xb0,%rsp
>
> ...
>
> > There's an additional issue that single instruction replacement does
> > not have and it's the possibility of the user space code to jump in the
> > middle of those 5 bytes. I think it's unlikely to happen at the function
> > prologue, but uprobe could be placed anywhere. I'm not sure how to
> > mitigate this other than having some enable/disable switch or config
> > option, which is unfortunate.
>
> plus this breaks single-stepping... Although perhaps we don't really care.
Yeah, and I think we can stop optimization if post_handler is set.
Thanks,
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists