Re: [PATCH bpf-next v1 1/7] selftests/bpf: Build callx tests with GCC that defines __BPF_FEATURE_CALLX
From: bot+bpf-ci
Date: Tue Oct 27 2026 - 20:50:44 EST
> selftests/bpf: Build callx tests with GCC that defines __BPF_FEATURE_CALLX
TL;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.
> diff --git a/tools/testing/selftests/bpf/progs/bpf_misc.h b/tools/testing/selftests/bpf/progs/bpf_misc.h
> --- a/tools/testing/selftests/bpf/progs/bpf_misc.h
> +++ b/tools/testing/selftests/bpf/progs/bpf_misc.h
[ ... ]
> @@ -295,6 +295,13 @@
> #define CAN_USE_LOAD_ACQ_STORE_REL
> #endif
>
> +/* 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
> +
[ ... ]
> diff --git a/tools/testing/selftests/bpf/progs/verifier_callx.c b/tools/testing/selftests/bpf/progs/verifier_callx.c
> --- a/tools/testing/selftests/bpf/progs/verifier_callx.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_callx.c
[ ... ]
> @@ -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)
> {
this isn't a bug, but the skip reason leaves out riscv64, even though the
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)?
---
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