v0.7.0
版本发布时间: 2021-10-11 20:30:56
cilium/ebpf最新发布版本:v0.16.0(2024-07-24 17:40:43)
The cilium/ebpf
project now has a mascot, the Honeygopher! Thank you, Vadim Shchekoldin!
New Packages
- Package ringbuf allows reading from a
BPF_MAP_TYPE_RINGBUF
map. - Package features implements the equivalent of
bpftool feature probe
for discovering BPF-related kernel features using native Go. Note that support for probing availability of BPF helpers is pending. - Package rlimit provides a convenient API to lift the
RLIMIT_MEMLOCK
constraint on kernels before 5.11.
Breaking Changes
- Deprecations
-
StructOpts
has been changed to alias the newStructOpsMap
and will be removed in 0.8.0 by @ti-mo in https://github.com/cilium/ebpf/pull/381 -
perf.IsClosed()
has been deprecated and will be removed in 0.8.0 by @lmb in https://github.com/cilium/ebpf/pull/397 -
Collection.Assign()
has been removed after a sunset period by @ti-mo in https://github.com/cilium/ebpf/pull/371
-
Features
- elf: support cgroup getsockname/getpeername prog by @zf1575192187 in https://github.com/cilium/ebpf/pull/350
- MapType probe API by @rgo3 in https://github.com/cilium/ebpf/pull/321
- link/uprobe: support filtering by pid by @mmat11 in https://github.com/cilium/ebpf/pull/342
- Add support for freplace programs by @zeffron in https://github.com/cilium/ebpf/pull/288
- Export
CollectionSpec.ByteOrder
by @ti-mo in https://github.com/cilium/ebpf/pull/361 - Support ELF map definitions larger than
bpf_map_def
by @ti-mo in https://github.com/cilium/ebpf/pull/362 - Auto-populate tail-call and map-in-map maps from ELF/BTF by @ti-mo in https://github.com/cilium/ebpf/pull/363
- features: add HaveProgType API by @rgo3 in https://github.com/cilium/ebpf/pull/355
- feature: add call fixups for bpf_probe_read_kernel, etc by @xh4n3 in https://github.com/cilium/ebpf/pull/367
- cmd/bpf2go: use Go 1.16 embed to include BPF elfs by @lmb in https://github.com/cilium/ebpf/pull/327
- bpf2go: add support for bpf_tracing.h by @lmb in https://github.com/cilium/ebpf/pull/369
- features: support get map ids from program. by @arikachen in https://github.com/cilium/ebpf/pull/391
- Recognize sk_reuseport programs by @lmb in https://github.com/cilium/ebpf/pull/393
- btf: handle float relocation for CO-RE by @lmb in https://github.com/cilium/ebpf/pull/403
- Utility function to remove memlock rlimit by @folbricht in https://github.com/cilium/ebpf/pull/392
- BPF ring buffer by @mythi in https://github.com/cilium/ebpf/pull/318
Bug Fixes
- link/uprobe: handle ENOTSUPP from the kernel's prepare_uprobe() by @ti-mo in https://github.com/cilium/ebpf/pull/351
- Mark PerCPUCGroupStorage as per-cpu by @yadutaf in https://github.com/cilium/ebpf/pull/341
- link/kprobe: don't redeclare a new variable sp by @guodongzz in https://github.com/cilium/ebpf/pull/365
- Fix invalid usage of reflect.SliceHeader by @cuonglm in https://github.com/cilium/ebpf/pull/376
- program: don't retrieve map ids by default by @lmb in https://github.com/cilium/ebpf/pull/395
- link/uprobe: fix offsets for statically linked binaries by @mmat11 in https://github.com/cilium/ebpf/pull/385
- Add sync.Pool to reduce allocations for the default case in unmarshalBytes() by @rockdaboot in https://github.com/cilium/ebpf/pull/420
- Fix btf.FindType to avoid copy by @pippolo84 in https://github.com/cilium/ebpf/pull/424
- Fix missing close of fds from BPF{ProgLoad,MapCreate} by @pippolo84 in https://github.com/cilium/ebpf/pull/428
- Directly handle int32 and int64 types in unmarshalBytes() by @rockdaboot in https://github.com/cilium/ebpf/pull/427
Examples
- Add kprobepin example showing how to re-use a pinned map in a BPF prog by @ungureanuvladvictor in https://github.com/cilium/ebpf/pull/364
- examples: adapt uretprobe example to the new library version by @mmat11 in https://github.com/cilium/ebpf/pull/389
- CI: build examples by @lmb in https://github.com/cilium/ebpf/pull/390
- Add a script to update vendored libbpf headers for examples by @markpash in https://github.com/cilium/ebpf/pull/394
- Add an example for the RINGBUF map type by @pippolo84 in https://github.com/cilium/ebpf/pull/412
- Add a tracepoint example and a percpu example by @hao-lee in https://github.com/cilium/ebpf/pull/402
- examples - convert to new rlimit package for memlock removal by @ti-mo in https://github.com/cilium/ebpf/pull/441
New Contributors
- @zf1575192187 made their first contribution in https://github.com/cilium/ebpf/pull/350
- @sharjeelaziz made their first contribution in https://github.com/cilium/ebpf/pull/349
- @zeffron made their first contribution in https://github.com/cilium/ebpf/pull/352
- @yadutaf made their first contribution in https://github.com/cilium/ebpf/pull/341
- @guodongzz made their first contribution in https://github.com/cilium/ebpf/pull/365
- @xh4n3 made their first contribution in https://github.com/cilium/ebpf/pull/367
- @cuonglm made their first contribution in https://github.com/cilium/ebpf/pull/376
- @mabis made their first contribution in https://github.com/cilium/ebpf/pull/378
- @arikachen made their first contribution in https://github.com/cilium/ebpf/pull/391
- @markpash made their first contribution in https://github.com/cilium/ebpf/pull/394
- @pippolo84 made their first contribution in https://github.com/cilium/ebpf/pull/401
- @folbricht made their first contribution in https://github.com/cilium/ebpf/pull/392
- @hao-lee made their first contribution in https://github.com/cilium/ebpf/pull/414
- @rockdaboot made their first contribution in https://github.com/cilium/ebpf/pull/420
- @mehrdadrad made their first contribution in https://github.com/cilium/ebpf/pull/439
- @lizrice made their first contribution in https://github.com/cilium/ebpf/pull/442
This release saw a record amount of new contributors! We'd like to wish everyone a warm welcome and thank you all for your support!
Full Changelog: https://github.com/cilium/ebpf/compare/v0.6.2...v0.7.0