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 5/7] selftests/bpf: Add uprobe_multi path_fd test
Date: Thu, 11 Jun 2026 11:52:22 +0000	[thread overview]
Message-ID: <20260611115223.35A9E1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260611114230.950379-6-jolsa@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The selftest uses a non-existent structure member `opts.uprobe_multi.path_fd` and an undefined macro `BPF_F_UPROBE_MULTI_PATH_FD`, which will cause a build failure.
--

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

selftests/bpf: Add uprobe_multi path_fd test

This patch adds a uprobe_multi link API selftest. The test opens
/proc/self/exe and passes the descriptor through opts.uprobe_multi.path_fd
using the BPF_F_UPROBE_MULTI_PATH_FD flag.

> diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c b/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
> index 56cbea280fbd2..ffcf3c92f0474 100644
> --- a/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c
> +++ b/tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c

[ ... ]

> @@ -757,6 +758,65 @@ static void test_link_api(void)
>  	__test_link_api(&child);
>  }
>  
> +static void test_link_api_path_fd(void)
> +{
> +	LIBBPF_OPTS(bpf_link_create_opts, opts);
> +	const char *resolve_path = "/proc/self/exe";
> +	int prog_fd, link_fd = -1, path_fd = -1;
> +	struct uprobe_multi *skel = NULL;

[ ... ]

> +	path_fd = open(resolve_path, O_RDONLY);
> +	if (!ASSERT_GE(path_fd, 0, "path_fd"))
> +		goto cleanup;
> +
> +	opts.uprobe_multi.path_fd = path_fd;
> +	opts.uprobe_multi.offsets = offsets;
> +	opts.uprobe_multi.cnt = ARRAY_SIZE(syms);
> +	opts.uprobe_multi.flags = BPF_F_UPROBE_MULTI_PATH_FD;

[Severity: Low]
Does the uprobe_multi structure in bpf_link_create_opts actually have a
path_fd member? It appears this code references an undefined struct member
along with an undefined macro BPF_F_UPROBE_MULTI_PATH_FD. Will this cause
a build failure?

> +
> +	skel = uprobe_multi__open_and_load();

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

  reply	other threads:[~2026-06-11 11:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 11:42 [PATCHv3 bpf-next 0/7] bpf: Allow uprobe_multi binary specified by file descriptor Jiri Olsa
2026-06-11 11:42 ` [PATCHv3 bpf-next 1/7] bpf: Guard __get_user acesss with access_ok for uprobe_multi data Jiri Olsa
2026-06-11 11:55   ` sashiko-bot
2026-06-11 11:42 ` [PATCHv3 bpf-next 2/7] bpf: Use user_path_at for path resolution in uprobe_multi Jiri Olsa
2026-06-11 11:42 ` [PATCHv3 bpf-next 3/7] bpf: Add support to specify uprobe_multi target via file descriptor Jiri Olsa
2026-06-11 11:42 ` [PATCHv3 bpf-next 4/7] libbpf: Add path_fd to struct bpf_link_create_opts Jiri Olsa
2026-06-11 11:53   ` sashiko-bot
2026-06-11 11:42 ` [PATCHv3 bpf-next 5/7] selftests/bpf: Add uprobe_multi path_fd test Jiri Olsa
2026-06-11 11:52   ` sashiko-bot [this message]
2026-06-11 11:42 ` [PATCHv3 bpf-next 6/7] selftests/bpf: Add uprobe_multi path_fd fail tests Jiri Olsa
2026-06-11 11:54   ` sashiko-bot
2026-06-11 11:42 ` [PATCHv3 bpf-next 7/7] 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=20260611115223.35A9E1F00893@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