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 bpf-next v2 5/5] selftests/bpf: verify zext_dst annotations for various instructions
Date: Fri, 31 Jul 2026 21:24:44 -0700	[thread overview]
Message-ID: <2f158b4b9df959e604edc14603a23782ffed9bed.camel@gmail.com> (raw)
In-Reply-To: <20260801013321.6ABC51F00AC4@smtp.kernel.org>

On Sat, 2026-08-01 at 01:33 +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Missing bpf_testmod dependency check in test_verifier_zext, causing spurious test failures when the module is not loaded.
> --
> 
> --- Patch [5]: [PATCH bpf-next v2 5/5] selftests/bpf: verify zext_dst annotations for various instructions ---
> commit 9e656f5e6b04a69526327df6f70d8c362d02d3d4
> Author: Eduard Zingerman <eddyz87@gmail.com>
> 
> selftests/bpf: verify zext_dst annotations for various instructions
> 
> This commit adds a suite of selftests to verify the verifier's zero extension
> behavior across various instructions and state pruning scenarios. It covers
> cases like 32-bit and 64-bit operations, atomic instructions, kfunc parameters,
> and CFG edge cases.
> 
> > diff --git a/tools/testing/selftests/bpf/prog_tests/verifier.c b/tools/testing/selftests/bpf/prog_tests/verifier.c
> > index be97f6887f0e7..fba562c819691 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/verifier.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/verifier.c
> [ ... ]
> > @@ -277,6 +278,7 @@ void test_irq(void)			      { RUN(irq); }
> >  void test_verifier_mtu(void)		      { RUN(verifier_mtu); }
> >  void test_verifier_jit_inline(void)               { RUN(verifier_jit_inline); }
> >  void test_verifier_ctx_ptr_param(void)       { RUN(verifier_ctx_ptr_param); }
> > +void test_verifier_zext(void)                 { RUN_TESTS(verifier_zext); }
> 
> [Severity: Medium]
> Since verifier_zext.c calls bpf_kfunc_call_test4 (an extern kfunc from
> bpf_testmod), will this test fail spuriously if bpf_testmod is not loaded?
> 
> Should this check env.has_testmod and call test__skip() before RUN_TESTS
> to gracefully skip the test when the module is unavailable?

Idk, bpf_kfunc_call_test4() is used by the test progs/kfunc_call_test.c
prog_tests/kfunc_call.c, which itself does not check for env.has_testmod.
I don't think we enforce this rigorously, nor that we should.

      reply	other threads:[~2026-08-01  4:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-01  1:09 [PATCH bpf-next v2 0/5] bpf: infer zext_dst based on static register liveness analysis Eduard Zingerman
2026-08-01  1:09 ` [PATCH bpf-next v2 1/5] bpf: do not print a newline after disassembly in bpf_verbose_insn() Eduard Zingerman
2026-08-01  1:09 ` [PATCH bpf-next v2 2/5] bpf: track upper 32-bit register halves' liveness in compute_live_registers() Eduard Zingerman
2026-08-01  1:35   ` sashiko-bot
2026-08-01  4:40     ` Eduard Zingerman
2026-08-01  1:09 ` [PATCH bpf-next v2 3/5] bpf: infer zext_dst based on static register liveness analysis Eduard Zingerman
2026-08-01  1:42   ` sashiko-bot
2026-08-01  5:41     ` Eduard Zingerman
2026-08-01  1:09 ` [PATCH bpf-next v2 4/5] bpf: simplify the bpf_is_reg64() Eduard Zingerman
2026-08-01  1:34   ` sashiko-bot
2026-08-01  1:09 ` [PATCH bpf-next v2 5/5] selftests/bpf: verify zext_dst annotations for various instructions Eduard Zingerman
2026-08-01  1:33   ` sashiko-bot
2026-08-01  4:24     ` Eduard Zingerman [this message]

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=2f158b4b9df959e604edc14603a23782ffed9bed.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