BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH RFC bpf-next 3/6] selftests/bpf: test cases for loop hierarchy computation
Date: Tue, 26 May 2026 04:22:21 -0700	[thread overview]
Message-ID: <d2c217ffaae81022cd323394c3c759a8d36d0549.camel@gmail.com> (raw)
In-Reply-To: <20260526102514.AFE3C1F000E9@smtp.kernel.org>

On Tue, 2026-05-26 at 10:25 +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The expected verifier log output in `fwd_edges_no_loop` incorrectly expects an unconditional jump `(05)` for a conditional jump instruction, which will cause the selftest to fail.
> --
> 
> commit f35c2f4d237eac02dd241fbf85f69d40722f62de
> Author: Eduard Zingerman <eddyz87@gmail.com>
> 
> selftests/bpf: test cases for loop hierarchy computation
> 
> This commit adds test cases covering various branches in bpf_compute_loops
> for loop hierarchy computation. It includes tests for single bounded loops,
> independent loops, nested loops, diamond control flow graphs, and irreducible
> loops.
> 
> > diff --git a/tools/testing/selftests/bpf/progs/verifier_loop_hierarchy.c b/tools/testing/selftests/bpf/progs/verifier_loop_hierarchy.c
> > new file mode 100644
> > index 0000000000000..db26157e3e14a
> > --- /dev/null
> > +++ b/tools/testing/selftests/bpf/progs/verifier_loop_hierarchy.c
> 
> [ ... ]
> 
> > +/* Case C: forward edges, no loops. */
> > +SEC("socket")
> > +__success
> > +__log_level(2)
> > +__msg("          0: {{.*}} (b7) r0 = 1")
> > +__msg("          1: {{.*}} (05) goto pc+2")
> 
> [Severity: Medium]
> Will this test case fail because of a mismatch in the expected verifier log?
> 
> The inline assembly below uses "if r0 > 0 goto 1f;", which is a conditional
> jump. This translates to opcode 0x25 (if r0 > 0x0 goto pc+2), but the __msg
> assertion explicitly expects opcode 0x05 (goto pc+2), which is an
> unconditional jump.

The code is adjusted by constant prop phase.
I'll just the test case to call urandom() and keep conditionals.

[...]

  reply	other threads:[~2026-05-26 11:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  9:30 [PATCH RFC bpf-next 0/6] bpf: better error reporting when verifier hits 1M instructions limit Eduard Zingerman
2026-05-26  9:30 ` [PATCH RFC bpf-next 1/6] bpf: move live registers and scc printout to a standalone function Eduard Zingerman
2026-05-26  9:30 ` [PATCH RFC bpf-next 2/6] bpf: compute loops hierarchy Eduard Zingerman
2026-05-26 10:05   ` bot+bpf-ci
2026-05-26 11:18     ` Eduard Zingerman
2026-05-26 10:07   ` sashiko-bot
2026-05-26  9:30 ` [PATCH RFC bpf-next 3/6] selftests/bpf: test cases for loop hierarchy computation Eduard Zingerman
2026-05-26 10:25   ` sashiko-bot
2026-05-26 11:22     ` Eduard Zingerman [this message]
2026-05-26  9:30 ` [PATCH RFC bpf-next 4/6] bpf: report hot simulated callchains when 1M instructions limit is met Eduard Zingerman
2026-05-26 10:05   ` bot+bpf-ci
2026-05-26 11:24     ` Eduard Zingerman
2026-05-26 10:45   ` sashiko-bot
2026-05-26 11:31     ` Eduard Zingerman
2026-05-26  9:30 ` [PATCH RFC bpf-next 5/6] bpf: report register diff summary for hot callchains Eduard Zingerman
2026-05-26 10:05   ` bot+bpf-ci
2026-05-26 11:11   ` sashiko-bot
2026-05-26 11:36     ` Eduard Zingerman
2026-05-26  9:30 ` [PATCH RFC bpf-next 6/6] selftests/bpf: test budget exhaustion profiling report Eduard Zingerman

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=d2c217ffaae81022cd323394c3c759a8d36d0549.camel@gmail.com \
    --to=eddyz87@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