libbpf v0.6 was just released ([0]). This is a pretty big release with both new features and a whole bunch of API deprecations and clean ups. So please take a look and give it a try! And please report any issues and bugs we might have missed during preparation of this release. I'd like to also call out the documentation effort started by Grant Seltzer. Thank you! I encourage everyone to contribute to this effort so that the libbpf v1.0 release documentation is in a great shape. Thanks a lot to all the contributors sending fixes and new features and all the users asking and answering libbpf and BPF questions, adopting and testing libbpf, and overall improving the BPF ecosystem! ## Important updates towards Libbpf 1.0 - a first big batch of deprecated APIs; compiler will let you know or grep for "LIBBPF_DEPRECATED". Please also double-check https://github.com/libbpf/libbpf/wiki/Libbpf-1.0-migration-guide. - documentation for a bunch of APIs added, available on https://libbpf.readthedocs.io/en/latest/api.html; - libbpf version APIs added: compile-time `LIBBPF_MAJOR_VERSION`/`LIBBPF_MINOR_VERSION` and runtime `libbpf_major_version()`/`libbpf_minor_version()`/`libbpf_version_string()`; - stricter logic for `SEC()` definition handling (opt-in until libbpf v1.0); see https://github.com/libbpf/libbpf/wiki/Libbpf:-the-road-to-v1.0#stricter-and-more-uniform-bpf-program-section-name-sec-handling for details. - function name will be used when pinning if `LIBBPF_STRICT_SEC_NAME` strict mode flag is specified; ## New features and APIs: - support custom `.rodata.*` and `.data.*` data sections; - `bpf_program__attach_kprobe()` and `bpf_program__attach_uprobe()` supports older kernels now (don't forget about `bpf_link__destroy()` when you are done!); - `BPF_MAP_TYPE_PROG_ARRAY` can be initialized statically with syntax similar to map-in-map initialization (see https://github.com/libbpf/libbpf/commit/472c0726e84d821186a315889c885b23895b155e for an example); - libbpf-less "light" skeleton gained new capabilities and got a bunch of fixes; - BTF support for `BTF_KIND_DECL_TAG` and `BTF_KIND_TYPE_TAG`; - new `bpf_prog_load()` and `bpf_map_create()` APIs supersede a whole zoo of to-be-deprecated APIs; - support for writable raw tracepoints (`SEC("raw_tp.w/...")`) added; - `btf__add_btf()` API for appending entire contents of BTF to another BTF object; - `bpf_program__insns()` and `bpf_program__insn_cnt()` to access underlying BPF assembly instructions; can be used for inspection or BPF program cloning. - a bunch of older APIs (`perf_buffer__new()`, `btf__dedup()`, `btf_dump__new()`, etc) were modernized to use OPTS infrastructure. ## BPF-side APIs and features: - unstable BPF helpers (kernel function calls) support for kernel modules; - `bpf_trace_vprintk()` helper and corresponding `bpf_printk()` macro enhancements. Note, `bpf_printk()` will now attempt to use static global functions, so on very old kernels this might break existing programs. Please `#define BPF_NO_GLOBAL_DATA` before `#include <bpf/bpf_helpers.h>` if that's the case for you. - `bpf_get_branch_snapshot()` helper; - `bpf_skc_to_unix_sock()` helper; - `bpf_find_vma()` helper; - `SEC("tc")` added as a replacement for `SEC("classifier")`. ## Bug fixes and compatibility improvements: - libbpf now guarantees that all FDs for BPF programs, maps, BTFs, and links are strictly greater than 0, which is important for some BPF UAPIs; - no need to use `__uint(key_size, ...)` for special BPF maps (e.g., `BPF_MAP_PERF_EVENT_ARRAY`). Libbpf automatically downgrades `__type(key, int)` into key_size, if a map doesn't support BTF types for keys and values; - endianness fixes in `BPF_CORE_READ_BITFIELD_PROBED()` macro; - `btf_dump__dump_type_data()` improvements for handling unaligned data; - various fixes and improvements found though fuzzing and sanitizers. **Full Changelog**: https://github.com/libbpf/libbpf/compare/v0.5.0...v0.6.0 [0] https://github.com/libbpf/libbpf/releases/tag/v0.6.0 -- Andrii