summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2026-09-12 12:52:27 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-09-12 20:54:18 -0700
commit00cfeb9554e2513cc721acdf5679bd26dcf24e02 (patch)
treec5725a15556b62867c253d080fc15530e62b92dd /tools/testing/selftests/bpf
parent4dd676ca5b7a3bdc18e217bdd618c5e73016aee4 (diff)
downloadlinux-next-00cfeb9554e2513cc721acdf5679bd26dcf24e02.tar.gz
linux-next-00cfeb9554e2513cc721acdf5679bd26dcf24e02.zip
bpf: Support __int128 as a by-value function argument
A 128-bit integer follows the same calling convention as a 16-byte by-value struct: LLVM emits it as a 16-byte BTF_KIND_INT and passes it in two consecutive argument registers. So a __int128 gets its two slots. The test added at the start of the series, which recorded the wrong register map as an R4 !read_ok rejection, now passes and is flipped to __success. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20260912195227.987991-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf')
-rw-r--r--tools/testing/selftests/bpf/progs/verifier_aggregate_arg.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/progs/verifier_aggregate_arg.c b/tools/testing/selftests/bpf/progs/verifier_aggregate_arg.c
index d90f754396d0..fc7c1b18bc40 100644
--- a/tools/testing/selftests/bpf/progs/verifier_aggregate_arg.c
+++ b/tools/testing/selftests/bpf/progs/verifier_aggregate_arg.c
@@ -17,12 +17,7 @@ __noinline __u64 take_i128_global(int a, u128 v, int c)
}
SEC("tc")
-/*
- * The verifier counts one argument register for the __int128 and marks only
- * R1 through R3 at the entry of take_i128_global(), while the compiler passed
- * a in R1, v in R2:R3 and c in R4.
- */
-__failure __msg("R4 !read_ok")
+__success __retval(0)
int aggregate_arg_int128_c_test(struct __sk_buff *skb)
{
__u64 a = skb->len ^ MIX_A;