From: Pu Lehui <pulehui@huawei.com>
To: <sashiko-reviews@lists.linux.dev>, Chen Pei <cp0613@linux.alibaba.com>
Cc: <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 2/2] selftests/bpf: Enable gotox tests for riscv64
Date: Mon, 28 Sep 2026 12:04:43 +0800 [thread overview]
Message-ID: <d4591f24-a3fa-48b2-82db-bc78f933d516@huawei.com> (raw)
In-Reply-To: <20260928023109.5C1B21F000FF@smtp.kernel.org>
On 2026/9/28 10:31, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] bpf: missing architecture guards for riscv64 gotox tests
> --
>
> commit 1d33b2e23d145afdb7fdcec7bed2452e5b940956
> Author: Chen Pei <cp0613@linux.alibaba.com>
>
> selftests/bpf: Enable gotox tests for riscv64
>
> This commit adds riscv64 to the architecture whitelist in verifier_gotox.c
> because the JIT now supports the gotox instruction and jump tables.
>
>> diff --git a/tools/testing/selftests/bpf/progs/verifier_gotox.c b/tools/testing/selftests/bpf/progs/verifier_gotox.c
>> index f5a9878c7b8d4..96a9d914930ee 100644
>> --- a/tools/testing/selftests/bpf/progs/verifier_gotox.c
>> +++ b/tools/testing/selftests/bpf/progs/verifier_gotox.c
>> @@ -6,7 +6,9 @@
>> #include "bpf_misc.h"
>> #include "../../../include/linux/filter.h"
>>
>> -#if defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_powerpc)
>> +#if defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64) || \
>> + defined(__TARGET_ARCH_powerpc) || \
>> + (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64)
>
> [Severity: Low]
> Are there other files that need their architecture guards updated for riscv64
> gotox tests to prevent a regression in test coverage?
>
> For example, tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c has:
>
> #if defined(__x86_64__) || defined(__powerpc__) || defined(__aarch64__)
> static int map_create(__u32 map_type, __u32 max_entries)
> {
> ...
>
> This skips the bpf_insn_array test suite on riscv64, which heavily exercises
> the gotox jump table logic.
>
> Similarly, tools/testing/selftests/bpf/progs/compute_live_registers.c has:
>
> #if defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)
>
> SEC("socket")
> __log_level(2)
> __msg("2: .1........ (07) r1 += 8")
> __msg("3: .1........ (79) r2 = *(u64 *)(r1 +0)")
> __msg("4: ..2....... (b7) r3 = 1")
> __msg("5: ..23...... (b7) r4 = 2")
> __msg("6: ..234..... (0d) gotox r2")
> ...
>
> This prevents the gotox liveness tracking tests from being compiled and run
> on riscv64.
>
> Should these architecture guards also be updated to ensure comprehensive test
> coverage for the newly introduced JIT feature on riscv64?
>
> [ ... ]
>
yah, should go with bpf_insn_array and compute_live_registers testcases
next prev parent reply other threads:[~2026-09-28 4:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 2:21 [PATCH bpf-next v2 0/2] bpf, riscv: Add support for indirect jumps Chen Pei
2026-09-28 2:21 ` [PATCH bpf-next v2 1/2] " Chen Pei
2026-09-28 4:02 ` Pu Lehui
2026-09-28 2:21 ` [PATCH bpf-next v2 2/2] selftests/bpf: Enable gotox tests for riscv64 Chen Pei
2026-09-28 2:31 ` sashiko-bot
2026-09-28 4:04 ` Pu Lehui [this message]
2026-09-28 6:08 ` Chen Pei
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=d4591f24-a3fa-48b2-82db-bc78f933d516@huawei.com \
--to=pulehui@huawei.com \
--cc=bpf@vger.kernel.org \
--cc=cp0613@linux.alibaba.com \
--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