mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: pulehui@huaweicloud.com,bpf@vger.kernel.org,linux-riscv@lists.infradead.org,linux-kernel@vger.kernel.org,jiangfeng@kylinos.cn
Cc: bjorn@kernel.org,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com,ihor.solodrai@linux.dev,puranjay@kernel.org,pjw@kernel.org,palmer@dabbelt.com,alex@ghiti.fr,pulehui@huawei.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v4 3/3] selftests/bpf: Enable stack argument tests for RV64
Date: Sat,  5 Sep 2026 07:45:34 +0000 (UTC)	[thread overview]
Message-ID: <5e50a375b8cc6ff27c370db71783041b6ceebdf6a014a008bb2ecbfb2dca88ca@mail.kernel.org> (raw)
In-Reply-To: <20260905070409.4141522-4-pulehui@huaweicloud.com>

[-- Attachment #1: Type: text/plain, Size: 2797 bytes --]

> 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
>
> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>

The changelog says "Enable the stack argument selftests for RV64", but
one arch-gated stack-argument test remains on x86_64/arm64 only.

Exhaustive list of every arch-gated stack-argument test in
tools/testing/selftests/bpf:

  progs/btf__stack_arg_precision.c        updated by this patch
  progs/btf__verifier_stack_arg_order.c   updated by this patch
  progs/stack_arg.c                       updated by this patch
  progs/stack_arg_kfunc.c                 updated by this patch
  progs/stack_arg_precision.c             updated by this patch
  progs/verifier_stack_arg.c              updated by this patch
  progs/verifier_stack_arg_order.c        updated by this patch
  progs/stack_arg_fail.c                  no arch gate - already runs
  progs/exceptions.c:383                  intentionally left alone
  progs/arena_kfunc.c:219-230             not updated, not explained

progs/exceptions.c is correctly left alone: DENYLIST.riscv64 lists
'exceptions' with the comment "JIT does not support exceptions", and
arch/riscv/net/ implements no bpf_jit_supports_exceptions().

progs/arena_kfunc.c is not explained. It gates its stack-argument test
with test_loader arch annotations rather than a preprocessor guard:

  #if defined(__BPF_FEATURE_ADDR_SPACE_CAST) && \
          defined(__BPF_FEATURE_STACK_ARGUMENT)
  SEC("syscall")
  __arch_x86_64
  __arch_arm64
  __failure __msg("arena pointer cannot be a stack argument")
  int arena_arg_stack(void *ctx)

test_loader.c skips any test whose arch mask does not contain the running
arch, so arena_arg_stack stays skipped on RV64 after this patch.

Does anything block it from running on RV64?  bpf_jit_supports_arena()
returns true on riscv64, DENYLIST.riscv64 contains only 'exceptions', and
arena_arg_stack is a __failure test so it only needs the verifier to reach
the "arena pointer cannot be a stack argument" check - which now happens
on RV64 because the preceding commit makes bpf_jit_supports_stack_args()
return true.

Should __arch_riscv64 be added to progs/arena_kfunc.c's arena_arg_stack
(and the #else dummy_test, which carries the same two annotations), or is
there a reason it should stay on x86_64/arm64 only?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/33952202002

  reply	other threads:[~2026-09-05  7:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05  7:04 [PATCH bpf-next v4 0/3] Add bpf stack arguments support " Pu Lehui
2026-09-05  7:04 ` [PATCH bpf-next v4 1/3] riscv, bpf: Remap BPF_REG_0 and RV_REG_TCC Pu Lehui
2026-09-05  8:00   ` bot+bpf-ci
2026-09-05  8:11     ` Pu Lehui
2026-09-05  7:04 ` [PATCH bpf-next v4 2/3] riscv, bpf: Add BPF stack arguments support for RV64 JIT Pu Lehui
2026-09-05  8:00   ` bot+bpf-ci
2026-09-05  8:15     ` Pu Lehui
2026-09-05  7:04 ` [PATCH bpf-next v4 3/3] selftests/bpf: Enable stack argument tests for RV64 Pu Lehui
2026-09-05  7:45   ` bot+bpf-ci [this message]
2026-09-05  8:05     ` Pu Lehui

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=5e50a375b8cc6ff27c370db71783041b6ceebdf6a014a008bb2ecbfb2dca88ca@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jiangfeng@kylinos.cn \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=pulehui@huawei.com \
    --cc=pulehui@huaweicloud.com \
    --cc=puranjay@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@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

all inboxes | Powered by JetHome®