On Mon, Nov 3, 2025 at 10:14 AM Eduard Zingerman <[email protected]> wrote:
>
> On Mon, 2025-11-03 at 14:31 +0800, KaFai Wan wrote:
> > Add test cases to verify the correctness of the BPF verifier's branch 
> > analysis
> > when conditional jumps are performed on the same scalar register. And make 
> > sure
> > that JGT does not trigger verifier BUG.
> >
> > Signed-off-by: KaFai Wan <[email protected]>
> > ---
>
> Thank you for adding these.
>
> Acked-by: Eduard Zingerman <[email protected]>
>
> (but a comment needs a fix)
>
> [...]
>
> > +SEC("socket")
> > +__description("jset on same register, scalar value unknown branch 3")
> > +__msg("4: (b7) r0 = 0 {{.*}} R0=0")
> > +__msg("6: (b7) r0 = 1 {{.*}} R0=1")
> > +__success __log_level(2)
> > +__flag(BPF_F_TEST_REG_INVARIANTS)
> > +__naked void jset_on_same_register_5(void *ctx)
> > +{
> > +     asm volatile("                  \
> > +     /* range [-1;-1] */             \
>                      ^^
>    Typo, should be [-1;1].

Eagle eye.

Fixed while applying.

Reply via email to