BPF List
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCHv2 bpf-next 4/6] selftests/bpf: Add uprobe_multi path_fd test
Date: Thu, 11 Jun 2026 11:37:16 +0200	[thread overview]
Message-ID: <aiqBzKbxqi1nN1lk@krava> (raw)
In-Reply-To: <20260610145046.1D3D11F00893@smtp.kernel.org>

On Wed, Jun 10, 2026 at 02:50:45PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] The selftest references a nonexistent struct member `path_fd` and an undeclared flag `BPF_F_UPROBE_MULTI_PATH_FD`, which will cause a compilation error.
> --
> 
> commit e5937d581d08ece9671b371d37fb6cd0d497b692
> Author: Jiri Olsa <jolsa@kernel.org>
> 
> selftests/bpf: Add uprobe_multi path_fd test
> 
> This commit adds a uprobe_multi link API selftest that opens /proc/self/exe
> and passes the resulting descriptor through opts.uprobe_multi.path_fd with
> BPF_F_UPROBE_MULTI_PATH_FD set.
> 
> > 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;
> 
> [ ... ]
> 
> > +	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 this code reference an API that hasn't been introduced yet?
> 
> The struct field path_fd is not a valid member of uprobe_multi within
> struct bpf_link_create_opts in the libbpf headers, and the
> BPF_F_UPROBE_MULTI_PATH_FD macro is undeclared.
> 
> Because the patch doesn't include the corresponding kernel or libbpf
> changes, it looks like this will cause a compilation error.

compiles fine, it was introduced in:
  bpf: Add support to specify uprobe_multi target via file descriptor

jirka

  reply	other threads:[~2026-06-11  9:37 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 [this message]
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
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=aiqBzKbxqi1nN1lk@krava \
    --to=olsajiri@gmail.com \
    --cc=bpf@vger.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