[ANNOUNCEMENT] libbpf v1.2 release

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

 



Libbpf v1.2 has been released ([0])!

It's been about 4 months since libbpf v1.1 release, and it feels like
this is the right time to cut another one. This release is a healthy
mix of new features on both user space and BPF side of libbpf, coupled
with a bunch of bug fixes and improvements to existing APIs and
features. There are exciting improvements to libbpf documentation as
well, but more documentation contributions are always welcome!

A big thank you goes to all the contributors that are constantly
making libbpf a better BPF loader library!

Please find the summary of libbpf v1.2 changes below.


## User space-side features and APIs:

- completely overhauled ["Libbpf
overview"](https://libbpf.readthedocs.io/en/latest/libbpf_overview.html)
landing documentation page;
- support attaching to uprobes/uretprobes to functions defined in
Android APK archives;
- support for BPF link-based `struct_ops` programs:
  - `SEC(".struct_ops.link")` annotations;
  - `bpf_map__attach_struct_ops()` attach API;
  - `bpf_link__update_map()` link update API;
- support sleepable `SEC("struct_ops.s")` programs;
- improved thread-safety of libbpf print callbacks and `libbpf_set_print()`;
- improve handling and reporting of missing BPF kfuncs;
- `bpf_{btf,link,map,prog}_get_info_by_fd()` APIs;
- `bpf_xdp_query_opts()` supports fetching XDP/XSK supported features;
- `perf_buffer__new()` allows customizing notification/sampling period now;
- BPF verifier logging improvements:
  - pass-through BPF verifier log level and flags to kernel as is;
  - support `log_true_size` for getting required log buffer size to
fit BPF verifier log completely;
- allow precise control over kprobe/uprobe attach mode: legacy,
perf-based, link-based.


## BPF-side features and APIs;

- support for BPF open-coded iterators: `bpf_for()`, `bpf_repeat()`,
`bpf_for_each()`;
- `bpf_ksym_exists()` macro to check existence of ksyms/kfuncs and
kconfig values;
- `BPF_UPROBE()` and `BPF_URETPROBE()` macros;
- `BPF_KPROBE()` and `BPF_UPROBE()` macros allow fetching up to 8
passed in registers arguments, depending on architecture support;
- `BPF_KSYSCALL()` supports fetching all 6 syscall arguments now;
- LoongArch support in bpf_tracing.h;
- USDT support for 32-bit ARM architecture.


## Bug fixes

- fix legacy kprobe events names sanitization;
- fix clobbering errno in some cases;
- fix BPF map's `BPF_F_MMAPABLE` flag sanitization;
- fix BPF-side USDT support code on s390x architecture;
- fix `BPF_PROBE_READ{_STR}_INTO()` on s390x architecture;
- fix kernel version setting for Debian kernels;
- fix netlink protocol handling in some cases;
- improve robustness of attaching to legacy kprobes and uprobes;
- fix double-free during static linking empty ELF sections;
- a bunch of other small fixes here and there.


[0] https://github.com/libbpf/libbpf/releases/tag/v1.2.0
[1] Full Changelog: https://github.com/libbpf/libbpf/compare/v1.1.0...v1.2.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