From: sashiko-bot@kernel.org
To: "Jiri Olsa" <jolsa@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCHv3 bpf-next 3/3] bpftool: Add tracing_multi link info output
Date: Mon, 29 Jun 2026 14:53:49 +0000 [thread overview]
Message-ID: <20260629145349.F3E241F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260629143844.862369-4-jolsa@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The kernel does not implement `.fill_link_info` for `tracing_multi` links, preventing `bpftool` from querying the data.
- [Low] The patch references `tracing_multi` in `struct bpf_link_info`, but this member is missing from the UAPI header, leading to a compilation error.
--
commit e1b00f15ceb03dae490ba9269f47251c966b9424
Author: Jiri Olsa <jolsa@kernel.org>
bpftool: Add tracing_multi link info output
This commit adds support to bpftool to show tracing_multi link details
such as attach type, btf_id, address, cookie, and function module.
> diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c
> index bdcd717b0348f..eb0ba9d716924 100644
> --- a/tools/bpf/bpftool/link.c
> +++ b/tools/bpf/bpftool/link.c
[ ... ]
> @@ -1114,6 +1226,26 @@ static int do_show_link(int fd)
> goto again;
> }
> }
> + if (info.type == BPF_LINK_TYPE_TRACING_MULTI && !info.tracing_multi.ids) {
[Severity: Low]
The patch references tracing_multi in struct bpf_link_info here, but looking
at include/uapi/linux/bpf.h, there doesn't seem to be a tracing_multi member
defined in the union. Will this cause a compilation error when building bpftool?
[Severity: Medium]
Additionally, it appears the kernel-side bpf_tracing_multi_link_lops in
kernel/trace/bpf_trace.c does not yet implement a .fill_link_info callback.
Without that callback, will bpf_link_get_info_by_fd() fail to populate the
requested tracing_multi arrays (ids, addrs, cookies) for the tool to display,
even after the UAPI is updated?
> + count = info.tracing_multi.count;
> + if (count) {
> + ids = calloc(count, sizeof(__u32));
> + addrs = calloc(count, sizeof(__u64));
> + cookies = calloc(count, sizeof(__u64));
> + if (!ids) {
> + p_err("mem alloc failed");
> + close(fd);
> + free(cookies);
> + free(addrs);
> + free(ids);
> + return -ENOMEM;
> + }
> + info.tracing_multi.ids = ptr_to_u64(ids);
> + info.tracing_multi.addrs = ptr_to_u64(addrs);
> + info.tracing_multi.cookies = ptr_to_u64(cookies);
> + goto again;
> + }
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260629143844.862369-4-jolsa@kernel.org?part=1
next prev parent reply other threads:[~2026-06-29 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 14:38 [PATCHv3 bpf-next 0/3] bpf: tracing_multi link info support Jiri Olsa
2026-06-29 14:38 ` [PATCHv3 bpf-next 1/3] bpf: Add " Jiri Olsa
2026-06-29 14:38 ` [PATCHv3 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests Jiri Olsa
2026-06-29 14:52 ` sashiko-bot
2026-06-29 14:38 ` [PATCHv3 bpf-next 3/3] bpftool: Add tracing_multi link info output Jiri Olsa
2026-06-29 14:53 ` sashiko-bot [this message]
2026-06-29 16:05 ` bot+bpf-ci
2026-06-29 20:51 ` Jiri Olsa
2026-06-29 17:28 ` Alexei Starovoitov
2026-06-29 20:02 ` 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=20260629145349.F3E241F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.