BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiri Olsa" <jolsa@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCHv3 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests
Date: Mon, 29 Jun 2026 14:52:15 +0000	[thread overview]
Message-ID: <20260629145215.699B21F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260629143844.862369-3-jolsa@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The kernel implementation of `.fill_link_info` for `BPF_LINK_TYPE_TRACING_MULTI` is completely missing, which would cause the new tests to unconditionally fail at runtime.
- [Low] The patch introduces a compilation failure because it attempts to access a non-existent `tracing_multi` member in `struct bpf_link_info`.
--

commit 0277eab302404c5b366c836f0d334f0e2681388e
Author: Jiri Olsa <jolsa@kernel.org>

selftests/bpf: Add tracing_multi link info tests

Adding tracing_multi link info tests that follow the kprobe_multi
and uprobe_multi tests logic.

> diff --git a/tools/testing/selftests/bpf/prog_tests/fill_link_info.c b/tools/testing/selftests/bpf/prog_tests/fill_link_info.c
> index f589eefbf9fbd..0918321c8e63d 100644
> --- a/tools/testing/selftests/bpf/prog_tests/fill_link_info.c
> +++ b/tools/testing/selftests/bpf/prog_tests/fill_link_info.c
[ ... ]
> @@ -396,6 +413,224 @@ static void test_kprobe_multi_fill_link_info(struct test_fill_link_info *skel,
[ ... ]
> +static int verify_tracing_multi_link_info(int fd, const struct bpf_program *prog,
> +					  const struct tmulti_target *targets,
> +					  __u32 btf_obj_id, bool has_cookies)
> +{
> +	enum bpf_attach_type attach_type = bpf_program__expected_attach_type(prog);
> +	__u64 addrs[TRACING_MULTI_CNT], cookies[TRACING_MULTI_CNT];
> +	__u32 ids[TRACING_MULTI_CNT];
> +	struct bpf_link_info info;
> +	__u32 len = sizeof(info);
> +	int err, i;
> +
> +	memset(&info, 0, sizeof(info));
> +	err = bpf_link_get_info_by_fd(fd, &info, &len);
> +	if (!ASSERT_OK(err, "bpf_link_get_info_by_fd"))
> +		return -1;
> +
> +	if (!ASSERT_EQ(info.type, BPF_LINK_TYPE_TRACING_MULTI, "info.type"))
> +		return -1;
> +
> +	ASSERT_EQ(info.tracing_multi.attach_type, attach_type, "info.tracing_multi.attach_type");

[Severity: Low]
Does this code fail to compile?  It looks like struct bpf_link_info does not
have a tracing_multi member.

[Severity: Medium]
Will this test unconditionally fail at runtime?

Looking at bpf_tracing_multi_link_lops in kernel/trace/bpf_trace.c, it
appears the .fill_link_info callback is missing for TRACING_MULTI links.

Since bpf_link_get_info_by_fd() returns 0 without populating link-specific
info or returning expected error codes when the callback is missing, won't
these assertions fail?

> +	ASSERT_EQ(info.tracing_multi.count, TRACING_MULTI_CNT, "info.tracing_multi.count");
> +
> +	memset(ids, 0, sizeof(ids));
> +	memset(cookies, 0, sizeof(cookies));
> +	memset(addrs, 0, sizeof(addrs));
> +
> +	info.tracing_multi.ids = ptr_to_u64(ids);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260629143844.862369-3-jolsa@kernel.org?part=1

  reply	other threads:[~2026-06-29 14:52 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 [this message]
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
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=20260629145215.699B21F000E9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox