summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-07-08 04:53:15 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-09 01:44:44 +0300
commit0f0e55d8247c0742a9b026fc097fcc605383b9db (patch)
treea794d4216116e3b2bdcc42cd21021546799a1682 /tools/perf/scripts/python/export-to-postgresql.py
parent81372e121802fd57892a0b44d93cc747d9568627 (diff)
downloadlinux-0f0e55d8247c0742a9b026fc097fcc605383b9db.tar.xz
libbpf: Improve BTF sanitization handling
Change sanitization process to preserve original BTF, which might be used by libbpf itself for Kconfig externs, CO-RE relocs, etc, even if kernel is old and doesn't support BTF. To achieve that, if libbpf detects the need for BTF sanitization, it would clone original BTF, sanitize it in-place, attempt to load it into kernel, and if successful, will preserve loaded BTF FD in original `struct btf`, while freeing sanitized local copy. If kernel doesn't support any BTF, original btf and btf_ext will still be preserved to be used later for CO-RE relocation and other BTF-dependent libbpf features, which don't dependon kernel BTF support. Patch takes care to not specify BTF and BTF.ext features when loading BPF programs and/or maps, if it was detected that kernel doesn't support BTF features. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200708015318.3827358-4-andriin@fb.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions