aquasecurity / btfhub

BTFhub, in collaboration with the BTFhub Archive repository, supplies BTF files for all published kernels that lack native support for embedded BTF. This joint effort ensures that even kernels without built-in BTF support can effectively leverage the benefits of eBPF programs, promoting compatibility across various kernel versions.
Apache License 2.0
377 stars 43 forks source link

remove bpftool binaries and create a bpftool submodule #76

Open rafaeldtinoco opened 1 year ago

rafaeldtinoco commented 1 year ago

Currently we have 2 bpftool binaries in order to generate the tailored BTF files. Instead of having binaries in the repo, now that bpftool has a GitHub repository:

https://github.com/libbpf/bpftool

We can simply have that repository as a submodule and compile bpftool as part of the process of using it.

brycekahle commented 1 year ago

One downside to this, is that you need a full setup to be able to build bpftool everywhere you want to run btfhub.

rafaeldtinoco commented 1 year ago

Done by:

https://github.com/aquasecurity/btfhub/pull/95 https://github.com/aquasecurity/btfhub/pull/96

Unfortunately, with the mentioned downside. The bpftool compilation is agnostic to distro (depends on available -dev packages so it can be built).

Maybe I should create a docker container to compile both: bpftool and pahole statically, and then install the result binaries where we're running btfhub. This would give us a way to always have both updated whenever we want (oracle/suse/rhel/debian/ubuntu).