github cilium/ebpf v0.7.0
v0.7.0: Honeygopher Edition

latest releases: v0.15.0, v0.14.0, v0.13.2...
2 years ago

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 new StructOpsMap and will be removed in 0.8.0
      by @ti-mo in #381
    • perf.IsClosed() has been deprecated and will be removed in 0.8.0
      by @lmb in #397
    • Collection.Assign() has been removed after a sunset period
      by @ti-mo in #371

Features

  • elf: support cgroup getsockname/getpeername prog by @zf1575192187 in #350
  • MapType probe API by @rgo3 in #321
  • link/uprobe: support filtering by pid by @mmat11 in #342
  • Add support for freplace programs by @zeffron in #288
  • Export CollectionSpec.ByteOrder by @ti-mo in #361
  • Support ELF map definitions larger than bpf_map_def by @ti-mo in #362
  • Auto-populate tail-call and map-in-map maps from ELF/BTF by @ti-mo in #363
  • features: add HaveProgType API by @rgo3 in #355
  • feature: add call fixups for bpf_probe_read_kernel, etc by @xh4n3 in #367
  • cmd/bpf2go: use Go 1.16 embed to include BPF elfs by @lmb in #327
  • bpf2go: add support for bpf_tracing.h by @lmb in #369
  • features: support get map ids from program. by @arikachen in #391
  • Recognize sk_reuseport programs by @lmb in #393
  • btf: handle float relocation for CO-RE by @lmb in #403
  • Utility function to remove memlock rlimit by @folbricht in #392
  • BPF ring buffer by @mythi in #318

Bug Fixes

  • link/uprobe: handle ENOTSUPP from the kernel's prepare_uprobe() by @ti-mo in #351
  • Mark PerCPUCGroupStorage as per-cpu by @yadutaf in #341
  • link/kprobe: don't redeclare a new variable sp by @guodongzz in #365
  • Fix invalid usage of reflect.SliceHeader by @cuonglm in #376
  • program: don't retrieve map ids by default by @lmb in #395
  • link/uprobe: fix offsets for statically linked binaries by @mmat11 in #385
  • Add sync.Pool to reduce allocations for the default case in unmarshalBytes() by @rockdaboot in #420
  • Fix btf.FindType to avoid copy by @pippolo84 in #424
  • Fix missing close of fds from BPF{ProgLoad,MapCreate} by @pippolo84 in #428
  • Directly handle int32 and int64 types in unmarshalBytes() by @rockdaboot in #427

Examples

  • Add kprobepin example showing how to re-use a pinned map in a BPF prog by @ungureanuvladvictor in #364
  • examples: adapt uretprobe example to the new library version by @mmat11 in #389
  • CI: build examples by @lmb in #390
  • Add a script to update vendored libbpf headers for examples by @markpash in #394
  • Add an example for the RINGBUF map type by @pippolo84 in #412
  • Add a tracepoint example and a percpu example by @hao-lee in #402
  • examples - convert to new rlimit package for memlock removal by @ti-mo in #441

New Contributors

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: v0.6.2...v0.7.0

Don't miss a new ebpf release

NewReleases is sending notifications on new releases.