-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subskeleton support for BPF libraries #2695
Conversation
Master branch: 357b3cc |
Master branch: a77c2cf |
68f9190
to
39d27df
Compare
Master branch: 6789ab9 |
39d27df
to
9c0a89d
Compare
Master branch: c09df4b |
9c0a89d
to
edabf39
Compare
Master branch: d3b351f |
edabf39
to
60cacfb
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=622431 expired. Closing PR. |
Master branch: cbdaf71 |
60cacfb
to
d66e84b
Compare
Master branch: 6585abe |
d66e84b
to
5af7266
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=623660 expired. Closing PR. |
Master branch: ad13baf |
5af7266
to
24484bb
Compare
Master branch: 7cda76d |
24484bb
to
073b4a3
Compare
Master branch: a50cbac |
073b4a3
to
6366099
Compare
Master branch: a50cbac |
6366099
to
a2c199b
Compare
a50cbac
to
e0999c8
Compare
Master branch: e0999c8 |
a2c199b
to
f7f30e5
Compare
Master branch: e0999c8 |
f7f30e5
to
703211a
Compare
Currently, libbpf considers a single routine in .text to be a program. This is particularly confusing when it comes to library objects - a single routine meant to be used as an extern will instead be considered a bpf_program. This patch hides this compatibility behavior behind the pre-existing SEC_NAME strict mode flag. Signed-off-by: Delyan Kratunov <delyank@fb.com>
For internal and user maps, look up the key and value btf types on open() and not load(), so that `bpf_map_btf_value_type_id` is usable in `bpftool gen`. Signed-off-by: Delyan Kratunov <delyank@fb.com>
In symmetry with bpf_object__open_skeleton(), bpf_object__open_subskeleton() performs the actual walking and linking of maps, progs, and globals described by bpf_*_skeleton objects. Signed-off-by: Delyan Kratunov <delyank@fb.com>
Master branch: 5a5c11e |
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>
This patch changes the selftests/bpf Makefile to also generate a subskel.h for every skel.h it would have normally generated. Separately, it also introduces a new subskeleton test which tests library objects, externs, weak symbols, kconfigs, and user maps. Signed-off-by: Delyan Kratunov <delyank@fb.com>
703211a
to
776268b
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=624058 irrelevant now. Closing PR. |
Pull request for series with
subject: Subskeleton support for BPF libraries
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=622431