From: Vineet Gupta <vineet.gupta@linux.dev>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 3/3] selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc
Date: Mon, 24 Aug 2026 14:30:57 -0700 [thread overview]
Message-ID: <d94a8330-79d4-485d-ae46-cc93c0ceac5e@linux.dev> (raw)
In-Reply-To: <20260824211401.3C3D91F000E9@smtp.kernel.org>
On 8/24/26 2:14 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The newly added `#ifdef __BPF_FEATURE_ADDR_SPACE_CAST` guard unintentionally drops 5 arena tests from the default test_progs flavour for clang.
> --
>
> --- Patch [3]: [PATCH bpf-next v2 3/3] selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc ---
> commit ad6608dfd47ddd6a7068cdc6e0e6d467ec3558b8
> Author: Vineet Gupta <vineet.gupta@linux.dev>
>
> selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc
>
> This commit relaxes clang-only checks in BPF selftests by adding specific
> feature checks like __BPF_FEATURE_LDSX to allow building under bpf-gcc.
> It also wraps arena tests with __BPF_FEATURE_ADDR_SPACE_CAST to skip them
> on bpf-gcc.
>
>> diff --git a/tools/testing/selftests/bpf/progs/verifier_ldsx.c b/tools/testing/selftests/bpf/progs/verifier_ldsx.c
>> index e58ea69e38549..75762e11b443f 100644
>> --- a/tools/testing/selftests/bpf/progs/verifier_ldsx.c
>> +++ b/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> [ ... ]
>> @@ -263,6 +257,14 @@ __naked void ldsx_ctx_8(void)
>> : __clobber_all);
>> }
>>
>> +#ifdef __BPF_FEATURE_ADDR_SPACE_CAST
>> +
>> +struct {
>> + __uint(type, BPF_MAP_TYPE_ARENA);
>> + __uint(map_flags, BPF_F_MMAPABLE);
>> + __uint(max_entries, 1);
>> +} arena SEC(".maps");
>> +
> [Severity: Medium]
> Does this inner guard unintentionally drop the arena tests for clang under
> the default test_progs flavour?
>
> The commit message notes that clang only defines feature macros like this at
> -mcpu=v4, but successfully assembles the inline asm at -mcpu=v3. Because of
> this, you kept the clang version checks on the file's main guard to avoid
> removing tests where they run today.
>
> However, since this inner guard lacks a || __clang_major__ >= 18 fallback,
> clang at -mcpu=v3 evaluates this as false,
Is this just by review or was it actually tested - I'm guessing former ...
> silently dropping the arena map
> and the subsequent 5 arena tests from the default test flavour.
... since clang (at least recent ones, I testet recent and a local jan
build) defines this for all -mcpus
So this is invalid claim.
Thx,
-Vineet
next prev parent reply other threads:[~2026-08-24 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 21:01 [PATCH bpf-next v2 0/3] selftests/bpf: unblock bpf-gcc test coverage Vineet Gupta
2026-08-24 21:01 ` [PATCH bpf-next v2 1/3] selftests/bpf: name the remaining placeholder programs dummy_test [NFC] Vineet Gupta
2026-08-24 21:01 ` [PATCH bpf-next v2 2/3] selftests/bpf: report placeholder tests as SKIP, not OK Vineet Gupta
2026-08-24 21:42 ` bot+bpf-ci
2026-08-24 21:01 ` [PATCH bpf-next v2 3/3] selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc Vineet Gupta
2026-08-24 21:14 ` sashiko-bot
2026-08-24 21:30 ` Vineet Gupta [this message]
2026-08-26 16:40 ` [PATCH bpf-next v2 0/3] selftests/bpf: unblock bpf-gcc test coverage 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=d94a8330-79d4-485d-ae46-cc93c0ceac5e@linux.dev \
--to=vineet.gupta@linux.dev \
--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 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.