OSDN Git Service

selftests/bpf: Allow to use kfunc from testmod.ko in test_verifier
authorJiri Olsa <jolsa@kernel.org>
Mon, 15 May 2023 13:37:54 +0000 (15:37 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 17 May 2023 05:09:23 +0000 (22:09 -0700)
commitf26ebdd3e4e4e1f5f08522b087ab9ec7216e9a3b
treec17f2d702cbb5404b91d8f83fa1b80bb09fc70e1
parentb23b385fa18f2196872bc3337c98ddd221c2827b
selftests/bpf: Allow to use kfunc from testmod.ko in test_verifier

Currently the test_verifier allows test to specify kfunc symbol
and search for it in the kernel BTF.

Adding the possibility to search for kfunc also in bpf_testmod
module when it's not found in kernel BTF.

To find bpf_testmod btf we need to get back SYS_ADMIN cap.

Acked-by: David Vernet <void@manifault.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230515133756.1658301-9-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_verifier.c