From: Jiri Olsa <olsajiri@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCHv4 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests
Date: Wed, 1 Jul 2026 13:31:18 +0200 [thread overview]
Message-ID: <akT6hnLyJpFd-QLV@krava> (raw)
In-Reply-To: <20260629213407.11FB61F000E9@smtp.kernel.org>
On Mon, Jun 29, 2026 at 09:34:06PM +0000, sashiko-bot@kernel.org wrote:
SNIP
> > +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 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_addrs");
>
> [Severity: Medium]
> Will this test actually return -EFAULT?
>
> By zeroing out the info struct before these checks, the mandatory ids
> pointer is left as NULL while count is non-zero. If the kernel validation
> logic eagerly rejects the missing ids array with -EINVAL before reaching
> the -EFAULT paths, won't this assertion fail?
there's no such eager reject in bpf_tracing_multi_link_fill_link_info,
the test passes
jirka
next prev parent reply other threads:[~2026-07-01 11:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 21:22 [PATCHv4 bpf-next 0/3] bpf: tracing_multi link info support Jiri Olsa
2026-06-29 21:22 ` [PATCHv4 bpf-next 1/3] bpf: Add " Jiri Olsa
2026-06-29 21:22 ` [PATCHv4 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests Jiri Olsa
2026-06-29 21:34 ` sashiko-bot
2026-07-01 11:31 ` Jiri Olsa [this message]
2026-06-29 21:22 ` [PATCHv4 bpf-next 3/3] bpftool: Add tracing_multi link info output Jiri Olsa
2026-06-29 21:33 ` sashiko-bot
2026-07-01 11:31 ` Jiri Olsa
2026-07-01 19:43 ` Andrii Nakryiko
2026-07-01 19:50 ` [PATCHv4 bpf-next 0/3] bpf: tracing_multi link info support patchwork-bot+netdevbpf
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=akT6hnLyJpFd-QLV@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