From: Pu Lehui <pulehui@huawei.com>
To: "Feng Jiang" <jiangfeng@kylinos.cn>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Song Liu" <song@kernel.org>,
"Yonghong Song" <yonghong.song@linux.dev>,
"Jiri Olsa" <jolsa@kernel.org>,
"Emil Tsalapatis" <emil@etsalapatis.com>,
"Luke Nelson" <luke.r.nels@gmail.com>,
"Xi Wang" <xi.wang@gmail.com>, "Björn Töpel" <bjorn@kernel.org>,
"Puranjay Mohan" <puranjay@kernel.org>,
"Paul Walmsley" <pjw@kernel.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Shuah Khan" <shuah@kernel.org>,
"Ihor Solodrai" <ihor.solodrai@linux.dev>
Cc: <bpf@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH bpf-next v5 0/3] bpf, riscv: add timed may_goto support
Date: Thu, 23 Jul 2026 18:16:52 +0800 [thread overview]
Message-ID: <aa2c4ede-234d-4cb7-8ff1-163f1495bafc@huawei.com> (raw)
In-Reply-To: <20260723-riscv-bpf-timed-may-goto-v5-0-86acb54e5642@kylinos.cn>
On 2026/7/23 13:41, Feng Jiang wrote:
> This series adds RISC-V JIT support for the timed may_goto loop bound.
>
> Patch 1 implements arch_bpf_timed_may_goto() and enables
> bpf_jit_supports_timed_may_goto() so the verifier uses the timed
> expansion path.
>
> Patch 2 adds a test that checks R0-R5 are preserved across
> arch_bpf_timed_may_goto() calls.
>
> Patch 3 enables the verifier_may_goto_1, stream_cond_break, and
> may_goto_interaction fastcall tests on riscv64.
>
> Tested on riscv64 QEMU (rva23s64): may_goto programs load and JIT
> correctly, and the 250ms timeout path works as expected.
>
> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
For this series:
Tested-by: Pu Lehui <pulehui@huawei.com>
> ---
> Changes in v5:
> - Use REG_S/REG_L/SZREG in arch_bpf_timed_may_goto assembly. (Pu Lehui)
> - Add __arch_s390x to the timed_may_goto_preserves_regs test. (Pu Lehui)
> - Switch the preserves-regs test to SEC("syscall") to fix
> bpf_prog_test_run() EINVAL.
> - Link to v4: https://lore.kernel.org/r/20260722-riscv-bpf-timed-may-goto-v4-0-e117e6337bc7@kylinos.cn
>
> Changes in v4:
> - Add 'bpf-next' prefix to match the BPF kernel tree workflow.
> - Add a test checking that R0-R5 are preserved across
> arch_bpf_timed_may_goto() calls. Use bpf_get_prandom_u32() to
> prevent the verifier from removing the checks via DCE.
> - Rename may_goto_interaction_arm64() to may_goto_interaction().
> - Wrap the arch_bpf_timed_may_goto address check to a single line.
> - Link to v3: https://lore.kernel.org/r/20260715-riscv-bpf-timed-may-goto-v3-0-cf2a9c3d843f@kylinos.cn
>
> Changes in v3:
> - Set up the frame pointer in arch_bpf_timed_may_goto() so the function
> does not break stack unwinding under CONFIG_FRAME_POINTER.
>
> Changes in v2:
> - Fix BPF_REG_0 being clobbered after arch_bpf_timed_may_goto() calls.
> - Enable the may_goto_interaction fastcall test on riscv64.
>
> ---
> Feng Jiang (3):
> bpf, riscv: add support for timed may_goto
> selftests/bpf: test timed may_goto preserves R0-R5
> selftests/bpf: enable timed may_goto tests for riscv64
>
> arch/riscv/net/Makefile | 2 +-
> arch/riscv/net/bpf_jit_comp64.c | 12 ++++-
> arch/riscv/net/bpf_timed_may_goto.S | 47 ++++++++++++++++
> tools/testing/selftests/bpf/progs/stream.c | 1 +
> .../selftests/bpf/progs/verifier_bpf_fastcall.c | 3 +-
> .../selftests/bpf/progs/verifier_may_goto_1.c | 62 ++++++++++++++++++++++
> 6 files changed, 124 insertions(+), 3 deletions(-)
> ---
> base-commit: a23a71823352e2d792dcaae25f1ebb744acbfc0b
> change-id: 20260710-riscv-bpf-timed-may-goto-0dce564985af
>
> Best regards,
next prev parent reply other threads:[~2026-07-23 10:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 5:41 Feng Jiang
2026-07-23 5:41 ` [PATCH bpf-next v5 1/3] bpf, riscv: add support for timed may_goto Feng Jiang
2026-07-23 10:10 ` Pu Lehui
2026-07-23 5:41 ` [PATCH bpf-next v5 2/3] selftests/bpf: test timed may_goto preserves R0-R5 Feng Jiang
2026-07-23 10:10 ` Pu Lehui
2026-07-23 5:41 ` [PATCH bpf-next v5 3/3] selftests/bpf: enable timed may_goto tests for riscv64 Feng Jiang
2026-07-23 10:15 ` Pu Lehui
2026-07-24 19:51 ` Björn Töpel
2026-07-23 10:16 ` Pu Lehui [this message]
2026-07-24 19:52 ` [PATCH bpf-next v5 0/3] bpf, riscv: add timed may_goto support Björn Töpel
2026-07-24 20:40 ` 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=aa2c4ede-234d-4cb7-8ff1-163f1495bafc@huawei.com \
--to=pulehui@huawei.com \
--cc=alex@ghiti.fr \
--cc=andrii@kernel.org \
--cc=aou@eecs.berkeley.edu \
--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-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luke.r.nels@gmail.com \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=puranjay@kernel.org \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=xi.wang@gmail.com \
--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®