From: Eduard Zingerman <eddyz87@gmail.com>
To: Vineet Gupta <vineet.gupta@linux.dev>, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 3/3] selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc
Date: Mon, 24 Aug 2026 12:04:10 -0700 [thread overview]
Message-ID: <08e71a3a64aa07fa1b10802502875fbfea483f5d.camel@gmail.com> (raw)
In-Reply-To: <20260821201316.1059129-4-vineet.gupta@linux.dev>
On Fri, 2026-08-21 at 13:13 -0700, Vineet Gupta wrote:
> A bunch of tests are gated behind clang only __clang_major__ and thus
> fail to build under BPF_GCC. What's worse is, before the prev patch they
> were also declared as passing/OK.
>
> This need not be because (a) bpf-gcc does support the feature in codegen
> and (b) also advertises correctly with feature support preprocessor macros:
>
> __BPF_FEATURE_BSWAP, __BPF_FEATURE_GOTOL, __BPF_FEATURE_LDSX,
> __BPF_FEATURE_MOVSX, __BPF_FEATURE_SDIV_SMOD, __BPF_FEATURE_ST
>
> So loosen up the gates to also add specific feature check.
> clang >=18 has to stay, despite it being true for so long: clang only
> defines __BPF_FEATURE_MOVSX and friends at -mcpu=v4, but assembles the
> inline asm at -mcpu=v3 too, and dropping it would remove these tests from
> the default test_progs flavour where they run today.
Huh, that's unfortunate.
>
> Since bpf-gcc doesn't support addr_space_cast, wrap the corresponding
> tests under __BPF_FEATURE_ADDR_SPACE_CAST to skip under it.
> And also move the map under that guard so that a bpf-gcc object does not
> declare an arena map that no program in it references.
>
> Recovered under BPF_GCC (programs per object, was 1 dummy each):
>
> verifier_sdiv 80
> verifier_movsx 17
> verifier_ldsx 14 (20 under clang; 5 arena tests,
> kfunc_root and the arena map stay clang-only)
> verifier_bswap 13
>
> CAN_USE_GOTOL and CAN_USE_BPF_ST only gate parts of a file, so those were
> not dummies to begin with:
>
> compute_live_registers 17 -> 19 (21 under clang)
> verifier_gotol 1 -> 2
> verifier_iterating_callbacks 34 -> 35
>
> The clang builds are unchanged: verifier_ldsx still emits 20 programs under
> the cpuv4 flavour.
>
> One thing left alone: verifier_load_acquire.c and verifier_store_release.c
> stay clang-only, and their gates are correct as gas doesn't implement
> those (experimental -mxbpf not implemented at all). FWIW LLVM groups
> those under -mcpu=v4 and defines __BPF_FEATURE_LOAD_ACQ_STORE_REL there.
>
> Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev>
> ---
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
I'll wait for v2 and apply.
...
prev parent reply other threads:[~2026-08-24 19:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 20:13 [PATCH bpf-next 0/3] selftests/bpf: unblock bpf-gcc test coverage Vineet Gupta
2026-08-21 20:13 ` [PATCH bpf-next 1/3] selftests/bpf: name the remaining placeholder programs dummy_test [NFC] Vineet Gupta
2026-08-24 18:46 ` Eduard Zingerman
2026-08-21 20:13 ` [PATCH bpf-next 2/3] selftests/bpf: report placeholder tests as SKIP, not OK Vineet Gupta
2026-08-21 21:00 ` bot+bpf-ci
2026-08-21 23:48 ` Vineet Gupta
2026-08-24 18:53 ` Eduard Zingerman
2026-08-21 20:13 ` [PATCH bpf-next 3/3] selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc Vineet Gupta
2026-08-21 20:19 ` sashiko-bot
2026-08-21 23:38 ` Vineet Gupta
2026-08-24 19:04 ` 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=08e71a3a64aa07fa1b10802502875fbfea483f5d.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=vineet.gupta@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.