v0.9.2
版本发布时间: 2022-09-20 16:39:01
cilium/ebpf最新发布版本:v0.16.0(2024-07-24 17:40:43)
This release contains an important bugfix for users of Program.Test()
and .Benchmark()
. A kernel change was made that disallows empty packet buffers, with knock-on effects to BPF_PROG_RUN
and, as a result, ebpf-go's detection routine for said feature. Users are strongly encouraged to upgrade. See #788 for more details.
The new features.HaveMapFlag()
API was merged in this release, congrats @paulcacheux!
Likewise, the link.K(ret)probeMulti()
API was added by @mmat11, bringing blazingly-fast bulk kprobe attachments to kernels 5.18 and newer.
Some improvements were made to verifier log handling. The VerifierError.Truncated
flag can now reliably be used to determine if a program load should be retried due to the provided buffer size being too small. Use this to retry with incrementally growing log buffers for large or complex programs. The Log*
fields in ProgramOptions
are now thoroughly documented to this effect.
It also bumps the minimum Go version to 1.18, since 1.19 is now out.
What's Changed
- run-tests: show curl error messages by @lmb in https://github.com/cilium/ebpf/pull/738
- elf_reader: only read data from PROGBITS sections, ignore NOBITS by @ti-mo in https://github.com/cilium/ebpf/pull/740
- program: support tracing of kernel modules by @lmb in https://github.com/cilium/ebpf/pull/737
- CI: Test against kernel 5.18 by @ti-mo in https://github.com/cilium/ebpf/pull/668
- internal: fix VerifierError output with empty log by @lmb in https://github.com/cilium/ebpf/pull/743
- elf_reader: Allow strings read-only global data sections by @dylandreimerink in https://github.com/cilium/ebpf/pull/742
- CI: expose individual test results by @lmb in https://github.com/cilium/ebpf/pull/748
- Fix arm64 testsuite failures by @lmb in https://github.com/cilium/ebpf/pull/745
- link: (u|k)probe: don't treat EINVAL as os.ErrNotExist by @ti-mo in https://github.com/cilium/ebpf/pull/751
- features: remove EPERM wrapping exception, automatically wrap errors by @ti-mo in https://github.com/cilium/ebpf/pull/749
- features: implement probes for StructOps maps and programs by @ti-mo in https://github.com/cilium/ebpf/pull/746
- perf add timeout argument by @xpu22 in https://github.com/cilium/ebpf/pull/736
- epoll deadline fixups by @lmb in https://github.com/cilium/ebpf/pull/758
- prog: unconditionally enable verifier retries, add consts, document LogLevel by @ti-mo in https://github.com/cilium/ebpf/pull/754
- program: fix comment typo by @wozniakjan in https://github.com/cilium/ebpf/pull/764
- bpf2go: replace deprecated io/ioutil function by @florianl in https://github.com/cilium/ebpf/pull/762
- btf: minimal support for BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG by @lmb in https://github.com/cilium/ebpf/pull/747
- features: add HaveMapFlag API by @paulcacheux in https://github.com/cilium/ebpf/pull/673
- Build, test and format with Go 1.19, minimum 1.18 by @ti-mo in https://github.com/cilium/ebpf/pull/765
- errors: remove verifier truncation heuristic, rely on ENOSPC by @ti-mo in https://github.com/cilium/ebpf/pull/756
- examples: clarify how to rebuild by @lmb in https://github.com/cilium/ebpf/pull/767
- feature: define
sys.MapFlags
and re-export it for map flags feature detection by @paulcacheux in https://github.com/cilium/ebpf/pull/766 - cmd/bpf2go: clarify -target usage with bpf_tracing.h by @lmb in https://github.com/cilium/ebpf/pull/773
- examples: add sockops example by @bigmikes in https://github.com/cilium/ebpf/pull/771
- features: fix incorrect lock in probeMisc by @lmb in https://github.com/cilium/ebpf/pull/775
- link: memoize PMU event types read from sysfs by @lmb in https://github.com/cilium/ebpf/pull/774
- btf: handle signed enums and fix default signedness by @lmb in https://github.com/cilium/ebpf/pull/781
- iter: Add support to load sleepable iterator program type by @olsajiri in https://github.com/cilium/ebpf/pull/777
- Correct misleading unpin error in progAttachCgroup by @weiqiangt in https://github.com/cilium/ebpf/pull/787
- Fix haveProgTestRun on kernel version 5.15.65 by @player-two in https://github.com/cilium/ebpf/pull/788
- Provide 15-byte context inputs to
Program.{Run,Benchmark,Test}
by @ti-mo in https://github.com/cilium/ebpf/pull/792 - link: implement kprobe.multi link by @mmat11 in https://github.com/cilium/ebpf/pull/716
New Contributors
- @wozniakjan made their first contribution in https://github.com/cilium/ebpf/pull/764
- @weiqiangt made their first contribution in https://github.com/cilium/ebpf/pull/787
- @player-two made their first contribution in https://github.com/cilium/ebpf/pull/788
Full Changelog: https://github.com/cilium/ebpf/compare/v0.9.1...v0.9.2