All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiri Olsa" <jolsa@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests
Date: Sun, 21 Jun 2026 20:53:50 +0000	[thread overview]
Message-ID: <20260621205350.ED2741F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260621204524.61067-3-jolsa@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incorrect assertion failure message tag for invalid `addrs` pointer test.
--

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

selftests/bpf: Add tracing_multi link info tests

This commit adds new tests for tracing_multi link info. The tests follow the
existing logic used for kprobe_multi and uprobe_multi tests.

> 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..969f04ee9ac6a 100644
> --- a/tools/testing/selftests/bpf/prog_tests/fill_link_info.c
> +++ b/tools/testing/selftests/bpf/prog_tests/fill_link_info.c

[ ... ]

> +static void verify_tracing_multi_invalid_user_buffer(int fd, const struct tmulti_target *targets)
> +{
> +	__u32 ids[TRACING_MULTI_CNT] = {};
> +	struct bpf_link_info info;
> +	__u32 len = sizeof(info);
> +	int err, i;

[ ... ]

> +	/* Invalid cookies pointer -> EFAULT */
> +	memset(&info, 0, sizeof(info));
> +	info.tracing_multi.cookies = 0x1;
> +	info.tracing_multi.count = TRACING_MULTI_CNT;
> +	err = bpf_link_get_info_by_fd(fd, &info, &len);
> +	ASSERT_EQ(err, -EFAULT, "tracing_multi.bad_cookies");
> +
> +	/* Invalid addrs pointer -> EFAULT */
> +	memset(&info, 0, sizeof(info));
> +	info.tracing_multi.addrs = 0x1;
> +	info.tracing_multi.count = TRACING_MULTI_CNT;
> +	err = bpf_link_get_info_by_fd(fd, &info, &len);
> +	ASSERT_EQ(err, -EFAULT, "tracing_multi.bad_cookies");

[Severity: Low]
This isn't a bug, but is this tag a copy-paste error? The comment mentions
testing an invalid addrs pointer, but the assertion in
verify_tracing_multi_invalid_user_buffer() uses the
"tracing_multi.bad_cookies" tag rather than something like
"tracing_multi.bad_addrs".

> +}

[ ... ]

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

  reply	other threads:[~2026-06-21 20:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-21 20:45 [PATCH bpf-next 0/3] bpf: tracing_multi link info support Jiri Olsa
2026-06-21 20:45 ` [PATCH bpf-next 1/3] bpf: Add " Jiri Olsa
2026-06-21 20:45 ` [PATCH bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests Jiri Olsa
2026-06-21 20:53   ` sashiko-bot [this message]
2026-06-21 21:31   ` bot+bpf-ci
2026-06-21 20:45 ` [PATCH bpf-next 3/3] bpftool: Add tracing_multi link info output Jiri Olsa
2026-06-21 20:56   ` sashiko-bot

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=20260621205350.ED2741F000E9@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.