selftests/bpf: Add verifier tests for trusted kfunc args
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Thu, 21 Jul 2022 13:42:42 +0000 (15:42 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Jul 2022 04:03:17 +0000 (21:03 -0700)
commit8dd5e75683f713c155880c30ea545f2360c9bf46
tree5fb81b53d80f9a4096ab788c38facc63dac6cca9
parentef69aa3a986ef94f01ce8b5b619f550db54432fe
selftests/bpf: Add verifier tests for trusted kfunc args

Make sure verifier rejects the bad cases and ensure the good case keeps
working. The selftests make use of the bpf_kfunc_call_test_ref kfunc
added in the previous patch only for verification.

Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220721134245.2450-11-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/calls.c