-
由 Andrii Nakryiko 提交于
mainline inclusion from mainline-5.11-rc1 commit 290248a5 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=290248a5b7d829871b3ea3c62578613a580a1744 ------------------------------------------------- Add ability for user-space programs to specify non-vmlinux BTF when attaching BTF-powered BPF programs: raw_tp, fentry/fexit/fmod_ret, LSM, etc. For this, attach_prog_fd (now with the alias name attach_btf_obj_fd) should specify FD of a module or vmlinux BTF object. For backwards compatibility reasons, 0 denotes vmlinux BTF. Only kernel BTF (vmlinux or module) can be specified. Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20201203204634.1325171-11-andrii@kernel.org (cherry picked from commit 290248a5) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: kernel/bpf/syscall.c Signed-off-by: NWang Yufen <wangyufen@huawei.com>
f2b5caf4