Skip to content

Releases: aquasecurity/libbpfgo

v0.4.4-libbpf-1.0.1

25 Oct 14:23
9ba4e04
Compare
Choose a tag to compare

Fixes included:

  • fix: re-introduce memory bumping (#265)

v0.4.3-libbpf-1.0.1

18 Oct 16:07
57b6f6d
Compare
Choose a tag to compare

This is a very small release in which the main purpose is to (finally) fully separate the helpers module from libbpfgo by removing dependence on libbpfgo within helpers. This also includes an awesome new feature for setting global variables.

What's Changed

  • Redefine BPFProgType constants and remove libbpfgo import by @grantseltzer in #263
  • Add InitGlobalVariable to support setting global variables in bpf code by @mozillazg in #258

Full Changelog: v0.4.2-libbpf-1.0.1...v0.4.3-libbpf-1.0.1

v0.4.2-libbpf-1.0.1

11 Oct 23:41
05f36cd
Compare
Choose a tag to compare

This is a patch release updating the libbpf submodule and intended support for libbpf v1.0.1 from the previous release (v0.4.1-libbpf-1.0.0) which used libbpf v1.0.0. There are otherwise no changes.

v0.4.1-libbpf-1.0.0

10 Oct 14:04
76c5ff4
Compare
Choose a tag to compare

v0.4.1-libbpf-1.0.0

This release of libbpfgo is meant to used with libbpf v1.0.0

Breaking Changes

  • The package github.com/aquasecurity/libbpfgo/helpers is now contained in its own module. You can now upgrade it as a dependency independently of libbpfgo.
    You may run into errors when running go mod tidy that can be fixed by clearing your go cache or explicitly go geting the latest version of it.
    • Each release will cut new releases of both the helpers and libbpfgo module, but upgrading one does not require you to upgrade the other.

New features

  • Introduced a vagrantfile for running tests in a working VM environment (#237)

Improvements/Fixes

  • The value of errno is now properly saved before calls to printf (#256 - Thanks @mozillazg)
  • CGO code is now in its own header file (#257 - Thanks @mozillazg!)
  • Fixed an issue with how cgo handled bitmap padding optimizations in libbpf (#246)
  • Optimized retrieving kernel symbols from symbol table, now caches by address and name (#241)

Full Changelog

76c5ff4 - remove defunct tests (#259) (grantseltzer)
3c30919 - Move embedded C code to a header file (#257) (Huang Huang)
9eb6002 - Helpers in its own mod followup (#255) (grantseltzer)
b398b6e - Save the value of errno before calling printf in cgo code (#256) (Huang Huang)
7139cb4 - Make helpers package it's own module (#246) (grantseltzer)
a8b06c3 - c: stdarg: move references to commit, add a note (Geyslan Gregรณrio)
245a1a1 - Update libbpfgo.go (Geyslan Gregรณrio)
7c90aa9 - Fix undefined behaviour in variadic argument handling (Francisco Javier Honduvilla Coto)
14c6bc9 - Move logic into C code via cgo (rotscale)
c93e66f - kernel_symbols: cache symbols by addr (Nadav Strahilevitz)
bd31ff0 - builder: vagrant: introduce Vagrantfile (Geyslan Gregรณrio)
33d4c0d - makefile: fix vmlinuxh rule (Geyslan Gregรณrio)
b5b0a6e - helpers: remove debugging leftover (#236) (Rafael David Tinoco)
45a1acd - fix Makefiles typos (#235) (Geyslan Gregรณrio)
0f69086 - Clarify code in comments and var names (grantseltzer)
7d0ebda - Quick fix to logic in helpers (grantseltzer)

v0.4.0-libbpf-1.0.0

01 Sep 13:34
Compare
Choose a tag to compare

v0.4.0-libbpf-1.0.0

This release of libbpfgo now provides official support for libbpf v1.0.0

Breaking Changes

  • CompareKernelRelease helper now has two returns (adding an error, using a typed return) #232
  • SocketOption Parsing has a few changes to its API. (#203)
    • The type SocketOptionArgument is now a struct (previous uint64), which affects all related constants
    • ParseSocketOption has been removed and replaced by ParseSetSocketOption and ParseGetSocketOption

Fixes to parsing of getsockopt/setsockopt options argument (#203)

New features

  • Accessor functions like BPFMap.GetFd(), BPFMap.GetName(), BPFMap.GetPinPath(),... are now aliases of functions without 'get' (#230)
  • Support for legacy cgroup attachment (#214)
  • Helpers and constants for parsing bpf program type (#209)
  • Added AttachNetns API to wrap bpf_program__atach_netns (#205 - Thanks @mozillazg!)

Improvements/Fixes

  • libbpfgo will not bump rlimit_memlock anymore, libbpf handles this automatically now
  • New selftests - attaching to cgroups and cgroup-legacy (#204, #214) - Thanks @mozillazg!
  • Makefile target for running unit tests in helpers #212
  • Fixes to parsing of getsockopt/setsockopt options argument (#203) - see breaking changes
  • RWArray helpers are now in their own package (#202)
  • Error handling fixes to Batch functions (#198, #199)

v0.3.0-libbpf-0.8.0

28 Jun 21:11
216bd5b
Compare
Choose a tag to compare

This release of libbpfgo now provides official support for statically/dynamically linking libbpf v0.8.0!!!

Breaking Changes

  • ListProgramNames API was removed
  • GetUnsafePointer helper was removed

New APIs

  • BPFMap.SetValueSize() (calls libbpf bpf_map__set_value_size) #156
  • BPFMap.GetValueReadInto() (calls libbpf bpf_map__lookup_elem) #156
    • This enables the use per-cpu arrays, hashmaps, and storage!
  • BPFObjectIterator! #166
    • Allows for iterating over each map and program in a BPF object
    • Uses libbpf bpf_object__next_program and bpf_object__next_map
  • GetSectionName (calls libbpf bpf_program__section_name) #166
  • GetValueFlags()/UpdateValueFlags() #154
    • The enables passing a MapFlag argument to the bpf helper functions bpf_map_update_elem and bpf_map_lookup_elem_flags
  • BPFProg.AttachXDP() (calls libbpf bpf_program__attach_xdp) #170
  • BPFProg.GetSectionName() (calls libbpf bpf_program_-section_name) #164
  • BPFMapTypeIsSupported()/BPFProgramTypeIsSupported() #164
  • SetStrictMode() (calls libbpf_set_strict_mode) #160
  • BPFLink.Pin()/BPFLink.Unpin() (calls libbpf bpf_link__pin/unpin) #144
  • BPFProg.AttachGeneric() (calls libbpf bpf_program__attach) #144
    • Allows for autodetection of bpf program and attach types! This is useful for tracing programs
  • BPFProg.SetAttachTarget()/BPFProg.SetAttachType/BPFProg.SetProgramType #144

New Helpers

  • You can now use a range of new helpers for parsing options passed to socket syscalls such as setsockopt and getsockopt #181
  • CreateMap() (calls bpf_map_create) #138
  • BPFMap.Name()/BPFMap.Type (calls libbpf bpf_map__name/bpf_map__type) #138
  • BPFMap.SetType() (calls libbpf bpf_map__set_type) #138

New Selftests/examples

  • Fentry BPF_PROG_TYPE_TRACING sample #144
  • Fentry set attach target selftest #144
  • New tc selftest
  • New XDP selftest
  • Removed the faulty tcpconnect selftest
  • VersionString selftest

Notable Fixes

  • Kernel symbol helpers will no longer have errant square brackets #153
  • Support for arm64 fixes #158
  • A lot of error handling fixes #163 #157, #152, #146, #142

v0.2.5-libbpf-0.7.0

02 Mar 16:41
c939487
Compare
Choose a tag to compare

v0.2.5-libbpf-0.7.0 contains various new helpers, APIs, and code improvements as well as official support for libbpf v0.7.0!

What's Changed

v0.2.4-libbpf-0.6.1

21 Jan 18:24
Compare
Choose a tag to compare

v0.2.4-libbpf-0.6.1 is being release to revert changes to error handling that were introduced in the previous release. It reverts commits 088c639 and 3a827b2 but keeps all other parts of the previous release. It also contains small fixes and properly bumps libbpf submodule to 0.6.1.

v0.2.3-libbpf-0.6.1

11 Jan 01:27
088c639
Compare
Choose a tag to compare

v0.2.3-libbpf-0.6.1

v0.2.3-libbpf-0.6.1 is a small but impactful release that contains newly implemented libbpf apis, adds many new helper functions, and various quality of life fixes.

Breaking changes

  • #89 contains breaking changes to the helper functions used for parsing system call arguments

New APIs

  • Map batch operations (#97)
  • Program pinning (#96)

New Helpers

  • Parsing of raw arguments from system calls (#89)
  • Security lockdown type detection (#103)

v0.2.2-libbpf-0.5.0

29 Nov 23:34
911d504
Compare
Choose a tag to compare

v0.2.2-libbpf-0.5.0 contains various new helpers, documentation additions, and bug fixes. This includes official support for libbpf v0.5.0.

See here for information about how we semantically version libbpfgo releases.

What's Changed

New Contributors

Full Changelog: v0.1.1...v0.2.2-libbpf-0.5.0