-
由 Kumar Kartikeya Dwivedi 提交于
mainline inclusion from mainline-5.16-rc1 commit 14f267d9 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=14f267d95fe4b08831a022c8e15a2eb8991edbf6 ------------------------------------------------- This adds helpers for registering btf_id_set from modules and the bpf_check_mod_kfunc_call callback that can be used to look them up. With in kernel sets, the way this is supposed to work is, in kernel callback looks up within the in-kernel kfunc whitelist, and then defers to the dynamic BTF set lookup if it doesn't find the BTF id. If there is no in-kernel BTF id set, this callback can be used directly. Also fix includes for btf.h and bpfptr.h so that they can included in isolation. This is in preparation for their usage in tcp_bbr, tcp_cubic and tcp_dctcp modules in the next patch. 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-4-memxor@gmail.com (cherry picked from commit 14f267d9) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: kernel/bpf/btf.c Signed-off-by: NWang Yufen <wangyufen@huawei.com>
42870327