Skip to content

libbpf: make use of BTF through sysfs

Andrii Nakryiko bpf netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinuxDocumentation/ABI/testing/sysfs-kernel-btf kernel/bpf/sysfs_btf.c scripts/link-vmlinux.sh+25 -250 replies
2/2libbpf: attempt to load kernel BTF from sysfs firsttools/lib/bpf/libbpf.c+57 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] libbpf: make use of BTF through sysfs

Now that kernel's BTF is exposed through sysfs at well-known location, attempt to load it first as a target BTF for the purpose of BPF CO-RE relocations.

Patch #1 is a follow-up patch to rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux.
Patch #2 adds ability to load raw BTF contents from sysfs and expands the list of locations libbpf attempts to load vmlinux BTF from.

Andrii Nakryiko (2):
btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux
libbpf: attempt to load kernel BTF from sysfs first

 Documentation/ABI/testing/sysfs-kernel-btf |  2 +-
 kernel/bpf/sysfs_btf.c                     | 30 +++++-----
 scripts/link-vmlinux.sh                    | 18 +++---
 tools/lib/bpf/libbpf.c                     | 64 +++++++++++++++++++---
 4 files changed, 82 insertions(+), 32 deletions(-)
Signature · 1 line
2.17.1