From: Jiri Olsa <olsajiri@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Oleg Nesterov <oleg@redhat.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, x86@kernel.org,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
Hao Luo <haoluo@google.com>, Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCHv3 perf/core 0/6] uprobe,bpf: Allow to change app registers from uprobe registers
Date: Mon, 15 Sep 2025 23:29:37 +0200 [thread overview]
Message-ID: <aMiFQRLP3w1APfbU@krava> (raw)
In-Reply-To: <CAEf4BzZ21xFq25Vs0xSmCfb1MSbdz_GLs8B6s+h0Q3kCTmnzSw@mail.gmail.com>
On Mon, Sep 15, 2025 at 01:10:33PM -0700, Andrii Nakryiko wrote:
> On Fri, Sep 12, 2025 at 1:55 PM Jiri Olsa <olsajiri@gmail.com> wrote:
> >
> > On Fri, Sep 12, 2025 at 01:28:55PM -0700, Ihor Solodrai wrote:
> > > On 9/9/25 9:41 AM, Andrii Nakryiko wrote:
> > > > On Tue, Sep 9, 2025 at 8:39 AM Jiri Olsa <jolsa@kernel.org> wrote:
> > > > >
> > > > > hi,
> > > > > we recently had several requests for tetragon to be able to change
> > > > > user application function return value or divert its execution through
> > > > > instruction pointer change.
> > > > >
> > > > > This patchset adds support for uprobe program to change app's registers
> > > > > including instruction pointer.
> > > > >
> > > > > v3 changes:
> > > > > - deny attach of kprobe,multi with kprobe_write_ctx set [Alexei]
> > > > > - added more tests for denied kprobe attachment
> > > > >
> > > > > thanks,
> > > > > jirka
> > > > >
> > > > >
> > > > > ---
> > > > > Jiri Olsa (6):
> > > > > bpf: Allow uprobe program to change context registers
> > > > > uprobe: Do not emulate/sstep original instruction when ip is changed
> > > > > selftests/bpf: Add uprobe context registers changes test
> > > > > selftests/bpf: Add uprobe context ip register change test
> > > > > selftests/bpf: Add kprobe write ctx attach test
> > > > > selftests/bpf: Add kprobe multi write ctx attach test
> > > > >
> > > >
> > > > For the series:
> > > >
> > > > Acked-by: Andrii Nakryiko <andrii@kernel.org>
> > > >
> > > > Question is which tree will this go through? Most changes are in BPF,
> > > > so probably bpf-next, right?
> > >
> > > Hi Jiri.
> > >
> > > This series does not apply to current bpf-next, see below.
> > >
> > > Could you please respin it with bpf-next tag?
> > > E.g. "[PATCH v4 bpf-next 0/6] ..."
> > >
> >
> > hi,
> > the uprobe change it needs to be on top of the optimized uprobes (tip/perf/core)
>
> Is this what you happened to base it on (and thus diff context has
> that arch_uprobe_optimize), or those changes are needed for correct
> functioning?
yes
>
> It seems like some conflict is inevitable, but on uprobe side it's two
> lines of code that would need to be put after arch_uprobe_optimize
> (instead of handler_chain), while on BPF side it's a bit more
> invasive.
>
> So unless tip/perf/core changes are mandatory for correct functioning,
> I'd say let's rebase on top of bpf-next and handle that trivial merge
> conflict during merge window?
ok, sounds good, will rebase/resend
thanks,
jirka
prev parent reply other threads:[~2025-09-15 21:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 12:38 [PATCHv3 perf/core 0/6] uprobe,bpf: Allow to change app registers from uprobe registers Jiri Olsa
2025-09-09 12:38 ` [PATCHv3 perf/core 1/6] bpf: Allow uprobe program to change context registers Jiri Olsa
2025-09-09 16:41 ` Andrii Nakryiko
2025-09-16 21:52 ` Jiri Olsa
2025-09-09 12:38 ` [PATCHv3 perf/core 2/6] uprobe: Do not emulate/sstep original instruction when ip is changed Jiri Olsa
2025-09-09 12:38 ` [PATCHv3 perf/core 3/6] selftests/bpf: Add uprobe context registers changes test Jiri Olsa
2025-09-09 12:38 ` [PATCHv3 perf/core 4/6] selftests/bpf: Add uprobe context ip register change test Jiri Olsa
2025-09-09 12:38 ` [PATCHv3 perf/core 5/6] selftests/bpf: Add kprobe write ctx attach test Jiri Olsa
2025-09-09 12:38 ` [PATCHv3 perf/core 6/6] selftests/bpf: Add kprobe multi " Jiri Olsa
2025-09-09 16:41 ` [PATCHv3 perf/core 0/6] uprobe,bpf: Allow to change app registers from uprobe registers Andrii Nakryiko
2025-09-12 20:28 ` Ihor Solodrai
2025-09-12 20:55 ` Jiri Olsa
2025-09-12 21:09 ` Ihor Solodrai
2025-09-15 20:10 ` Andrii Nakryiko
2025-09-15 21:29 ` Jiri Olsa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aMiFQRLP3w1APfbU@krava \
--to=olsajiri@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=haoluo@google.com \
--cc=ihor.solodrai@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=songliubraving@fb.com \
--cc=x86@kernel.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).