Releases: libbpf/libbpf
Releases · libbpf/libbpf
libbpf v0.1.0
New features/APIs:
__ksymextern variables support for getting kernel symbol addresses;- BPF XDP link support;
bpf_program__set_autoload()to disable loading and verifying specific BPF programs;- support for attaching map elements BPF iterator programs;
- new getters/setters for more control over BPF map definitions;
- all destructor-like APIs (e.g.,
perf_buffer__free()andbpf_object__close()) now accept pointers returned on error (in addition toNULLand valid pointers) and ignore them, no need to guard destructors with extra checks now; bpf_link__detach()for force-detaching link, while it's still alive;btf__parse_raw()andbtf__parse()APIs for more convenient and flexible BTF parsing.
New BPF program types supported:
cgroup/sock_release(BPF_CGROUP_INET_SOCK_RELEASE);cgroup/sock_createis an alias forcgroup/socknow;xdp_cpumap;sk_lookup.
BPF-side APIs:
- most BPF helpers now return
longfor better code generation; bpf_endian.hnow can be included along thevmlinux.h;bpf_get_task_stack();bpf_skc_to_tcp6_sock(),bpf_skc_to_udp6_sock();bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock();PT_REGSmacros fixes for MIPS architecture.
Bug fixes:
- CO-RE relocations in
.textsection (in sub-programs) are now performed properly; - vmlinux BTF is not loaded unnecessarily twice;
perf_buffer__new()can be used on old kernels down to at least 4.9 version;- libbpf's internal hashmap fixes for 32-bit architectures;
- few BTF sanitization bugs and memory leaks fixed;
btf_dumphandling of GCC built-in types for Arm NEON fixed;- BTF-defined map-in-map initialization fixed for 32-bit architectures;
- various BTF fixes for 32-bit architectures.
libbpf v0.0.9
New features:
- BTF-defined map-in-map support;
- bpf_link support expanded to support new kernel BPF link objects;
- BPF_ENABLE_STATS API;
- new BPF ringbuf map support, added ring_buffer API for consuming;
- bpf_link-backed netns attachment (flow_dissector).
New BPF program types supported:
- BPF iterator programs;
- getpeername, getsockname;
- xdp_devmap.
New BPF helpers:
- bpf_ktime_get_boot_ns();
- bpf_seq_printf(), bpf_seq_write();
- offsetof()/container_of() macro added to bpf_helpers.h;
- bpf_sk_cgroup_id(), bpf_sk_ancestor_cgroup_id();
- bpf_csum_level().
Bug fixes:
- bpf_object__load() better error code propagation;
- few memory leaks and corruptions fixed;
- register naming in PT_REGS s390 macros;
- .bss pre-setting through skeleton is now supported as well.
libbpf v0.0.8
New BPF program types supported:
- lsm;
- fmod_ret.
New APIs:
- bpf_link pinning;
- bpf_link-based cgroup attachments;
- bpf_program__set_attach_target() to customize freplace BPF programs;
- EXPECTED_FD field support in bpf_set_link_xdp_fd_opts()
- bpf_map__set_initial_value() to specify intial value of read-only maps.
New BPF helpers:
- bpf_read_branch_records();
- bpf_get_ns_current_pid_tgid();
- get_netns_cookie();
- bpf_xdp_output();
- bpf_sk_assign();
- PT_REGS macro fixes;
- CO-RE variants of PT_REGS macros.
Bug fixes:
- CO-RE relocation edge cases;
- expected_attach_type handling fixes at load time;
- fixes in hanling kernels without BTF support;
- internal map sanitization improvements.
libbpf v0.0.7
Major new features:
- BPF skeleton support;
- Kconfig extern variables support;
- STRUCT_OPS support;
- support for BPF program extensions;
- cgroup MULTI-mode support (bpf_prog_attach_xattr() API).
- bpf_send_signal_thread() BPF helper;
Usability improvements:
- BPF CO-RE improvements (flexible array, LDX/ST/STX instructions, improved conditional relocations);
- generic bpf_program__attach() API;
- SK_REUSEPORT program type support;
- bpf_link_disconnect();
- bpf_find_kernel_btf() API exposed;
- large instruction limit probing added;
- improved error message for RLIMIT_MEMLOCK.
Fixes:
- fix perf_buffer handling of offline/missing CPUs;
- various other fixes and usability improvements.
libbpf v0.0.6
New features/APIs:
- new extensible bpf_object__open_{file,mem} APIs and DECLARE_LIBBPF_OPTS() macro to go with them;
- bpf_helpers.h, bpf_endian.h, and bpf_tracing.h are now distributed with libbpf;
- BPF CO-RE: added field size, field existence, and bitfield relocation support;
- BPF CO-RE: BPF_CORE_READ(), bpf_core_field_exists(), bpf_core_field_size() and other BPF CO-RE related helpers available through bpf_core_read.h header;
- bpf_object__open() API now auto-detects program type from its section name;
- BPF_PROG_TRACING programs support (incuding BTF-typed raw tracepoints, fentry/fexit programs);
- mmap() support for BPF global variables;
- declarative map pinning support added;
- probe_read_{user,kernel}[_str]() BPF helpers added;
- bpf_get_link_xdp_info() function to get more XDP information added;
- a bunch of other AF_XDP changes;
Usability improvements:
- no need for
int version SEC('version') = 1;anymore; - raw_tp/tp and uprobe/uretprobe section prefixes added;
- new bpf_program__get_{type,expected_attach_type} getters;
- preserve error code on program load failure;
Fixes (most notable ones):
- btf_dump padding handling;
- bpf_object__name() returning name, not path;
- ELF section handling off-by-one bug fix;
- mem leak/double free fix in BPF program relocation code;
libbpf v0.0.5
Changes:
- bpf_btf_get_next_id() API to iterate over system's BTF objects;
- libbpf_set_print() now returns previously set print callback;
- libbpf versioning, build, and packaging improvements;
- convenience helpers for working with BTF types;
- experimental BPF CO-RE relocation support;
- various AF_XDP fixes and enhancements;
- lots of bug fixes and small improvements all around the library from many contributors.
N.B. This is a first release of libbpf that uses symbol versioning. Please let us know if you encounter any issue because of that.
libbpf v0.0.4
Changes:
- BTF-defined maps;
- tracing attachment APIs and bpf_link abstraction;
- perf buffer API;
- BTF-to-C conversion API;
btf__parse_elfAPI for loading .BTF from ELF files;libbpf_num_possible_cpus()added;- passing through
prog_flagsthroughbpf_object__open; - new attach types detection added;
- various bug fixes, code clean up, etc;
libbpf v0.0.3
First tagged release