Releases: aquasecurity/libbpfgo
v0.4.4-libbpf-1.0.1
Fixes included:
- fix: re-introduce memory bumping (#265)
v0.4.3-libbpf-1.0.1
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
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
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 runninggo mod tidy
that can be fixed by clearing your go cache or explicitlygo get
ing 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
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 byParseSetSocketOption
andParseGetSocketOption
- The type
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 wrapbpf_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
This release of libbpfgo now provides official support for statically/dynamically linking libbpf v0.8.0!!!
Breaking Changes
ListProgramNames
API was removedGetUnsafePointer
helper was removed
New APIs
BPFMap.SetValueSize()
(calls libbpf bpf_map__set_value_size) #156BPFMap.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) #166GetValueFlags()
/UpdateValueFlags()
#154- The enables passing a
MapFlag
argument to the bpf helper functionsbpf_map_update_elem
andbpf_map_lookup_elem_flags
- The enables passing a
BPFProg.AttachXDP()
(calls libbpf bpf_program__attach_xdp) #170BPFProg.GetSectionName()
(calls libbpf bpf_program_-section_name) #164BPFMapTypeIsSupported()
/BPFProgramTypeIsSupported()
#164SetStrictMode()
(calls libbpf_set_strict_mode) #160BPFLink.Pin()
/BPFLink.Unpin()
(calls libbpf bpf_link__pin/unpin) #144BPFProg.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
andgetsockopt
#181 CreateMap()
(calls bpf_map_create) #138BPFMap.Name()
/BPFMap.Type
(calls libbpf bpf_map__name/bpf_map__type) #138BPFMap.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
v0.2.5-libbpf-0.7.0
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
- Add version API by @saschagrunert in #125
- helpers: Added dynamic symbol resolver by @guyarb in #128
- argumentParsers: precompile argument and string maps by @NDStrahilevitz in #130
- Error handling fixes by @grantseltzer in #127
- introduce kernelsyms helper by @itamarmaouda101 in #133
- Compile tracee submodule against local libbpfgo by @grantseltzer in #126
- Fix selftest with deprecated api by @grantseltzer in #134
- Update libbpf to v0.7.0 by @saschagrunert in #131
v0.2.4-libbpf-0.6.1
v0.2.3-libbpf-0.6.1
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
New Helpers
v0.2.2-libbpf-0.5.0
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
- Fix error message in BPFMap.Update by @derekparker in #29
- Change BPFMap method
Update
to unsafe.Pointer by @grantseltzer in #32 - Makefile: improvements by @rafaeldtinoco in #28
- Fix iterators selftest to use updated unsafe Pointer API by @grantseltzer in #36
- New helper (getter) functions and some refactoring by @geyslan in #41
- fix potential memory leaks by @yanivagman in #46
- Makefile: download libbpf submodule when not found by @geyslan in #44
- examples: Add tcpconnect as a libbpfgo example by @rafaeldtinoco in #45
- Add section in README about release versioning by @grantseltzer in #47
- Fix init_perf_buf error handling by @josedonizetti in #49
- Initial BTF support by @rafaeldtinoco in #50
- libbpfgo: change BPFProg.GetFd() return to int Go type by @geyslan in #52
- helpers: add initial btfinfo by @rafaeldtinoco in #53
- libbpfgo: run lint tool and fix issues by @rafaeldtinoco in #54
- kernel_features: bring MissingKernelConfigOptions to helper by @rafaeldtinoco in #57
- checking if new operation in newbtfino succeeded by @mtcherni95 in #59
- kernel_features: fix tests for new KernelConfig by @rafaeldtinoco in #58
- kernel_features: fix kconfig file read logic for procfs config.gz by @rafaeldtinoco in #63
- osinfo and kernel_features (kernel_config) refactoring and improvements by @rafaeldtinoco in #67
- helpers/kernel_config.go: allow kconfig files logic by @rafaeldtinoco in #70
- Add BPFLink.Destroy by @derekparker in #69
- Update README for semantic versioning by @grantseltzer in #71
- address kconfig post merge issues and document api by @rafaeldtinoco in #73
- Updates by @rafaeldtinoco in #76
- Remove soon to be deprecated resize api by @grantseltzer in #79
- libbpfgo: make AttachTracepoint() signature 1:1 with libbpf by @geyslan in #77
- libbpfgo: do not set btf_custom_path when no BTF is given by @rafaeldtinoco in #82
- Fix NewModuleFromBuffer by @derekparker in #83
- Introduce GetFd() for BPFLink by @geyslan in #78
- selftests: ringbuffers: give time to ringbuffer consumer by @geyslan in #86
- helpers/osinfo: host architecture detection by @rafaeldtinoco in #87
- Add helper to check if ftrace is enabled by @grantseltzer in #94
New Contributors
- @derekparker made their first contribution in #29
- @rafaeldtinoco made their first contribution in #28
- @geyslan made their first contribution in #41
- @josedonizetti made their first contribution in #49
- @mtcherni95 made their first contribution in #59
Full Changelog: v0.1.1...v0.2.2-libbpf-0.5.0