There are 3 kfuncs like below: __u64 bpf_kfunc_call_test_i128_arg_odd(__u64 a, __int128 v, __u64 b) __ksym; __u64 bpf_kfunc_call_test_i128_arg_shift(__u64 a, __int128 v, __u64 b, __u64 c, __u64 d) __ksym; __u64 bpf_kfunc_call_test_i128_arg_ovf(__u64 a, __int128 v, __u64 b, __u64 c, __u64 d, __u64 e, __u64 f) __ksym; which requires that '__int128 v' must be 16-byte align on arm64. Current pahole will reject BTF generation since pahole expects '__int128 v' has start register 'x1' while arm64 abi requires 'x2'. Hence, btf generation will fail. This patch is a hack to disable a few related tests to satisfy CI. The following is the fix in pahole: https://lore.kernel.org/bpf/20260911040955.339939-1-yonghong.song@linux.dev/ Once pahole patch is merged, this patch can be discarded. Signed-off-by: Yonghong Song --- tools/testing/selftests/bpf/progs/aggregate_arg_kfunc.c | 4 ++++ tools/testing/selftests/bpf/test_kmods/bpf_testmod.c | 4 ++++ tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/aggregate_arg_kfunc.c b/tools/testing/selftests/bpf/progs/aggregate_arg_kfunc.c index 2100f0ab1abe..59f56ab39413 100644 --- a/tools/testing/selftests/bpf/progs/aggregate_arg_kfunc.c +++ b/tools/testing/selftests/bpf/progs/aggregate_arg_kfunc.c @@ -50,6 +50,7 @@ int aggregate_arg_kfunc_int128(struct __sk_buff *skb) return 0; } +#if 0 /* * arm64 rounds the register number up to an even one for an argument * aligned to 16 bytes, so it wants this __int128 in x2 and x3. @@ -70,6 +71,7 @@ int aggregate_arg_kfunc_int128_odd(struct __sk_buff *skb) return 0; } +#endif #endif /* __SIZEOF_INT128__ */ @@ -152,6 +154,7 @@ int aggregate_arg_kfunc_split8(struct __sk_buff *skb) #ifdef __SIZEOF_INT128__ +#if 0 /* * The same hole, with enough arguments after the __int128 that the shift * reaches the registers the BPF convention counts as stack slots: arm64 @@ -193,6 +196,7 @@ int aggregate_arg_kfunc_int128_ovf(struct __sk_buff *skb) return 0; } +#endif /* * Both conventions pad the stack to align this __int128, and the BPF diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c index baccee6fdad4..c367442ce086 100644 --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c @@ -1039,6 +1039,7 @@ __bpf_kfunc u64 bpf_kfunc_call_test_i128_arg(u64 a, u64 b, __int128 v) return a + b + (u64)((unsigned __int128)v >> 64) + (u64)v; } +#if 0 __bpf_kfunc u64 bpf_kfunc_call_test_i128_arg_odd(u64 a, __int128 v, u64 b) { return a + b + (u64)((unsigned __int128)v >> 64) + (u64)v; @@ -1056,6 +1057,7 @@ __bpf_kfunc u64 bpf_kfunc_call_test_i128_arg_ovf(u64 a, __int128 v, u64 b, u64 c return a + b + c + d + e + f + (u64)((unsigned __int128)v >> 64) + (u64)v; } +#endif __bpf_kfunc u64 bpf_kfunc_call_test_i128_arg_pad(u64 a, u64 b, u64 c, u64 d, u64 e, u64 f, u64 g, __int128 v) @@ -1735,9 +1737,11 @@ BTF_ID_FLAGS(func, bpf_kfunc_call_test_ret_deep) BTF_ID_FLAGS(func, bpf_kfunc_call_test_ret_ii) BTF_ID_FLAGS(func, bpf_kfunc_call_test_pair_arg) BTF_ID_FLAGS(func, bpf_kfunc_call_test_i128_arg) +#if 0 BTF_ID_FLAGS(func, bpf_kfunc_call_test_i128_arg_odd) BTF_ID_FLAGS(func, bpf_kfunc_call_test_i128_arg_shift) BTF_ID_FLAGS(func, bpf_kfunc_call_test_i128_arg_ovf) +#endif BTF_ID_FLAGS(func, bpf_kfunc_call_test_i128_arg_pad) BTF_ID_FLAGS(func, bpf_kfunc_call_test_pair_arg_nofit) BTF_ID_FLAGS(func, bpf_kfunc_call_test_pair_arg_tail) diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h b/tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h index 195ec37d5bbc..0f098045856e 100644 --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h @@ -234,11 +234,13 @@ struct prog_test_ret_ii bpf_kfunc_call_test_ret_ii(int a, int b) __ksym; __u64 bpf_kfunc_call_test_pair_arg(__u64 a, struct prog_test_pair_arg s, __u64 b) __ksym; #ifdef __SIZEOF_INT128__ __u64 bpf_kfunc_call_test_i128_arg(__u64 a, __u64 b, __int128 v) __ksym; +#if 0 __u64 bpf_kfunc_call_test_i128_arg_odd(__u64 a, __int128 v, __u64 b) __ksym; __u64 bpf_kfunc_call_test_i128_arg_shift(__u64 a, __int128 v, __u64 b, __u64 c, __u64 d) __ksym; __u64 bpf_kfunc_call_test_i128_arg_ovf(__u64 a, __int128 v, __u64 b, __u64 c, __u64 d, __u64 e, __u64 f) __ksym; +#endif __u64 bpf_kfunc_call_test_i128_arg_pad(__u64 a, __u64 b, __u64 c, __u64 d, __u64 e, __u64 f, __u64 g, __int128 v) __ksym; #endif -- 2.52.0