All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	Quentin Monnet <qmo@kernel.org>
Subject: Re: [PATCHv2 bpf-next 1/3] bpf: Add tracing_multi link info support
Date: Wed, 24 Jun 2026 11:36:42 +0200	[thread overview]
Message-ID: <ajulKn0pB-Nh19yx@krava> (raw)
In-Reply-To: <CAEf4BzYVjf4PfJUedkzRUteNOsb7kHafAbndaaNHBbVHqtOEPw@mail.gmail.com>

On Tue, Jun 23, 2026 at 02:01:08PM -0700, Andrii Nakryiko wrote:
> On Tue, Jun 23, 2026 at 7:24 AM Jiri Olsa <jolsa@kernel.org> wrote:
> >
> > Adding BPF_OBJ_GET_INFO_BY_FD support for tracing_multi links.
> >
> > We expose following tracing_multi link data:
> > - attach_type of the program
> > - number of ids
> > - array of BTF ids
> > - array of its related kernel addresses
> > - array of cookies
> >
> > The change follows the kprobe_multi and uprobe_multi link-info convention
> > of optional output arrays with an in/out count,
> >
> > On top of standard tracing link data we also expose addresses, because they
> > are useful info for user (especially when the attachment was done via pattern).
> > This data is hidden when kallsyms does not allow exposing kernel pointer values.
> >
> > Assisted-by: Codex:GPT-5
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> >  include/uapi/linux/bpf.h       |  9 ++++++
> >  kernel/trace/bpf_trace.c       | 55 ++++++++++++++++++++++++++++++++++
> >  tools/include/uapi/linux/bpf.h |  9 ++++++
> >  3 files changed, 73 insertions(+)
> >
> > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> > index 89b36de5fdbb..80423ccc6b57 100644
> > --- a/include/uapi/linux/bpf.h
> > +++ b/include/uapi/linux/bpf.h
> > @@ -6839,6 +6839,15 @@ struct bpf_link_info {
> >                         __u32 flags;
> >                         __u32 pid;
> >                 } uprobe_multi;
> > +               struct {
> > +                       __u32 attach_type;
> > +                       __u32 count; /* in/out: tracing_multi target count */
> > +                       __u32 obj_id;
> 
> we have attach_btf_obj_id in bpf_prog_info, but target_obj_id in
> bpf_link_info for tracing programs. The latter, though, is actually
> not always BTF object ID (it can be prog_id for PROG_EXT)...
> 
> So, me personally, I was confused what "obj_id" here mean, it would be
> more obvious if it was called "btf_obj_id", tbh. But that's a minor
> nit/confusion, not feeling strongly.

ok, btf_obj_id si better choice, will change

> 
> everything else LGTM
> 
> Acked-by: Andrii Nakryiko <andrii@kernel.org>

thanks,
jirka

  reply	other threads:[~2026-06-24  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 14:24 [PATCHv2 bpf-next 0/3] bpf: tracing_multi link info support Jiri Olsa
2026-06-23 14:24 ` [PATCHv2 bpf-next 1/3] bpf: Add " Jiri Olsa
2026-06-23 15:32   ` Leon Hwang
2026-06-23 21:01   ` Andrii Nakryiko
2026-06-24  9:36     ` Jiri Olsa [this message]
2026-06-23 14:24 ` [PATCHv2 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests Jiri Olsa
2026-06-23 14:39   ` sashiko-bot
2026-06-23 14:24 ` [PATCHv2 bpf-next 3/3] bpftool: Add tracing_multi link info output Jiri Olsa
2026-06-23 14:38   ` sashiko-bot
2026-06-23 21:11   ` Andrii Nakryiko
2026-06-24 11:32     ` Jiri Olsa
2026-06-23 20:51 ` [PATCHv2 bpf-next 0/3] bpf: tracing_multi link info support Andrii Nakryiko
2026-06-24  9:29   ` 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=ajulKn0pB-Nh19yx@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=eddyz87@gmail.com \
    --cc=martin.lau@linux.dev \
    --cc=qmo@kernel.org \
    --cc=songliubraving@fb.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.