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)
commit34ec62bc44b03e7376954a9391e654f77c7d99b3
treeda7069d0024727bd18235812aa3bbfbf6d8e04b3
parente11cdd74519ec2443a3ae66fa921f9ac45a15527
selftests/bpf: Add test_verifier support to fixup kfunc call insns

commit 0201b80772ac2b712bbbfe783cdb731fdfb4247e 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