From: sashiko-bot@kernel.org
To: "Jiri Olsa" <jolsa@kernel.org>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCHv2 bpf-next 5/6] selftests/bpf: Add uprobe_multi path_fd fail tests
Date: Wed, 10 Jun 2026 14:48:21 +0000 [thread overview]
Message-ID: <20260610144822.32E831F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260610143627.804790-6-jolsa@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch references an undefined struct member `path_fd` and an undeclared macro `BPF_F_UPROBE_MULTI_PATH_FD`, which will cause compilation to fail.
--
commit 0e3f7d4f9ed46a64d02a1c29acb4f8e2215cb7c0
Author: Jiri Olsa <jolsa@kernel.org>
selftests/bpf: Add uprobe_multi path_fd fail tests
This commit adds tests to the attach_api_fails suite to verify that
invalid setups using the new path_fd feature in uprobe_multi fail as
expected.
> diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c b/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
> --- a/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
> +++ b/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
> @@ -536,7 +536,37 @@ static void test_attach_api_fails(void)
[ ... ]
> - ASSERT_EQ(link_fd, -EINVAL, "pid_is_wrong");
> + if (!ASSERT_EQ(link_fd, -EINVAL, "pid_is_wrong"))
> + goto cleanup;
> +
> + /* wrong path_fd */
> + LIBBPF_OPTS_RESET(opts,
> + .uprobe_multi.path = NULL,
> + .uprobe_multi.path_fd = -1,
> + .uprobe_multi.flags = BPF_F_UPROBE_MULTI_PATH_FD,
[Severity: Low]
Does this commit depend on a missing prerequisite patch?
The path_fd member and BPF_F_UPROBE_MULTI_PATH_FD macro do not appear to be
defined in the current tree's bpf_link_create_opts struct or UAPI headers,
which will cause a compilation failure here.
> + .uprobe_multi.offsets = (unsigned long *)&offset,
> + .uprobe_multi.cnt = 1,
> + );
> +
> + link_fd = bpf_link_create(prog_fd, 0, BPF_TRACE_UPROBE_MULTI, &opts);
> + if (!ASSERT_ERR(link_fd, "link_fd"))
> + goto cleanup;
> + if (!ASSERT_EQ(link_fd, -EBADF, "path_fd_is_wrong"))
> + goto cleanup;
> +
> + /* path and path_fd both set with BPF_F_UPROBE_MULTI_PATH_FD flag */
> + LIBBPF_OPTS_RESET(opts,
> + .uprobe_multi.path = path,
> + .uprobe_multi.path_fd = 1,
> + .uprobe_multi.flags = BPF_F_UPROBE_MULTI_PATH_FD,
> + .uprobe_multi.offsets = (unsigned long *)&offset,
> + .uprobe_multi.cnt = 1,
> + );
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260610143627.804790-6-jolsa@kernel.org?part=1
next prev parent reply other threads:[~2026-06-10 14:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 14:36 [PATCHv2 bpf-next 0/6] bpf: Allow uprobe_multi binary specified by file descriptor Jiri Olsa
2026-06-10 14:36 ` [PATCHv2 bpf-next 1/6] bpf: Use user_path_at for path resolution in uprobe_multi Jiri Olsa
2026-06-10 14:52 ` sashiko-bot
2026-06-11 9:37 ` Jiri Olsa
2026-06-10 14:36 ` [PATCHv2 bpf-next 2/6] bpf: Add support to specify uprobe_multi target via file descriptor Jiri Olsa
2026-06-10 15:51 ` bot+bpf-ci
2026-06-11 9:37 ` Jiri Olsa
2026-06-10 14:36 ` [PATCHv2 bpf-next 3/6] libbpf: Add path_fd to struct bpf_link_create_opts Jiri Olsa
2026-06-10 14:50 ` sashiko-bot
2026-06-11 9:37 ` Jiri Olsa
2026-06-10 14:36 ` [PATCHv2 bpf-next 4/6] selftests/bpf: Add uprobe_multi path_fd test Jiri Olsa
2026-06-10 14:50 ` sashiko-bot
2026-06-11 9:37 ` Jiri Olsa
2026-06-10 14:36 ` [PATCHv2 bpf-next 5/6] selftests/bpf: Add uprobe_multi path_fd fail tests Jiri Olsa
2026-06-10 14:48 ` sashiko-bot [this message]
2026-06-11 9:37 ` Jiri Olsa
2026-06-10 14:36 ` [PATCHv2 bpf-next 6/6] selftests/bpf: Fix typo in verify_umulti_link_info 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=20260610144822.32E831F00893@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