aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier/calls.c
diff options
context:
space:
mode:
authorGravatar Kumar Kartikeya Dwivedi <memxor@gmail.com> 2022-11-18 07:26:01 +0530
committerGravatar Alexei Starovoitov <ast@kernel.org> 2022-11-17 19:16:49 -0800
commit00b85860feb809852af9a88cb4ca8766d7dff6a3 (patch)
tree16578290c87ba9b87572047ffcf5e0c72c1de199 /tools/testing/selftests/bpf/verifier/calls.c
parentbpf: Allow locking bpf_spin_lock in inner map values (diff)
downloadlinux-00b85860feb809852af9a88cb4ca8766d7dff6a3.tar.gz
linux-00b85860feb809852af9a88cb4ca8766d7dff6a3.tar.bz2
linux-00b85860feb809852af9a88cb4ca8766d7dff6a3.zip
bpf: Rewrite kfunc argument handling
As we continue to add more features, argument types, kfunc flags, and different extensions to kfuncs, the code to verify the correctness of the kfunc prototype wrt the passed in registers has become ad-hoc and ugly to read. To make life easier, and make a very clear split between different stages of argument processing, move all the code into verifier.c and refactor into easier to read helpers and functions. This also makes sharing code within the verifier easier with kfunc argument processing. This will be more and more useful in later patches as we are now moving to implement very core BPF helpers as kfuncs, to keep them experimental before baking into UAPI. Remove all kfunc related bits now from btf_check_func_arg_match, as users have been converted away to refactored kfunc argument handling. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://lore.kernel.org/r/20221118015614.2013203-12-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier/calls.c')
-rw-r--r--tools/testing/selftests/bpf/verifier/calls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/verifier/calls.c b/tools/testing/selftests/bpf/verifier/calls.c
index e1a937277b54..86d6fef2e3b4 100644
--- a/tools/testing/selftests/bpf/verifier/calls.c
+++ b/tools/testing/selftests/bpf/verifier/calls.c
@@ -109,7 +109,7 @@
},
.prog_type = BPF_PROG_TYPE_SCHED_CLS,
.result = REJECT,
- .errstr = "arg#0 pointer type STRUCT prog_test_ref_kfunc must point",
+ .errstr = "arg#0 expected pointer to btf or socket",
.fixup_kfunc_btf_id = {
{ "bpf_kfunc_call_test_acquire", 3 },
{ "bpf_kfunc_call_test_release", 5 },