diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-11-10 15:25:53 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-11-10 15:25:54 -0800 |
commit | 0e6f601eb5c1914d4222458ee2ec43cc8c9864d8 (patch) | |
tree | d38d9ef68a94abe168f4a3fd239f737c07b6feb8 /tools/testing/selftests/bpf | |
parent | f52b8fd332573106e60958617a3d2e30611ce1fb (diff) | |
parent | cecaf4a0f2dcbd7e76156f6d63748b84c176b95b (diff) |
Merge branch 'Integrate kernel module BTF support'
Andrii Nakryiko says:
====================
This patch set adds BTF generation for kernel modules using a compact split
BTF approach. Respective patches have all the details.
Kernel module BTFs rely on pahole's split BTF support, which is added in [0]
and will be available starting from v1.19. Support for it is detected
automatically during kernel build time.
This patch set implements in-kernel support for split BTF loading and
validation. It also extends GET_OBJ_INFO API for BTFs to return BTF's module
name and a flag whether BTF itself is in-kernel or user-provided. vmlinux BTF
is also exposed to user-space through the same BTF object iteration APIs.
Follow up patch set will utilize the fact that vmlinux and module BTFs now
have associated ID to provide ability to attach BPF fentry/fexit/etc programs
to functions defined in kernel modules.
bpftool is also extended to show module/vmlinux BTF's name.
[0] https://patchwork.kernel.org/project/netdevbpf/list/?series=378699&state=*
v3->v4:
- copy_to_user() on ENOSPC in btf_get_info_by_fd() (Martin);
v2->v3:
- get rid of unnecessary gotos (Song);
v2->v1:
- drop WARNs, add fewer pr_warn()'s instead (Greg);
- properly initialize sysfs binary attribute structure (Greg);
- add __maybe_unused to any_section_objs, used conditionally by module BTF;
rfc->v1:
- CONFIG_DEBUG_INFO_BTF_MODULES is derived automatically (Alexei);
- vmlinux BTF now has explicit "vmlinux" name (Alexei);
- added sysfs ABI documentation for /sys/kernel/btf/<module> (Greg).
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf')
0 files changed, 0 insertions, 0 deletions