github cilium/ebpf v0.8.0

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

We're happy to announce our first release of 2022!

Breaking Changes

  • Deprecations
    • Deprecate StructOpts and perf.IsClosed() by @ti-mo in #547
  • cmd/bpf2go: strip DWARF info by @lmb in #481
    DWARF info is now stripped from compiled BPF objects by default when using bpf2go, resulting in significant savings in object size. It can be re-enabled if desired.

  • elf_reader: emit UnspecifiedPrograms into CollectionSpec by @ti-mo in #529
    Previously, ProgramSpecs were not emitted to CollectionSpec.Programs if their ELF section names were not recognized.
    This limitation has been lifted: programs that are explicitly assigned to an ELF section will now always appear in the CollectionSpec, though they will all be of type UnspecifiedProgram. The SectionName field was added to help the user determine program types manually.

  • map: make Map.Extra field a pointer to a bytes.Reader by @ti-mo in #546
    A last-minute addition, no longer allocate an empty bytes.Reader for every Map, as this is generally only used when loading legacy programs with iproute2 map definitions. If you're using this field, check for nil before accessing.

Features

  • automatically generate syscall wrappers by @lmb in #425
  • asm: update eBPF built-in functions by @florianl in #459
  • program: add program type syscall by @florianl in #458
  • Add v5.14 to CI builds by @lmb in #462
  • Improve kernel 4.4.x compatibility by @nplanel in #436
  • Add BTFIDLink to support fentry/fexit/fmod_ret/tp_raw/lsm BPF programs by @mehrdadrad in #460
  • link/uprobe: support ref_ctr_offset by @mmat11 in #463
  • Allows user space to update/lookup map elements under bpf_spin_lock by @mehrdadrad in #473
  • Makefile: prefer podman for container engine by @syscll in #480
  • asm: add Instructions.SizeBytes() for convenience and readability by @ti-mo in #492
  • Link: add XDP support by @mehrdadrad in #484
  • link: add LoadPinnedLink by @lmb in #491
  • implement BPF_PROG_BIND_MAP by @florianl in #485
  • use clang 13 by @lmb in #488
  • Read LINUX_VERSION_CODE from vDSO ELF header instead of uname by @brycekahle in #500
  • cmd/bpf2go: infer llvm-strip suffix from clang binary by @lmb in #504
  • Add support for function pointers by @pippolo84 in #499
  • prog: update program types from libbpf by @mehrdadrad in #496
  • btf: rename FindType to TypeByName, add TypesByName and TypeByID methods by @ti-mo in #503
  • btf: support raw BTF in LoadSpecFromReader by @lmb in #520
  • cmd/bpf2go: allow to specify native target by @tklauser in #526
  • asm: Add Jump32 support by @arthurfabre in #514
  • link: expose link info with type-specific information by @mehrdadrad in #509
  • Adopt Go 1.18 fuzzing and fix btf crashes by @lmb in #530
  • elf_reader,btf: support multiple programs per ELF section by @ti-mo in #508
  • Eliminate binary.Read in instruction (un)marshaler by @ti-mo in #532
  • program: retrieve xlated Instructions from Program by @ti-mo in #538
  • Support attaching SocketFilter programs to raw sockets by @folbricht in #540

Bug Fixes

  • CI: add make clean before testdata rebuild by @ti-mo in #450
  • sys: avoid zero fd by @lmb in #454
  • run-tests: don't require CI_MAX_KERNEL_VERSION to be set by @lmb in #470
  • features: fix HaveProgType(ebpf.Syscall) by @rgo3 in #471
  • elf: fix some typos in getProgType by @alxn in #493
  • CI: work around hung agents by @lmb in #516
  • link: switch tests from printk to vprintk symbol by @ti-mo in #518
  • map: allow empty ProgramArray to not be assigned by @lmb in #513
  • prog: don't panic when prog load EPERMs with empty verifier log by @ti-mo in #519
  • map, prog: fix typo in MEMLOCK error string by @tklauser in #527
  • btf: only return exact matches from AnyTypesByName by @lmb in #525
  • Remove BTF type IDs on map creation if not supported by @chenhengqi in #534
  • rlimit: avoid lowering Max rlimit by @ti-mo in #533
  • linker: Allow calling into unimplemented forward function declarations by @ti-mo in #544

Documentation

  • cmd/bpf2go: move doc to README by @lmb in #446

Examples

New Contributors

During this release cycle, we've welcomed the following new contributors:

Thanks to all contributors for your support!

Full Changelog: v0.7.0...v0.8.0

Don't miss a new ebpf release

NewReleases is sending notifications on new releases.