]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: bpf: Add tests for void global subprogs
authorEmil Tsalapatis <emil@etsalapatis.com>
Sat, 28 Feb 2026 18:47:59 +0000 (13:47 -0500)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 3 Mar 2026 16:47:23 +0000 (08:47 -0800)
commit422f1efabd1389020be1c768c66aa6df40f528e7
treec56437d576f4102d89e5fd6de254682636b8e2e3
parent8446ded1e1a0db86eac8210669301f56649ecd22
selftests: bpf: Add tests for void global subprogs

Add additional testing for void global functions. The tests
ensure that calls to void global functions properly keep
R0 invalid. Also make sure that exception callbacks still
require a return value.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/r/20260228184759.108145-6-emil@etsalapatis.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/exceptions.c
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
tools/testing/selftests/bpf/progs/exceptions.c
tools/testing/selftests/bpf/progs/exceptions_fail.c
tools/testing/selftests/bpf/progs/freplace_int_with_void.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/freplace_void.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/verifier_global_subprogs.c