diff options
author | Alexei Starovoitov <ast@kernel.org> | 2022-04-27 01:41:47 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-04-27 01:41:47 +0300 |
commit | d54d06a4c4bc5d76815d02e4b041b31d9dbb3fef (patch) | |
tree | eca090cff5cfac9246469b566e722fe81932e4f9 /tools/lib/bpf/libbpf_internal.h | |
parent | c317ab71facc2cd0a94145973318a4c914e11acc (diff) | |
parent | ea4128eb43eb3fe856831eaa9f747fab350ed5f3 (diff) | |
download | linux-d54d06a4c4bc5d76815d02e4b041b31d9dbb3fef.tar.xz |
Merge branch 'Teach libbpf to "fix up" BPF verifier log'
Andrii Nakryiko says:
====================
This patch set teaches libbpf to enhance BPF verifier log with human-readable
and relevant information about failed CO-RE relocation. Patch #9 is the main
one with the new logic. See relevant commit messages for some more details.
All the other patches are either fixing various bugs detected
while working on this feature, most prominently a bug with libbpf not handling
CO-RE relocations for SEC("?...") programs, or are refactoring libbpf
internals to allow for easier reuse of CO-RE relo lookup and formatting logic.
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf_internal.h')
-rw-r--r-- | tools/lib/bpf/libbpf_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h index 054cd8e93d7c..4abdbe2fea9d 100644 --- a/tools/lib/bpf/libbpf_internal.h +++ b/tools/lib/bpf/libbpf_internal.h @@ -376,6 +376,13 @@ struct btf_ext_info { void *info; __u32 rec_size; __u32 len; + /* optional (maintained internally by libbpf) mapping between .BTF.ext + * section and corresponding ELF section. This is used to join + * information like CO-RE relocation records with corresponding BPF + * programs defined in ELF sections + */ + __u32 *sec_idxs; + int sec_cnt; }; #define for_each_btf_ext_sec(seg, sec) \ |