BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Feng Jiang" <jiangfeng@kylinos.cn>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests/bpf: enable timed may_goto tests for riscv64
Date: Tue, 14 Jul 2026 03:08:47 +0000	[thread overview]
Message-ID: <20260714030847.E3BE41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714-riscv-bpf-timed-may-goto-v1-2-3988601fe6ac@kylinos.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing test enablement for riscv64 timed may_goto expansion and bpf_fastcall interaction.
--

--- Patch [2]: [PATCH 2/2] selftests/bpf: enable timed may_goto tests for riscv64 ---
commit c54da59713ded8c765c2c6ab6331451df77083c9
Author: Feng Jiang <jiangfeng@kylinos.cn>

selftests/bpf: enable timed may_goto tests for riscv64

This commit enables the verifier_may_goto_1 and stream_cond_break tests
on riscv64 now that the JIT supports timed may_goto.

> diff --git a/tools/testing/selftests/bpf/progs/stream.c b/tools/testing/selftests/bpf/progs/stream.c
> index 92ba1d72e0ece..8d8e53d37266c 100644
> --- a/tools/testing/selftests/bpf/progs/stream.c
> +++ b/tools/testing/selftests/bpf/progs/stream.c
> @@ -64,6 +64,7 @@ SEC("syscall")
>  __arch_x86_64
>  __arch_arm64
>  __arch_s390x
> +__arch_riscv64
>  __success __retval(0)
>  __stderr("ERROR: Timeout detected for may_goto instruction")

[ ... ]

[Severity: Medium]
Should tools/testing/selftests/bpf/progs/verifier_bpf_fastcall.c also be
updated to include __arch_riscv64 for the may_goto_interaction_arm64 test?

This test verifies the expansion of timed may_goto when interacting with
bpf_fastcall, but currently lacks the riscv64 architecture tag.

riscv64 shares the exact same verifier translation and fastcall behavior for
this path:

tools/testing/selftests/bpf/progs/verifier_bpf_fastcall.c:
    ...
    SEC("raw_tp")
    __arch_arm64
    __log_level(4) __msg("stack depth 24")
    /* may_goto counter at -24 */
    ...
    __success
    __naked void may_goto_interaction_arm64(void)
    ...

Without this tag, the test for this specific timed may_goto interaction is
silently skipped when running BPF selftests on riscv64.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260714-riscv-bpf-timed-may-goto-v1-0-3988601fe6ac@kylinos.cn?part=2

      reply	other threads:[~2026-07-14  3:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  2:58 [PATCH 0/2] bpf, riscv: add timed may_goto support Feng Jiang
2026-07-14  2:58 ` [PATCH 1/2] bpf, riscv: add support for timed may_goto Feng Jiang
2026-07-14  3:07   ` sashiko-bot
2026-07-14  2:58 ` [PATCH 2/2] selftests/bpf: enable timed may_goto tests for riscv64 Feng Jiang
2026-07-14  3:08   ` sashiko-bot [this message]

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=20260714030847.E3BE41F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=jiangfeng@kylinos.cn \
    --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