You need to sign in or sign up before continuing.
-
由 Kumar Kartikeya Dwivedi 提交于
mainline inclusion from mainline-5.16-rc1 commit c48e51c8 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c48e51c8b07aba8a18125221cb67a40cb1256bf2 ------------------------------------------------- This adds selftests that tests the success and failure path for modules kfuncs (in presence of invalid kfunc calls) for both libbpf and gen_loader. It also adds a prog_test kfunc_btf_id_list so that we can add module BTF ID set from bpf_testmod. This also introduces a couple of test cases to verifier selftests for validating whether we get an error or not depending on if invalid kfunc call remains after elimination of unreachable instructions. Signed-off-by: NKumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211002011757.311265-10-memxor@gmail.com (cherry picked from commit c48e51c8) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: include/linux/btf.h kernel/bpf/btf.c tools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c Signed-off-by: NWang Yufen <wangyufen@huawei.com>
613154c1