All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tiezhu Yang" <yangtiezhu@loongson.cn>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 3/4] selftests/bpf: Test jited inline of bpf_get_current_task() for LoongArch
Date: Mon, 15 Jun 2026 10:25:41 +0000	[thread overview]
Message-ID: <20260615102542.4B9011F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260615100506.19558-4-yangtiezhu@loongson.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The selftest expects `bpf_get_current_task()` to be JIT-inlined to `move $a5, $tp` on LoongArch, but the required kernel JIT implementation is missing, causing the test to fail.
--

commit f8173ba138660b46dd1d6b8e58aa91f97cddc7a8
Author: Tiezhu Yang <yangtiezhu@loongson.cn>

selftests/bpf: Test jited inline of bpf_get_current_task() for LoongArch

This commit adds a selftest expectation for the JIT-inlined version of
bpf_get_current_task() on LoongArch.

> diff --git a/tools/testing/selftests/bpf/progs/verifier_jit_inline.c b/tools/testing/selftests/bpf/progs/verifier_jit_inline.c
> index 76d80605ec7fd..8560577f25576 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_jit_inline.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_jit_inline.c
> @@ -12,6 +12,8 @@ __arch_arm64
>  __jited("	mrs	x8, SP_EL0")
>  __arch_riscv64
>  __jited("	mv	a5, tp")
> +__arch_loongarch
> +__jited("	move	$a5, $tp")

[Severity: Medium]
Is the corresponding kernel patch implementing this JIT inline missing from
the tree?

Without the logic in arch/loongarch/net/bpf_jit.c to inline
BPF_FUNC_get_current_task, the BPF JIT emits a standard helper function
call rather than the expected instruction sequence.

Will this cause the selftest to unconditionally fail?

>  int inline_bpf_get_current_task(void)
>  {
>  	bpf_get_current_task();

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260615100506.19558-1-yangtiezhu@loongson.cn?part=3

  reply	other threads:[~2026-06-15 10:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15 10:05 [PATCH bpf-next v2 0/4] selftests/bpf: Add some tests for LoongArch Tiezhu Yang
2026-06-15 10:05 ` [PATCH bpf-next v2 1/4] selftests/bpf: Add get_preempt_count() support " Tiezhu Yang
2026-06-15 10:05 ` [PATCH bpf-next v2 2/4] selftests/bpf: Add __arch_loongarch to limit test cases " Tiezhu Yang
2026-06-15 10:05 ` [PATCH bpf-next v2 3/4] selftests/bpf: Test jited inline of bpf_get_current_task() " Tiezhu Yang
2026-06-15 10:25   ` sashiko-bot [this message]
2026-06-15 10:05 ` [PATCH bpf-next v2 4/4] selftests/bpf: Test jited inline of bpf_get_smp_processor_id() " Tiezhu Yang
2026-06-15 10:26   ` sashiko-bot
2026-06-15 15:45 ` [PATCH bpf-next v2 0/4] selftests/bpf: Add some tests " Alexei Starovoitov

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=20260615102542.4B9011F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yangtiezhu@loongson.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.