From: sashiko-bot@kernel.org
To: "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 02:31:08 +0000 [thread overview]
Message-ID: <20260928023109.5C1B21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928022109.1093-3-cp0613@linux.alibaba.com>
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?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928022109.1093-1-cp0613@linux.alibaba.com?part=2
next prev parent reply other threads:[~2026-09-28 2:31 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 [this message]
2026-09-28 4:04 ` Pu Lehui
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=20260928023109.5C1B21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--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