]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf: Improve verifier log for resource leak on exit
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 4 Dec 2024 03:03:58 +0000 (19:03 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 4 Dec 2024 16:38:29 +0000 (08:38 -0800)
commitcbd8730aea8d79cda6b0f3c18b406dfdef0c1b80
tree40ab3e30738c6c1b811824dd7b29b5c6cb28fe1c
parentc8e2ee1f3df05dc4caa746c062c6b5791c745c79
bpf: Improve verifier log for resource leak on exit

The verifier log when leaking resources on BPF_EXIT may be a bit
confusing, as it's a problem only when finally existing from the main
prog, not from any of the subprogs. Hence, update the verifier error
string and the corresponding selftests matching on it.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Suggested-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20241204030400.208005-6-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c
tools/testing/selftests/bpf/progs/exceptions_fail.c
tools/testing/selftests/bpf/progs/preempt_lock.c
tools/testing/selftests/bpf/progs/verifier_spin_lock.c