From: sashiko-bot@kernel.org
To: "Eduard Zingerman" <eddyz87@gmail.com>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 6/7] selftests/bpf: harden __msg patterns for step_movsx_bounds_on_line
Date: Wed, 14 Oct 2026 06:37:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-170874@kernel.org> (raw)
In-Reply-To: <20261013-scev-minimal-v3-followups-v2-6-6d9d61965486@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf/selftests: missing closing parenthesis in regex pattern allows test to pass incorrectly
--
commit 0cba693bc29a347d1c334a9ea3f7803ac49d1bab
Author: Eduard Zingerman <eddyz87@gmail.com>
selftests/bpf: harden __msg patterns for step_movsx_bounds_on_line
The commit drops the __no_step annotations and replaces them with full
expected logs to prevent {{.*}} from matching and hiding step=... logging.
> diff --git a/tools/testing/selftests/bpf/progs/verifier_bounds_step.c b/tools/testing/selftests/bpf/progs/verifier_bounds_step.c
> index c9ee1c7efcbb8..d824a5d48a394 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_bounds_step.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_bounds_step.c
> @@ -338,9 +338,9 @@ SEC("socket")
> __success __log_level(2)
> __msg("r1 = (s16)r0 {{.*}}R1=scalar(id={{[0-9]+}},smin=smin32=0,smax=umax=smax32=umax32=168,{{.*}}step=0+24)")
> __msg("r2 = (s16)r0 {{.*}}R2=scalar(smin=smin32=-24,smax=smax32=144,{{.*}}step=0+24)")
> -__msg("r3 = (s8)r0 {{.*}}R3=scalar(smin=smin32=-128,smax=smax32=127)") __no_step
> +__msg("r3 = (s8)r0 {{.*}}R3=scalar(smin=smin32=-128,smax=smax32=127)")
[Severity: Low]
Is this string literal missing a closing parenthesis after 127?
Since the explicit __no_step check was removed, and the test_loader uses
unanchored regex matching for patterns containing {{.*}}, matching as a
prefix allows the test to silently succeed even if the verifier incorrectly
appends step=... to the log.
Should the pattern be 127)) to strictly match the end of the scalar state
and preserve the intended test coverage?
> __msg("w4 = (s16)w1 {{.*}}R4=scalar(id={{[0-9]+}},smin=smin32=0,smax=umax=smax32=umax32=168,{{.*}}step=0+24)")
> -__msg("w5 = (s8)w1 {{.*}}R5=scalar({{.*}}smin32=-128,smax32=127,{{.*}})") __no_step
> +__msg("w5 = (s8)w1 {{.*}}R5=scalar({{.*}}smin32=-128,smax32=127,var_off=(0x0; 0xffffffff))")
> __naked void step_movsx_bounds_on_line(void)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-scev-minimal-v3-followups-v2-0-6d9d61965486@gmail.com?part=6
next prev parent reply other threads:[~2026-10-14 6:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 6:24 [PATCH bpf-next v2 0/7] bpf: follow-up for scalar evolution series Eduard Zingerman
2026-10-14 6:24 ` [PATCH bpf-next v2 1/7] bpf: more precise stack liveness effects for global func params Eduard Zingerman
2026-10-14 6:24 ` [PATCH bpf-next v2 2/7] bpf: avoid duplicate declaration for BPF_SCEV_REGS_NUM Eduard Zingerman
2026-10-14 6:24 ` [PATCH bpf-next v2 3/7] bpf: reg_bounds_sync() comment fixup Eduard Zingerman
2026-10-14 6:24 ` [PATCH bpf-next v2 4/7] selftests/bpf: stack effects of scalar/dynptr global subprog params Eduard Zingerman
2026-10-14 6:24 ` [PATCH bpf-next v2 5/7] selftests/bpf: harden __msg pattern for global_callee_btf_arg Eduard Zingerman
2026-10-14 6:24 ` [PATCH bpf-next v2 6/7] selftests/bpf: harden __msg patterns for step_movsx_bounds_on_line Eduard Zingerman
2026-10-14 6:37 ` sashiko-bot [this message]
2026-10-14 6:24 ` [PATCH bpf-next v2 7/7] selftests/bpf: BPF_F_ANY_ALIGNMENT for byte_array_size_spanning() Eduard Zingerman
2026-10-14 22:30 ` [PATCH bpf-next v2 0/7] bpf: follow-up for scalar evolution series 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=sashiko-outbox-170874@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=eddyz87@gmail.com \
--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