v0.12.0
版本发布时间: 2023-10-11 21:26:04
cilium/ebpf最新发布版本:v0.16.0(2024-07-24 17:40:43)
This release requires at least Go 1.20. It is mainly a bugfix release without any expected breaking changes. Map operations have also been made faster on the Go side.
Fixes
Correctly freeze .rodata
maps
.rodata
maps were frozen after programs referring to them were loaded, preventing the verifier from eliminating dead code based on the contents of the .rodata
maps. Upgrade if you're running into odd verifier errors that don't occur on libbpf.
See https://github.com/cilium/ebpf/pull/1159.
Fix fd leak in error path of kfunc support
The library leaked file descriptors when trying to use non-existent kfuncs.
See https://github.com/cilium/ebpf/pull/1145.
Fix incorrect formatting of signed BTF enums with negative values
Signed enums with negative values were incorrectly formatted, leading to invalid output from bpf2go
.
See https://github.com/cilium/ebpf/pull/1155.
Additions
Map operations using common types are much faster
Keys and values used in map operations were indiscriminately passed through the encoding/binary
package. There is now a fast path which skips this step when the in-memory layout of a type is equivalent to the output produced by binary.Write
. The result is less allocations and CPU usage.
The optimization doesn't apply to per-CPU maps.
See https://github.com/cilium/ebpf/pull/1062.
What's Changed
- .semaphore: rename master to main by @lmb in https://github.com/cilium/ebpf/pull/1092
- improv: make errors more conclusive by @kwakubiney in https://github.com/cilium/ebpf/pull/1071
- elf: don't clamp PerfEventArray.MaxEntries at parse time by @lmb in https://github.com/cilium/ebpf/pull/1094
- internal/sys: make generate-btf and regenerate types by @florianl in https://github.com/cilium/ebpf/pull/1105
- all: fix typos in comments and tests by @alexandear in https://github.com/cilium/ebpf/pull/1109
- Add riscv64 Linux string by @hack3ric in https://github.com/cilium/ebpf/pull/1110
- go: require v1.20 by @lmb in https://github.com/cilium/ebpf/pull/1112
- testutils: log random seed to test output by @lmb in https://github.com/cilium/ebpf/pull/1113
- Ringbuf read on timeout by @RonFed in https://github.com/cilium/ebpf/pull/1111
- elf: don't set BPF_F_MMAPABLE on .kconfig by @lmb in https://github.com/cilium/ebpf/pull/1128
- implementation for hinting on possible error on map create with noPrealloc flag set by @kwakubiney in https://github.com/cilium/ebpf/pull/1102
- docker: rebuild ebpf-builder to include go 1.20 by @lmb in https://github.com/cilium/ebpf/pull/1130
- CI: test against 6.1 by @lmb in https://github.com/cilium/ebpf/pull/1131
- Add metadata to instructions returned by program info by @dylandreimerink in https://github.com/cilium/ebpf/pull/1118
- Support attaching fentry / fexit on user-defined programs by @jschwinger233 in https://github.com/cilium/ebpf/pull/1097
- map: zero-allocation operations for common types by @lmb in https://github.com/cilium/ebpf/pull/1062
- elf_reader_test: check for bpf_testmod before running TestInvalidKfunc by @ti-mo in https://github.com/cilium/ebpf/pull/1135
- CI: add github actions by @lmb in https://github.com/cilium/ebpf/pull/1134
- btf: work around missing ENUM64 support by @lmb in https://github.com/cilium/ebpf/pull/1132
- run-tests: support new packaging by @lmb in https://github.com/cilium/ebpf/pull/1091
- Update bpf2go and stringer go:generate statements across the codebase by @ti-mo in https://github.com/cilium/ebpf/pull/1140
- Drop LLVM 7 and 9 in favor of 11, 14 and 17 by @ti-mo in https://github.com/cilium/ebpf/pull/1141
- btf: clean up some small things by @lmb in https://github.com/cilium/ebpf/pull/1139
- CI: update apt repositories by @lmb in https://github.com/cilium/ebpf/pull/1146
- linker: fix fd leak in fixupKfuncs by @lmb in https://github.com/cilium/ebpf/pull/1145
- Project documentation website by @ti-mo in https://github.com/cilium/ebpf/pull/1017
- dependabot: add configuration, ignore indirect Python dependencies by @ti-mo in https://github.com/cilium/ebpf/pull/1148
- build(deps): bump mkdocs-material from 9.3.2 to 9.4.3 in /docs by @dependabot in https://github.com/cilium/ebpf/pull/1150
- bpf2go,collection: fix typos in test and comment by @alexandear in https://github.com/cilium/ebpf/pull/1138
- docs: remove partials override for content.html by @ti-mo in https://github.com/cilium/ebpf/pull/1153
- sys: small cleanups by @lmb in https://github.com/cilium/ebpf/pull/1154
- docs: copy shorthands to clipboard in getting-started by @ti-mo in https://github.com/cilium/ebpf/pull/1158
- testdata: drop the use of clang_major directive by @ti-mo in https://github.com/cilium/ebpf/pull/1151
- btf: fix writing out signed enums by @lmb in https://github.com/cilium/ebpf/pull/1155
- elf: assume BTF support in loader tests by @lmb in https://github.com/cilium/ebpf/pull/1161
- elf: Add support for map struct typedef by @anjmao in https://github.com/cilium/ebpf/pull/1125
- Freeze .rodata before trying to load programs by @ti-mo in https://github.com/cilium/ebpf/pull/1159
New Contributors
- @alexandear made their first contribution in https://github.com/cilium/ebpf/pull/1109
- @hack3ric made their first contribution in https://github.com/cilium/ebpf/pull/1110
- @RonFed made their first contribution in https://github.com/cilium/ebpf/pull/1111
- @jschwinger233 made their first contribution in https://github.com/cilium/ebpf/pull/1097
- @dependabot made their first contribution in https://github.com/cilium/ebpf/pull/1150
- @anjmao made their first contribution in https://github.com/cilium/ebpf/pull/1125
Full Changelog: https://github.com/cilium/ebpf/compare/v0.11.0...v0.12.0