]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Allow to read btf as raw data
authorJiri Olsa <jolsa@kernel.org>
Thu, 24 Oct 2019 13:30:25 +0000 (15:30 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 25 Oct 2019 21:34:47 +0000 (23:34 +0200)
commit7f7d500b9bb0e15735805f61a0eeba91084132cd
tree5ac57486a112f1541e608298a60c69478f597ee8
parentbc725edcc3833f0f1fc4b62baf5d437c4ab91d48
bpftool: Allow to read btf as raw data

The bpftool interface stays the same, but now it's possible
to run it over BTF raw data, like:

  $ bpftool btf dump file /sys/kernel/btf/vmlinux
  [1] INT '(anon)' size=4 bits_offset=0 nr_bits=32 encoding=(none)
  [2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
  [3] CONST '(anon)' type_id=2

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Link: https://lore.kernel.org/bpf/20191024133025.10691-1-jolsa@kernel.org
tools/bpf/bpftool/btf.c