All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yonghong.song@linux.dev>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eduard Zingerman <eddyz87@gmail.com>,
	kernel-team@fb.com
Subject: [PATCH bpf-next v3 15/15] selftests/bpf: Temporary hack to disable register mismatch in arm64
Date: Fri, 11 Sep 2026 08:50:30 -0700	[thread overview]
Message-ID: <20260911155030.2012652-1-yonghong.song@linux.dev> (raw)
In-Reply-To: <20260911154914.2004336-1-yonghong.song@linux.dev>

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 <yonghong.song@linux.dev>
---
 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


  parent reply	other threads:[~2026-09-11 15:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 15:49 [PATCH bpf-next v3 00/15] bpf: Support by-value struct and __int128 arguments Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 01/15] bpf: Read a kfunc's __sz argument only when it is in a register Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 02/15] selftests/bpf: Add a test for an __int128 by-value argument Yonghong Song
2026-09-11 16:47   ` bot+bpf-ci
2026-09-12 17:07     ` Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 03/15] bpf: Rename bpf_subprog_info::arg_cnt to arg_slot_cnt Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 04/15] bpf: Index global function arguments by argument slot Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 05/15] bpf: Support by-value struct arguments up to 16 bytes Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 06/15] bpf: Support __int128 as a by-value function argument Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 07/15] bpf: Rename bpf_call_summary::num_params to arg_slot_cnt Yonghong Song
2026-09-11 15:49 ` [PATCH bpf-next v3 08/15] bpf: Recognize by-value struct and __int128 kfunc arguments Yonghong Song
2026-09-11 16:47   ` bot+bpf-ci
2026-09-12 17:13     ` Yonghong Song
2026-09-11 15:50 ` [PATCH bpf-next v3 09/15] bpf: Prepare kfunc arguments for the JIT from an ABI description Yonghong Song
2026-09-11 15:50 ` [PATCH bpf-next v3 10/15] bpf, x86: Move kfunc arguments into the x86-64 calling convention Yonghong Song
2026-09-11 16:47   ` bot+bpf-ci
2026-09-12 17:14     ` Yonghong Song
2026-09-11 15:50 ` [PATCH bpf-next v3 11/15] bpf, arm64: Move kfunc arguments into the arm64 " Yonghong Song
2026-09-11 16:19   ` sashiko-bot
2026-09-12 17:16     ` Yonghong Song
2026-09-11 16:47   ` bot+bpf-ci
2026-09-12 17:19     ` Yonghong Song
2026-09-11 15:50 ` [PATCH bpf-next v3 12/15] selftests/bpf: Add C tests for by-value arguments up to 16 bytes Yonghong Song
2026-09-11 15:50 ` [PATCH bpf-next v3 13/15] selftests/bpf: Add inline-asm tests for by-value arguments Yonghong Song
2026-09-11 16:06   ` sashiko-bot
2026-09-11 15:50 ` [PATCH bpf-next v3 14/15] selftests/bpf: Add tests for by-value kfunc arguments Yonghong Song
2026-09-11 16:47   ` bot+bpf-ci
2026-09-12 17:24     ` Yonghong Song
2026-09-11 15:50 ` Yonghong Song [this message]
2026-09-11 16:47   ` [PATCH bpf-next v3 15/15] selftests/bpf: Temporary hack to disable register mismatch in arm64 bot+bpf-ci
2026-09-12  3:57   ` Alexei Starovoitov
2026-09-12 17:30     ` Yonghong Song

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=20260911155030.2012652-1-yonghong.song@linux.dev \
    --to=yonghong.song@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@fb.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 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.