From: Jiri Olsa <olsajiri@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: 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>,
Viktor Malik <vmalik@redhat.com>
Subject: Re: [PATCH RFC bpf-next 1/4] fprobe: Add entry/exit callbacks types
Date: Thu, 15 Feb 2024 10:08:38 +0100 [thread overview]
Message-ID: <Zc3UllfMobF109i7@krava> (raw)
In-Reply-To: <20240214003546.75688cf56b548a86eb090068@kernel.org>
On Wed, Feb 14, 2024 at 12:35:46AM +0900, Masami Hiramatsu wrote:
> Hi,
>
> On Wed, 7 Feb 2024 16:35:47 +0100
> Jiri Olsa <jolsa@kernel.org> wrote:
>
> > We are going to store callbacks in following change,
> > so this will ease up the code.
> >
>
> Yeah, this looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Hmm, can I pick this in my for-next tree?
I don't mind you picking that up, I'll have to send new version of
the rest of the patchset, but I think I'll still need these types
jirka
>
> Thank you,
>
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> > include/linux/fprobe.h | 18 ++++++++++++------
> > 1 file changed, 12 insertions(+), 6 deletions(-)
> >
> > diff --git a/include/linux/fprobe.h b/include/linux/fprobe.h
> > index 3e03758151f4..f39869588117 100644
> > --- a/include/linux/fprobe.h
> > +++ b/include/linux/fprobe.h
> > @@ -7,6 +7,16 @@
> > #include <linux/ftrace.h>
> > #include <linux/rethook.h>
> >
> > +struct fprobe;
> > +
> > +typedef int (*fprobe_entry_cb)(struct fprobe *fp, unsigned long entry_ip,
> > + unsigned long ret_ip, struct pt_regs *regs,
> > + void *entry_data);
> > +
> > +typedef void (*fprobe_exit_cb)(struct fprobe *fp, unsigned long entry_ip,
> > + unsigned long ret_ip, struct pt_regs *regs,
> > + void *entry_data);
> > +
> > /**
> > * struct fprobe - ftrace based probe.
> > * @ops: The ftrace_ops.
> > @@ -34,12 +44,8 @@ struct fprobe {
> > size_t entry_data_size;
> > int nr_maxactive;
> >
> > - int (*entry_handler)(struct fprobe *fp, unsigned long entry_ip,
> > - unsigned long ret_ip, struct pt_regs *regs,
> > - void *entry_data);
> > - void (*exit_handler)(struct fprobe *fp, unsigned long entry_ip,
> > - unsigned long ret_ip, struct pt_regs *regs,
> > - void *entry_data);
> > + fprobe_entry_cb entry_handler;
> > + fprobe_exit_cb exit_handler;
> > };
> >
> > /* This fprobe is soft-disabled. */
> > --
> > 2.43.0
> >
>
>
> --
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2024-02-15 9:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 15:35 [PATCH RFC bpf-next 0/4] bpf: Add support to attach return prog in kprobe multi Jiri Olsa
2024-02-07 15:35 ` [PATCH RFC bpf-next 1/4] fprobe: Add entry/exit callbacks types Jiri Olsa
2024-02-13 15:35 ` Masami Hiramatsu
2024-02-15 9:08 ` Jiri Olsa [this message]
2024-02-07 15:35 ` [PATCH RFC bpf-next 2/4] bpf: Add return prog to kprobe multi Jiri Olsa
2024-02-08 19:05 ` Alexei Starovoitov
2024-02-10 15:29 ` Jiri Olsa
2024-02-07 15:35 ` [PATCH RFC bpf-next 3/4] libbpf: Add return_prog_fd to kprobe multi opts Jiri Olsa
2024-02-07 15:35 ` [PATCH RFC bpf-next 4/4] selftests/bpf: Add kprobe multi return prog test Jiri Olsa
2024-02-08 19:35 ` [PATCH RFC bpf-next 0/4] bpf: Add support to attach return prog in kprobe multi Andrii Nakryiko
2024-02-10 15:31 ` Jiri Olsa
2024-02-13 4:06 ` Andrii Nakryiko
2024-02-13 12:09 ` Jiri Olsa
2024-02-13 18:20 ` Andrii Nakryiko
2024-02-13 21:09 ` Jiri Olsa
2024-02-14 20:55 ` Jiri Olsa
2024-02-15 16:27 ` Steven Rostedt
2024-02-16 15:03 ` Jiri Olsa
2024-02-19 11:20 ` Viktor Malik
2024-02-19 12:43 ` Jiri Olsa
2024-02-23 9:32 ` Jiri Olsa
2024-02-29 0:43 ` Andrii Nakryiko
2024-02-29 1:25 ` Andrii Nakryiko
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=Zc3UllfMobF109i7@krava \
--to=olsajiri@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.