]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Allow void global functions in the verifier
authorEmil Tsalapatis <emil@etsalapatis.com>
Sat, 28 Feb 2026 18:47:58 +0000 (13:47 -0500)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 3 Mar 2026 16:47:23 +0000 (08:47 -0800)
commit8446ded1e1a0db86eac8210669301f56649ecd22
tree5c93ad6a4c9963ab8381ffd100622759b2bd5df0
parent69ca55e63101001997c960abdce35869102577c2
bpf: Allow void global functions in the verifier

Global subprogs are currently not allowed to return void. Adjust
verifier logic to allow global functions with a void return type.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/r/20260228184759.108145-5-emil@etsalapatis.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c
kernel/bpf/verifier.c
tools/testing/selftests/bpf/progs/exceptions_fail.c
tools/testing/selftests/bpf/progs/test_global_func7.c