summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2026-08-18 22:53:20 -0700
committerEduard Zingerman <eddyz87@gmail.com>2026-08-21 10:49:28 -0700
commit7b7b511e0cf53d2602ba6119c9a52174d548ff26 (patch)
tree73f67b1134e006c1cf9cee44abfa6c48bfe0d1cb /scripts
parenta2e98481a6396f919ad91ba9c2ff3ec61c4028b3 (diff)
downloadlinux-next-7b7b511e0cf53d2602ba6119c9a52174d548ff26.tar.gz
linux-next-7b7b511e0cf53d2602ba6119c9a52174d548ff26.zip
selftests/bpf: Add C tests for 16-byte returns in R0: R2
Add selftests that exercise a 16-byte return value passed in the R0:R2 register pair, written in C so that they depend on the compiler lowering the register-pair return. The R0:R2 convention is only emitted by LLVM 23 and newer, and a by-value aggregate return does not compile at all before that, so the programs sit behind a __clang_major__ guard. An older compiler builds the dummy test in the #else branch instead, which keeps the object non-empty and says in its description why nothing was exercised. The kfunc tests are tagged __arch_x86_64/__arch_arm64 and skip elsewhere. Those are the architectures whose JIT advertises bpf_jit_supports_kfunc_ret_reg_pair(), which bpf_add_kfunc_call() requires before it accepts a kfunc returning more than 8 bytes, and they are also the only ones building the kfuncs. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://patch.msgid.link/20260819055320.3300114-1-yonghong.song@linux.dev Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions