]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Add support for subskeletons
authorDelyan Kratunov <delyank@fb.com>
Wed, 16 Mar 2022 23:37:28 +0000 (23:37 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 18 Mar 2022 06:12:39 +0000 (23:12 -0700)
commit26b2c1295b6230f6fd61ff890096efd5f55e4452
tree0ffa1555b105f3f55fa2187075c9eaf460bf6784
parent94ea8aedf21035391c9f21e486bea012b814b8e5
bpftool: Add support for subskeletons

Subskeletons are headers which require an already loaded program to
operate.

For example, when a BPF library is linked into a larger BPF object file,
the library userspace needs a way to access its own global variables
without requiring knowledge about the larger program at build time.

As a result, subskeletons require a loaded bpf_object to open().
Further, they find their own symbols in the larger program by
walking BTF type data at run time.

At this time, programs, maps, and globals are supported through
non-owning pointers.

Signed-off-by: Delyan Kratunov <delyank@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/ca8a48b4841c72d285ecce82371bef4a899756cb.1647473511.git.delyank@fb.com
tools/bpf/bpftool/Documentation/bpftool-gen.rst
tools/bpf/bpftool/bash-completion/bpftool
tools/bpf/bpftool/gen.c