[ANNOUNCEMENT] libbpf v1.0 release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Libbpf v1.0 ([0]) is here!

It's been a long journey for libbpf to get to 1.0, but it was worth
it. By taking time to get here, with community help and involvement,
we got a more well thought out, user friendly, and full-featured
library. libbpf 1.0 now provides a battle-tested foundation for
building any kind of BPF application. It also sets a good base for
future libbpf releases with more exciting functionality while
backwards compatibility across minor version releases, all while
keeping maintainability in focus.

A big "Thank you!" goes to hundreds of contributors and bug reporters
across the entire libbpf family of projects for all your work and
support!

**Congratulations on the long-awaited v1.0!**

To celebrate this event, I wrote a blog post ([1]) describing the
journey to libbpf 1.0 and also highlighting main breaking changes and
new functionality added on the way to libbpf 1.0. Please take a look
if you are a libbpf user.

See detailed change log for v1.0 below.

## User-space-side features and APIs:
- **All deprecated APIs and features removed!**
- support for syscall-specific kprobe/kretprobe
(`SEC("ksyscall/<syscall_name>")` and
`SEC("kretsyscall/<syscall_name>")`);
- support for sleepable uprobe BPF programs (`SEC("uprobe.s")`);
- support for per-cgroup LSM BPF programs (`SEC("lsm_cgroup")`);
- support for new BPF CO-RE relocation `TYPE_MATCHES`;
- `bpf_prog_load()` and `bpf_map_create()` are now smarter about
handling program and map name on old kernels (it will be ignored if
kernel doesn't support names);
- `BTF_KIND_ENUM64` support;
- increase tracing attachment (kprobe/uprobe/tracepoint) robustness by
using tracefs or debugfs, whichever is mounted;
- new APIs for converting BPF enums to their string representation:
  - `libbpf_bpf_prog_type_str()`;
  - `libbpf_bpf_map_type_str()`;
  - `libbpf_bpf_link_type_str()`;
  - `libbpf_bpf_attach_type_str()`;
- `bpf_program__set_autoattach()` and `bpf_program__autoattach()` to
allow opting out from auto-attaching of BPF program by BPF skeleton;
- `perf_buffer__buffer()` API to give access to underlying per-CPU
buffer for BPF ringbuf;
- `bpf_obj_get_opts()` API for more flexible fetching of BPF kernel
objects' information.

## BPF-side features and APIs;
- `bpf_core_type_matches()` helper macro to emit `TYPE_MATCHES` CO-RE
relocations;
- USDT support now doesn't rely on BPF CO-RE;
- new and improved `BPF_KSYSCALL()` macro for tracing syscalls, which
abstracts away a lot of kernel- and architecture-specific differences;
- new BPF helpers:
  - `bpf_skc_to_mptcp_sock()`;
  - `bpf_dynptr_from_mem()`;
  - `bpf_ringbuf_reserve_dynptr()`, `bpf_ringbuf_submit_dynptr()`,
`bpf_ringbuf_discard_dynptr()`;
  - `bpf_dynptr_read()`, `bpf_dynptr_write()`;
  - `bpf_dynptr_data()`;
  - `bpf_tcp_raw_gen_syncookie_ipv4()`,
`bpf_tcp_raw_gen_syncookie_ipv6()`,
`bpf_tcp_raw_check_syncookie_ipv4()`,
`bpf_tcp_raw_check_syncookie_ipv6()`;
  - `bpf_ktime_get_tai_ns()`.

## Bug fixes
- fix power-of-2 check when adjusting BPF ringbuf map size;
- improve robustness of pointer size determination in BTF processing;
- symbol offset calculation logic fixes for uprobes and USDTs;
- fixes for clean up of legacy kprobe/uprobe attachments on partial failures;
- fix register definition for riscv architecture;
- improve robustness of reused map name handling.

  [0] https://github.com/libbpf/libbpf/releases/tag/v1.0.0
  [1] https://nakryiko.com/posts/libbpf-v1/
  [2] Full Changelog: https://github.com/libbpf/libbpf/compare/v0.8.0...v1.0.0

-- Andrii



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux