From: sashiko-bot@kernel.org
To: "Shivani Nittor" <shivani@linux.ibm.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests/bpf: Add callx tests for PPC64
Date: Mon, 30 Nov 2026 07:15:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-240566@kernel.org> (raw)
In-Reply-To: <20261130070307.126765-2-shivani@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] selftests/bpf: verifier_callx tests enabled on unsupported
PPC targets
--
commit 8cd8cd78cbedee87168d3e2fcad4536e0affb300
Author: Shivani Nittor <shivani@linux.ibm.com>
selftests/bpf: Add callx tests for PPC64
This commit enables the BPF callx selftests and verifier tests for PPC64.
> diff --git a/tools/testing/selftests/bpf/progs/verifier_callx.c b/tools/testing/selftests/bpf/progs/verifier_callx.c
> index a12bc421e75ce..b99eab7b3725f 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_callx.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_callx.c
> @@ -8,7 +8,8 @@
>
> /* gcc doesn't support indirect calls */
> #if defined(__clang__) && (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64) || \
> - (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64))
> + (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64) || \
> + defined(__TARGET_ARCH_powerpc))
>
> #define CALLX_INSN(DST, SRC, OFF, IMM) \
> BPF_RAW_INSN(BPF_JMP | BPF_CALL | BPF_X, DST, SRC, OFF, IMM)
> diff --git a/tools/testing/selftests/bpf/progs/verifier_callx_rodata.c b/tools/testing/selftests/bpf/progs/verifier_callx_rodata.c
> index 6cf58ca9ac5bb..56be21e7bbcd3 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_callx_rodata.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_callx_rodata.c
> @@ -8,7 +8,8 @@
>
> /* gcc doesn't support indirect calls */
> #if defined(__clang__) && (defined(__TARGET_ARCH_x86) || defined(__TARGET_ARCH_arm64) || \
> - (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64))
> + (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64) || \
> + defined(__TARGET_ARCH_powerpc))
>
> /*
> * Read-only data with pointers to functions, where the compiler puts tables
[Severity: Medium]
Will gating verifier_callx.c and verifier_callx_rodata.c on
__TARGET_ARCH_powerpc alone cause test_verifier_callx() and
test_verifier_callx_rodata() to fail on PPC64 ELF ABI v1 and PPC32?
__TARGET_ARCH_powerpc is defined for all PowerPC builds, and RUN_JITED()
in tools/testing/selftests/bpf/prog_tests/verifier.c only checks
is_jit_enabled(). However, on PowerPC bpf_jit_supports_callx() only
returns true when CONFIG_PPC64_ELF_ABI_V2 is enabled:
arch/powerpc/net/bpf_jit_comp.c:bpf_jit_supports_callx() {
return IS_ENABLED(CONFIG_PPC64_ELF_ABI_V2);
}
On PPC64 ELF ABI v1 or PPC32 kernels with BPF JIT enabled, the callx
subtests are compiled in instead of the fallback dummy program and fail
verification in require_callx_jit() with -EOPNOTSUPP instead of skipping.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130070307.126765-1-shivani@linux.ibm.com?part=2
prev parent reply other threads:[~2026-11-30 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 7:03 [PATCH 1/2] powerpc/bpf: Support indirect calls to BPF subprograms Shivani Nittor
2026-11-30 7:03 ` [PATCH 2/2] selftests/bpf: Add callx tests for PPC64 Shivani Nittor
2026-11-30 7:15 ` 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=sashiko-outbox-240566@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shivani@linux.ibm.com \
/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