From: Jiri Olsa <olsajiri@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
Viktor Malik <vmalik@redhat.com>
Subject: Re: [PATCH RFCv2 bpf-next 2/4] bpf: Add bpf_kprobe_multi_is_return kfunc
Date: Mon, 4 Mar 2024 09:28:08 +0100 [thread overview]
Message-ID: <ZeWGGMyJIlT_rGMn@krava> (raw)
In-Reply-To: <CAEf4BzZ_5-nORBS-MrZBLbUUmZ3j3txJhhZxHPLkP-n1SnFQfg@mail.gmail.com>
On Fri, Mar 01, 2024 at 10:01:16AM -0800, Andrii Nakryiko wrote:
sNIP
> > > > +__bpf_kfunc bool bpf_kprobe_multi_is_return(void)
> > >
> > > and for uprobes we'll have bpf_uprobe_multi_is_return?...
> >
> > yes, but now I'm thinking maybe we could also have 'session' api and
> > have single 'bpf_session_is_return' because both kprobe and uprobe
> > are KPROBE program type.. and align it together with other session
> > kfuncs:
> >
> > bpf_session_is_return
> > bpf_session_set_cookie
> > bpf_session_get_cookie
> >
>
> We can do that. But I was thinking more of a
>
> u64 *bpf_session_cookie()
>
> which would return a read/write pointer that BPF program can
> manipulate. Instead of doing two calls (get_cookie + set_cookie), it
> would be one call. Is there any benefit to having separate set/get
> cookie calls?
ok, that would be easier, will check on that
>
> > >
> > > BTW, have you tried implementing a "session cookie" idea?
> >
> > yep, with a little fix [0] it's working on top of Masami's 'fprobe over fgraph'
> > changes, you can check last 2 patches in [1] .. I did not do this on top of the
> > current fprobe/rethook kernel code, because it seems it's about to go away
>
> do you know what is the timeline for fprobe over fgraph work to be finished?
good question ;-) Masami, any idea?
fwiw there's new version needed for [1] fix
[1] https://lore.kernel.org/bpf/ZdyKaRiI-PnG80Q0@krava/
>
> >
> > I still need to implement that on top of uprobes and I will send rfc, so we can
> > see all of it and discuss the interface
> >
>
> great, yeah, I think the session cookie idea should go in at the same
> time, if possible, so that we can assume it is supported for new
> [ku]probe.wrapper programs.
makes sense, even though with new kfuncs detection stuff,
it will be easy to find out
jirka
next prev parent reply other threads:[~2024-03-04 8:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 9:02 [PATCH RFCv2 bpf-next 0/4] bpf: Introduce kprobe multi wrapper attach Jiri Olsa
2024-02-28 9:02 ` [PATCH RFCv2 bpf-next 1/4] bpf: Add support for " Jiri Olsa
2024-02-29 1:23 ` Andrii Nakryiko
2024-02-29 10:20 ` Jiri Olsa
2024-02-28 9:02 ` [PATCH RFCv2 bpf-next 2/4] bpf: Add bpf_kprobe_multi_is_return kfunc Jiri Olsa
2024-02-29 1:23 ` Andrii Nakryiko
2024-02-29 10:16 ` Jiri Olsa
2024-03-01 18:01 ` Andrii Nakryiko
2024-03-04 8:28 ` Jiri Olsa [this message]
2024-02-28 9:02 ` [PATCH RFCv2 bpf-next 3/4] libbpf: Add support for kprobe multi wrapper attach Jiri Olsa
2024-02-29 1:23 ` Andrii Nakryiko
2024-02-29 10:24 ` Jiri Olsa
2024-02-28 9:02 ` [PATCH RFCv2 bpf-next 4/4] selftests/bpf: Add kprobe multi wrapper test Jiri Olsa
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=ZeWGGMyJIlT_rGMn@krava \
--to=olsajiri@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=mhiramat@kernel.org \
--cc=sdf@google.com \
--cc=songliubraving@fb.com \
--cc=vmalik@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.