From: sashiko-bot@kernel.org
To: "Nuoqi Gui" <gnq25@mails.tsinghua.edu.cn>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 2/2] selftests/bpf: add tests for PTR_TO_FLOW_KEYS offset bounds
Date: Sat, 06 Jun 2026 10:57:10 +0000 [thread overview]
Message-ID: <20260606105711.2FD291F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260606-c3-01-v3-v3-2-97c51f592f15@mails.tsinghua.edu.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comment violates BPF subsystem style guidelines.
--
commit e1141f4c391173362f83f08e56c2a4d2bb3f8dfe
Author: Nuoqi Gui <gnq25@mails.tsinghua.edu.cn>
selftests/bpf: add tests for PTR_TO_FLOW_KEYS offset bounds
This commit adds verifier tests for pointer arithmetic on a PTR_TO_FLOW_KEYS
register. It verifies that in-bounds offsets are accepted while out-of-bounds
and variable offsets are appropriately rejected.
> diff --git a/tools/testing/selftests/bpf/progs/verifier_flow_keys.c b/tools/testing/selftests/bpf/progs/verifier_flow_keys.c
> new file mode 100644
> index 0000000000000..d780a36a6e9a9
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/verifier_flow_keys.c
[ ... ]
> + r0 = 0; \
> + exit; \
> +" :
> + : __imm_const(flow_keys, offsetof(struct __sk_buff, flow_keys))
> + : __clobber_all);
> +}
> +
> +/* Equivalent OOB expressed directly in insn->off; this form was always
> + * rejected and is kept to show both forms now share one diagnostic.
> + */
[Severity: Low]
This isn't a bug, but does this multi-line comment follow the BPF subsystem
style guidelines?
The guidelines prefer multi-line comments to have the opening /* on its own
line, with the text starting on the subsequent line.
> +SEC("flow_dissector")
> +__description("flow_keys: OOB via insn->off rejected")
> +__failure __msg("invalid access to flow keys off=4096 size=8")
> +__naked void flow_keys_insn_off_oob(void)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260606-c3-01-v3-v3-0-97c51f592f15@mails.tsinghua.edu.cn?part=2
next prev parent reply other threads:[~2026-06-06 10:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-06 10:50 [PATCH bpf-next v3 0/2] bpf, verifier: fix PTR_TO_FLOW_KEYS constant-offset OOB Nuoqi Gui
2026-06-06 10:50 ` [PATCH bpf-next v3 1/2] bpf, verifier: fold reg->var_off into PTR_TO_FLOW_KEYS bounds check Nuoqi Gui
2026-06-06 11:05 ` sashiko-bot
2026-06-06 20:33 ` Eduard Zingerman
2026-06-06 10:50 ` [PATCH bpf-next v3 2/2] selftests/bpf: add tests for PTR_TO_FLOW_KEYS offset bounds Nuoqi Gui
2026-06-06 10:57 ` sashiko-bot [this message]
2026-06-06 11:32 ` bot+bpf-ci
2026-06-06 20:34 ` Eduard Zingerman
2026-06-07 0:00 ` [PATCH bpf-next v3 0/2] bpf, verifier: fix PTR_TO_FLOW_KEYS constant-offset OOB 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=20260606105711.2FD291F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=gnq25@mails.tsinghua.edu.cn \
--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.