BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pu Lehui" <pulehui@huaweicloud.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 3/3] selftests/bpf: Enable stack argument tests for RV64
Date: Sat, 05 Sep 2026 09:03:20 +0000	[thread overview]
Message-ID: <20260905090320.8AA9E1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260905085857.14143-4-pulehui@huaweicloud.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing architecture guard update for stack arguments in `tools/testing/selftests/bpf/progs/exceptions.c`.
--

commit 7ea892ecb0a3b4c34ad8033c7d6de54aaa01a98d
Author: Feng Jiang <jiangfeng@kylinos.cn>

selftests/bpf: Enable stack argument tests for RV64

Enable the stack argument selftests for RV64. The riscv guard is
restricted to __riscv_xlen == 64 since stack arguments are only
supported by the RV64 JIT. Keep the __BPF_FEATURE_STACK_ARGUMENT 
gate, defined by clang with BPF stack argument support [1].

[1] https://github.com/llvm/llvm-project/pull/189060

> diff --git a/tools/testing/selftests/bpf/progs/stack_arg.c b/tools/testing/selftests/bpf/progs/stack_arg.c
> index 944e3bb603e7e..3e9ed37c57bb9 100644
> --- a/tools/testing/selftests/bpf/progs/stack_arg.c
> +++ b/tools/testing/selftests/bpf/progs/stack_arg.c
> @@ -21,7 +21,8 @@ struct {
>  
>  int timer_result;
>  
> -#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) && \
> +#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64) || \
> +	(defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64)) && \
>  	defined(__BPF_FEATURE_STACK_ARGUMENT)
>  
>  const volatile bool has_stack_arg = true;

[Severity: Low]
Does tools/testing/selftests/bpf/progs/exceptions.c also need this architecture
guard update?

The has_stack_arg macro in exceptions.c enables stack-argument-specific
exception tests. The RV64 architecture check seems to be omitted from that file
during this refactoring:

tools/testing/selftests/bpf/progs/exceptions.c:
#if (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64)) \
	&& defined(__BPF_FEATURE_STACK_ARGUMENT)

const volatile bool has_stack_arg = true;

When exception support is eventually added for the RV64 JIT, the stack argument
portions of the exceptions selftest will silently fail to enable, reducing test
coverage.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260905085857.14143-1-pulehui@huaweicloud.com?part=3

  reply	other threads:[~2026-09-05  9:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05  8:58 [PATCH bpf-next v5 0/3] Add bpf stack arguments support for RV64 Pu Lehui
2026-09-05  8:58 ` [PATCH bpf-next v5 1/3] riscv, bpf: Remap BPF_REG_0 and RV_REG_TCC Pu Lehui
2026-09-05  9:42   ` bot+bpf-ci
2026-09-05  9:56     ` Pu Lehui
2026-09-05  8:58 ` [PATCH bpf-next v5 2/3] riscv, bpf: Add BPF stack arguments support for RV64 JIT Pu Lehui
2026-09-05  8:58 ` [PATCH bpf-next v5 3/3] selftests/bpf: Enable stack argument tests for RV64 Pu Lehui
2026-09-05  9:03   ` sashiko-bot [this message]
2026-09-05  9:46     ` Pu Lehui
2026-09-06 14:22 ` [PATCH bpf-next v5 0/3] Add bpf stack arguments support " Björn Töpel
2026-09-06 14:30 ` 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=20260905090320.8AA9E1F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=pulehui@huaweicloud.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