]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: bpf: fix test_kfunc_dynptr_param
authorPuranjay Mohan <puranjay@kernel.org>
Fri, 2 Jan 2026 18:00:34 +0000 (10:00 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 2 Jan 2026 20:04:29 +0000 (12:04 -0800)
commit230b0118e416583a53fc0ad5d1fecb37f496fe34
tree63f660ecd1d95a983f650972f691403db0a5639e
parent03cc77b10e009ce87f1a8e93454aadf2912a4c15
selftests: bpf: fix test_kfunc_dynptr_param

As verifier now assumes that all kfuncs only takes trusted pointer
arguments, passing 0 (NULL) to a kfunc that doesn't mark the argument as
__nullable or __opt will be rejected with a failure message of: Possibly
NULL pointer passed to trusted arg<n>

Pass a non-null value to the kfunc to test the expected failure mode.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Link: https://lore.kernel.org/r/20260102180038.2708325-9-puranjay@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/test_kfunc_dynptr_param.c