Re: [PATCH bpf-next v1 1/7] selftests/bpf: Build callx tests with GCC that defines __BPF_FEATURE_CALLX
From: Vineet Gupta
Date: Wed Oct 28 2026 - 12:19:20 EST
On 10/27/26 5:46 PM, bot+bpf-ci@xxxxxxxxxx wrote:
selftests/bpf: Build callx tests with GCC that defines __BPF_FEATURE_CALLXTL;DR: Nit only: the new __skip() reason in the callx selftests omits riscv64,
though riscv64 is supported, so a riscv64 build with a GCC lacking callx
prints a misleading skip message.
this isn't a bug, but the skip reason leaves out riscv64, even though the
+/* clang always emits callx, gcc only when it defines __BPF_FEATURE_CALLX */
+#if (defined(__TARGET_ARCH_arm64) || defined(__TARGET_ARCH_x86) || \
+ (defined(__TARGET_ARCH_riscv) && __riscv_xlen == 64)) && \
+ (defined(__clang__) || defined(__BPF_FEATURE_CALLX))
+#define CAN_USE_CALLX
+#endif
+
@@ -1075,6 +1073,7 @@ int callx_c_ops_on_stack(void *ctx)
#else
SEC("socket")
+__skip("callx needs x86/arm64 JIT and compiler support")
__success
int dummy(void *ctx)
{
CAN_USE_CALLX macro above accepts it.
The same string is added to the dummy() program in
verifier_callx_rodata.c. The riscv64 JIT implements bpf_jit_supports_callx(),
and commit 530dfafc6107 ("selftests/bpf: Enable callx related testcases for
RV64") turned these tests on for RV64.
On a riscv64 build with a bpf-gcc that does not define __BPF_FEATURE_CALLX,
the arch supports callx and only the compiler lacks it, yet run_subtest()
prints:
run_subtest:SKIP: callx needs x86/arm64 JIT and compiler support
That reads as though riscv64 itself were unsupported.
Could the reason say x86/arm64/riscv64, or leave the arch list out (for
example "toolchain or JIT can't do callx", as the new comment in
callx_rodata_lskel.c does)?
I'll just leave out the arch list and refer to just toolchain or JIT.
Thx,
-Vineet
---
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/40608355234