]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add test_verifier support to fixup kfunc call insns
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Fri, 14 Jan 2022 16:39:51 +0000 (22:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jul 2022 15:53:29 +0000 (17:53 +0200)
commit564f52c6117d49f58dcddf4948c7f713763768cf
treeda7069d0024727bd18235812aa3bbfbf6d8e04b3
parentf75e48ea9034dda20362dfedca9bd0f25c6c6977
selftests/bpf: Add test_verifier support to fixup kfunc call insns

commit cd4b2e75f4dd7d1f43e0d0865e342d2bd68a7a33 upstream.

This allows us to add tests (esp. negative tests) where we only want to
ensure the program doesn't pass through the verifier, and also verify
the error. The next commit will add the tests making use of this.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220114163953.1455836-9-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
[PHLin: backport due to lack of fixup_map_timer]
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/test_verifier.c