]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: Add a sign-extension test for kfuncs
authorIlya Leoshkevich <iii@linux.ibm.com>
Sat, 28 Jan 2023 00:06:33 +0000 (01:06 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 28 Jan 2023 20:30:09 +0000 (12:30 -0800)
commitbe6b5c10ecc4014446e5c807d6a69c5a7cc1c497
treea7569719e03da3a9c27bbf7e1a686aea5e846a64
parent80a611904eef65e8c60e0c8c8f50fa98a0bd0c69
selftests/bpf: Add a sign-extension test for kfuncs

s390x ABI requires the caller to zero- or sign-extend the arguments.
eBPF already deals with zero-extension (by definition of its ABI), but
not with sign-extension.

Add a test to cover that potentially problematic area.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-15-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/bpf/test_run.c
tools/testing/selftests/bpf/prog_tests/kfunc_call.c
tools/testing/selftests/bpf/progs/kfunc_call_test.c