]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:54:20 +0000 (10:54 +0200)
commit9ccd5f31a88eb5f904c7183a7d7735424e2f4768
treeef53089459ca829e7a1800ac4957999de4bada60
parent673b1c0890fb03683793319ae753ed0e80a3c777
selftests/bpf: Add test_verifier support to fixup kfunc call insns

BugLink: https://bugs.launchpad.net/bugs/1986728
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/testing/selftests/bpf/test_verifier.c