Releases: cilium/ebpf
Hotfix: don't retry endlessly on verifier errors on kernels <6.4
During the prior removal of ProgramOptions.LogSize
in v0.16, the tests weren't updated to exercise the retry logic. With the last-minute addition of ProgramOptions.LogSizeStart
, a bug was introduced that would cause program loads to retry indefinitely without ever growing the buffer in case of a verifier error on kernels before 6.4. This is now fixed, and the tests were updated to exercise the retry logic.
Global Variables, Decl Tags, and package `pin`
Note: the hotfix release 0.17.1 is out. Users are highly encouraged to upgrade.
As we close the door on the year 2024, we're also wrapping up the ebpf-go v0.17 development cycle. This release represents a large body of work and is our largest feature release since BTF.
Users are, as always, highly encouraged to upgrade, and we're looking forward to hearing your feedback on the new Global Variables API. We've been putting this interface trough its paces internally, along with a few eager community members, and we're ready to let the wider community make use of it.
This release also marks the end of our Go 1.21 support; Go 1.22 is required going forward.
Breaking Changes
Before we get to the fun stuff, we need to call out a few breaking changes:
-
Global variables with a
static
qualifier can no longer be rewritten usingCollectionSpec.RewriteConstants()
! See the section on global variables under major features below. -
program: remove LogSize and VerifierError.Truncated by @lmb in #1526
-
prog: add ProgramOptions.LogSizeStart to obtain full log after verifier bug by @ti-mo in #1630
The
ProgramOptions.LogSize
field was deprecated and a no-op since 0.16 and has now been removed completely. In its place, a new field was added to obtain full verifier logs when the verifier hits an internal bug. TheProgramOptions.LogSizeStart
field controls the starting size of the log buffer. Use this if you have a good understanding of the log size you're expecting, or if you're trying to pull out the full log when the verifier hits an internal bug. The error string now also contains some hints about what happened and how to handle this situation. -
elf_reader: don't use BPF_F_RDONLY_PROG flag to trigger map freezing by @ti-mo in #1568
The Freeze field was ambiguous from the start, and has been a source of subtle bugs over the years. Automatic map freezing is now done based solely on map name (.(ro)data prefix). If you were manually setting this flag, consider using a conventional map name instead.
-
info: expose ksym info and func info by ProgramInfo by @Asphaltt in #1576
-
info: expose more prog jited info by @Asphaltt in #1598
Some ext_info types in package btf were redefined to enable pulling raw func and line infos out of
Program.Info()
. These were all types without methods and all unexported fields, but calling them out regardless in case someone's doingunintendedadvanced things with BTF. -
kallsyms: change Modules caching strategy, cache address lookups by @ti-mo in #1590
Users attaching bpf programs to kernel symbols should see a marked decrease in allocations made in the library during program creation in the general case. Only used entries are now cached, making kallsyms lookups on subsequent program loads free. In the pathological case (new kernel symbols on every load), scanning is repeated, resulting in more CPU time being used instead of holding on to all kallsyms symbols indefinitely.
ProgramSpec.KernelModule()
was unexported until further notice.Also, bpf2go users should now be able to generate Go bindings as unprivileged users once again. Oops!
Major Features
Easy global variables: introducing ebpf.VariableSpec
and ebpf.Variable
- CollectionSpec: add new Variables field to interact with constants and global variables by @ti-mo in #1564
- Collection: add Variables field to interact with global variables by @ti-mo in #1572
- bpf2go: generate assignment structs and Go types for Variables and VariableSpecs by @smagnani96 in #1610
This has been a frequent ask in the community for years, so we finally bit the bullet and committed to an API to interact with global bpf variables through CollectionSpec.Variables
and CollectionSpec.Variables
. We've published a small guide over on ebpf-go.dev/concepts/global-variables that details how to use them, so we're not going to reiterate here.
See the documentation on the use of the static
qualifier! These are no longer considered global variables, and can't be modified at runtime.
bpf2go now also generates objects to be used with CollectionSpec.Assign
and .LoadAndAssign()
, and also emits Go type declarations for C types used as bpf C variables. Our test coverage was somewhat lacking for the latter, please drop something on the issue tracker if you're noticing surprising bpf2go output.
Note that it's currently not possible to manually create a VariableSpec
and wire it up to a CollectionSpec
, so if you were previously relying on e.g. manually assembling a CollectionSpec
and using RewriteConstants()
in tests, this will no longer work. This may land as the API crystallizes and we settle on a good mechanism to enable this. Please reach out on the Cilium Slack if you'd like to see this happen.
Tags!
- btf: export DeclTag and TypeTag by @dylandreimerink in #1548
As you'll notice, the btf.Struct
, btf.Union
, btf.Member
, btf.Typedef
, btf.Func
and btf.Var
have gained a new field: Tags
! Set one or more tags on these objects from bpf C using __attribute__((btf_decl_tag("mytag")))
and
you'll find Tags
being populated in Go.
There's also the btf.Func.ParamTags
field that holds tags declared on individual function parameters. These are part of the Func
since they appear only in the function prototype, not in the parameter type itself, since those can appear in many different types. (it does get confusing!)
Also, an honorable mention to btf.TypeTag
, which has now been exported. This allows tagging pointers with an arbitrary string value and is mainly used by the Linux verifier to tag kernel pointers, see the __kptr
and __kptr_ref
macros in Linux' bpf_helpers.h
.
Pins!
We've added a new root-level package pin
, which currently features the Load()
and WalkDir()
functions. Since all LoadPinned*
functions in the library now check for the underlying object's type, we've repurposed the machinery to allow loading an opaque pin and returning a Go object of the right type.WalkDir
does what it says on the tin, it walks bpffs directories and invokes a callback that received the loaded object. Super convenient!
Minor Features
We've also added a handful of minor features during this release:
- info: expose additional
bpf_prog_info
fields inProgramInfo
by @tyrone-wu in #1512 - feat(gen): Make Identifier function configurable by @wdullaer in #1560
- feat(ringbuf): Add AvailableBytes() by @dave-tucker in #1533
- elf_reader: permit multiple .data* sections by @mejedi in #1546
- elf_reader: support referencing weak variables by @ti-mo in #1571
- map: add map_extra, memlock, frozen to MapInfo by @ti-mo in #1570
- feat: add support for untyped extern __ksym variables by @patrickpichler in #1578
- map,prog,link: verify object type in LoadPinned*() by @mtardy in #1581
- features: add HaveV4ISA probe for checking ISA v4 support in the kernel by @smagnani96 in #1608
- elf_reader: support value BTF on ringbuf and perf array maps by @ti-mo in #1628
- map: automatically set CPUMap MaxEntries based on possible CPUs by @learnitall in #1627
Other Changes
Last but not least, there's bugfixes, CI changes and some internal refactoring that happened to eventually make ebpf-go work with ebpf-for-windows. See individual PRs for more context. Stay tuned!
- example/ringbuffer: fix comm len by @florianl in #1531
- docs: make timo code owner by @lmb in #1532
- elf: use elf.EM_NONE instead of unix.EM_NONE by @lmb in #1538
- internal/fdtrace: allow tracing of sys package by @lmb in #1536
- internal: use sentinel error in TestVerifierErrorWrapping by @lmb in #1539
- internal/sys: add constants by @lmb in #1537
- internal: split out linux specific bits into a separate package by @lmb in #1540
- ci/goimports: group cilium/ebpf imports after 3rd party imports by @rgo3 in #1541
- *: remove unused parameters and tautological conditions by @ti-mo in #1549
- internal: remove dependency on x/exp/constraints by @ti-mo in #1557
- go,testdata: drop support for Go 1.21, pin testdata toolchain to 1.23 by @ti-mo in #1563
- map tests queues and refactor by @smagnani96 in #1559
- Update MapType up until Arena, docker run -i, fix RunOptions panic by @ti-mo in #1569
- link: uprobe multi/tracefs kprobe: add context to EINVAL, don't overflow pid_t in tests by @ti-mo in https://github.com/cilium/e...
v0.16.0
program: automatic verifier log sizing and ProgramInfo.RecursionMisses()
For the longest time users had to specify ProgramOptions.LogSize
to get the
full verifier log for large programs. The library now automatically figures out
the correct buffer size to use and the field is deprecated. It will be removed
in the next version.
ProgramInfo now exposes how often a program didn't execute due to recursion
limits via RecursionMisses
.
perf, ringbuf: better control over wakeups, Flush()
There is a trade off between how fast samples are processed and how much CPU is
used. Reading samples as quickly as possible uses more CPU, reading in batches
is cheaper.
It's now possible to configure a "maximum time before a wakeup" by using
Reader.SetDeadline(). This now guarantees that any pending samples are read
at the end of the deadline, even if the Watermark wasn't reached.
It's also possible to manually flush the buffer using Flush()
.
Bugfixes
- The various
Copy()
methods now to a full deep copy and all accept nil values. - link: kprobe and uprobe links can now be pinned.
What's Changed
- perf: clean up error handling and bare fds by @lmb in #1444
- [go.mod] Change
go
directive to1.21
by @mx-psi in #1441 - gh: don't use code blocks in Bug report template by @lmb in #1450
- CI: Update kernel from v6.7 to v6.8 by @dylandreimerink in #1452
- build(deps): bump mkdocs from 1.5.3 to 1.6.0 in /docs by @dependabot in #1455
- build(deps): bump golangci/golangci-lint-action from 4.0.0 to 5.1.0 by @dependabot in #1454
- build(deps): bump mkdocs-material from 9.5.16 to 9.5.20 in /docs by @dependabot in #1456
- build(deps): bump mkdocs-git-revision-date-localized-plugin from 1.2.4 to 1.2.5 in /docs by @dependabot in #1458
- build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /docs by @dependabot in #1459
- replace virtme by @lmb in #1321
- ci: ignore kprobe_multi test failures on arm64 by @lmb in #1461
- perf: flush Record when deadline is exceeded by @lmb in #1429
- link: allow retrieving perf event file descriptor by @lmb in #1425
- perf_event_open cpu should be -1 for valid PID by @brycekahle in #1464
- link: add test suite for netkit by @brlbil in #1463
- debug sporadic vimto hang by @lmb in #1466
- build(deps): bump requests from 2.31.0 to 2.32.0 in /docs by @dependabot in #1469
- ci: use stable-selftests tag by @lmb in #1472
- link: add Info() method to all link types by @rgo3 in #1435
- Add RecursionMisses to access ProgramInfo recursion misses counter by @olsajiri in #1465
- elf: turn BTF map_extra into ErrNotSupported by @lmb in #1483
- docs: add a section on examples by @lmb in #1482
- build(deps): bump mkdocs-material from 9.5.20 to 9.5.26 in /docs by @dependabot in #1484
- build(deps): bump golangci/golangci-lint-action from 5.1.0 to 6.0.1 by @dependabot in #1479
- build(deps): bump mkdocs-git-authors-plugin from 0.8.0 to 0.9.0 in /docs by @dependabot in #1476
- build(deps): bump mkdocs-git-revision-date-localized-plugin from 1.2.5 to 1.2.6 in /docs by @dependabot in #1477
- map: fix TestMapBatch failing with ENOSPC for hash maps by @lmb in #1485
- gh: try to group dependabot updates by @lmb in #1412
- map: add Map.Handle() method for retrieving a Map's type information by @ti-mo in #1488
- build(deps): bump urllib3 from 2.2.1 to 2.2.2 in /docs by @dependabot in #1489
- add example using Linux TC hook for network flow monitoring by @smagnani96 in #1352
- docs: fix clipped headline on home page by @lmb in #1493
- Fix ringbuffer ring size reporting by @usamasaqib in #1492
- Add Flush to manually unblock Read/ReadInto by @brycekahle in #1491
- bpf2go: export core functionality by @lmb in #1494
- allow to pin kprobe and kprobe_multi links by @olsajiri in #1496
- build(deps): bump mkdocs-material from 9.5.26 to 9.5.27 in /docs by @dependabot in #1498
- link: allow pinning uprobe multi links by @lmb in #1499
- program, btf: probe correct log buffer size by @lmb in #1500
- build(deps): bump certifi from 2024.6.2 to 2024.7.4 in /docs by @dependabot in #1504
- cmd/bpf2go: make Nick Zavaritsky a reviewer by @lmb in #1505
- perf: fix panic when CPU is offline by @Ghostbaby in #1503
- map: fix flaky TestMapIteratorAllocations by @lmb in #1506
- link: fix nil pointer dereference in AttachXDP by @gavinbunney in #1507
- info: make it harder to add backwards incompatible API by @lmb in #1515
- perf: do not add offline CPUs by @florianl in #1510
- fix a variety of Copy() problems by @lmb in #1518
- map: do not allocate on lookup when key doesn't exist by @brycekahle in #1519
- program: deprecate LogSize and VerifierError.Truncated by @lmb in #1520
- btf: fix panic when copying nil Type by @lmb in #1521
- map: remove misleading error message when creating without BTF by @lmb in #1522
New Contributors
- @mx-psi made their first contribution in #1441
- @brlbil made their first contribution in #1463
- @smagnani96 made their first contribution in #1352
- @usamasaqib made their first contribution in #1492
- @Ghostbaby made their first contribution in #1503
- @gavinbunney made their first contribution in #1507
Full Changelog: v0.15.0...v0.16.0
v0.15.0
btf: bpf_core_type_matches
is now supported
Programs can now use bpf_core_type_matches()
for a stricter compatibility check. See #1366.
program, btf: improve debuggability when CO-RE or kfunc fixup fails
The library now tries to return a more informative error when loading a program fails due to a failed CO-RE relocation or a missing kfunc. See #1402.
btf: synthesise instruction comments into line info
asm.Comment
in an instruction's Source()
are now passed to the kernel in the form of BTF line info. See #1417.
perf: add WakeupEvents support to Reader
A perf Reader can now be configured to be woken up after a specific number of events / samples have been submitted. See #1404.
Bugfixes
program
: fix loading a program which targets a function in a kernel module whenCONFIG_DEBUG_INFO_BTF_MODULES
is disabled, see #1440.
Breaking changes
github.com/cilium/ebpf/btf
Copy
: thetransform
argument was removed. Use the newbtf.As
function instead.Transformer
: removed. See above.
What's Changed
- btf: use recursion by @lmb in #1397
- gh: hopefully fix apidiff workflow by @lmb in #1401
- gh: only cancel pull_request runs by @lmb in #1403
- build(deps): bump pymdown-extensions from 10.7 to 10.7.1 in /docs by @dependabot in #1410
- build(deps): bump mkdocs-git-authors-plugin from 0.7.2 to 0.8.0 in /docs by @dependabot in #1411
- build(deps): bump mkdocs-material from 9.5.12 to 9.5.16 in /docs by @dependabot in #1409
- program, btf: improve debuggability when CO-RE or kfunc fixup fails by @lmb in #1402
- add WakeupEvents support to perf Reader by @brycekahle in #1404
- Extend go test CI from 10 to 15 miniutes by @dylandreimerink in #1418
- btf: synthesise instruction comments into line info by @MarcusWichelmann in #1417
- Add support to retrieve missed counts from probes by @olsajiri in #1295
- perf: fix TestPerfReaderWakeupEvents by @lmb in #1423
- Don't mention inexistent outLen parameter in (*Program).Test godoc by @tklauser in #1426
- btf: refuse reloTypeIDTarget for kmod types by @lmb in #1422
- when ringbuffer map size is not a power-of-2 multiple of page size, prompt users in a user-friendly way by @hengyoush in #1420
- btf: Add support for
bpf_core_type_matches()
by @dylandreimerink in #1366 - Define LookupLock by means of BPF_F_LOCK by @tklauser in #1428
- build(deps): bump idna from 3.6 to 3.7 in /docs by @dependabot in #1431
- fix function name by @looklose in #1427
- doc: rephrase supported kernel versions by @lmb in #1439
- Use latest Go version for ARM64 and VM tests in CI by @tklauser in #1430
- program: don't return error when kmod BTF is disabled by @orishuss in #1440
New Contributors
- @hengyoush made their first contribution in #1420
- @looklose made their first contribution in #1427
- @orishuss made their first contribution in #1440
Full Changelog: v0.14.0...v0.15.0
v0.14.0
btf: support for CO-RE relocations against kernel modules
It's now possible to use CO-RE relocations against types defined in kernel modules. See #1300 by @brycekahle.
link: netkit support
The link
package now allows attaching to netkit interfaces. See #1257 by @hemanthmalla
link: support for iterating links
The new link.Iterator
type allows enumerating all BPF links active. See #1392 by @mpastyl.
Bugfixes
ringbuf
: fixed a bug which can lead to corrupt data on arm64, see #1375
Breaking changes
github.com/cilium/ebpf
ProgramOptions
is not comparable anymore due toKernelModuleTypes
.
github.com/cilium/ebpf/btf
CORERelocate
had its singature change once again.
What's Changed
- Add CO-RE support for kernel modules by @brycekahle in #1300
- Create CONTRIBUTING.md by @sandipanpanda in #1361
- build(deps): bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by @dependabot in #1362
- build(deps): bump mkdocs-material from 9.5.8 to 9.5.12 in /docs by @dependabot in #1363
- test: don't rely on append() to copy base slice by @ti-mo in #1367
- Add support for netkit device by @hemanthmalla in #1257
- docs: update project roles by @lmb in #1374
- make rgo3 owner of features package by @lmb in #1376
- ringbuf: replace clamp with min by @lmb in #1377
- ringbuf: fix corrupt samples on arm64 by @paulcacheux in #1375
- ringbuf: simplify ringReader by @lmb in #1379
- CI: increase vm memory to avoid oomkills by @lmb in #1378
- Add support for weak kfuncs by @dylandreimerink in #1364
- CODEOWNERS: assign code ownership to florianl, mmat11 and dylandreimerink by @ti-mo in #1382
- elf_reader_test: Fix CI by disabling the "test_log_fixup" selftest by @dylandreimerink in #1385
- btf: use recursion in coreAreTypesCompatible by @lmb in #1383
- link, internal: generate full linkinfo for union subtypes by @rgo3 in #1359
- gh: do not hide internal/sys/types.go in diffs by @lmb in #1388
- tests: clean up ClangEndian by @lmb in #1389
- examples: avoid depending on internal packages by @ti-mo in #1289
- doc: add DCO by @lmb in #1396
- Fix GitHub edit link on every page by @remram44 in #1393
- chore: fix some comments by @majorteach in #1391
- miscellaneous test fixes by @lmb in #1386
- link: add Iterator by @mpastyl in #1392
New Contributors
- @sandipanpanda made their first contribution in #1361
- @hemanthmalla made their first contribution in #1257
- @remram44 made their first contribution in #1393
- @majorteach made their first contribution in #1391
- @mpastyl made their first contribution in #1392
Full Changelog: v0.13.2...v0.14.0
v0.13.2
v0.13.1
What's Changed
- fix trusted "Tag breaking changes" workflow by @paulcacheux in #1347
- fix: add testcast for PutInteger by @atgane in #1323
- btf: Take instruction size into account when handling poison relocation by @dylandreimerink in #1351
- btf: fix race due to concurrent read access by @lmb in #1357
New Contributors
Full Changelog: v0.13.0...v0.13.1
v0.13.0
Faster btf.LoadKernelSpec()
Obtaining the kernel's BTF used to be very slow and is now very fast. See #1235 by @lmb.
TCX
It's now possible to attach TC programs using the new bpf_link based TCX API. See #1163 by @lmb.
UprobeMulti and UretprobeMulti
These are the user-space equivalents to KprobeMulti and Kretprobe multi and allow
attaching to a large number of symbols quickly. See #1269 by @olsajiri.
Netfilter link
There is now support to attach Netfilter programs using bpf_links. See #1313 by @mehrdadrad.
Better ELF section naming compatibility
The list of recognised ELF section names is now automatically generated from
libbpf and should be more accurate and easier to keep up to date. See #1209 by @lmb.
Pre-allocate per-CPU values
It's now possible to cut down on allocations by pre-allocating per-CPU values. See #1220 by @alxn.
Batch operation support for per-CPU values
Batch operations like Map.BatchLookup now support per-CPU values. Note that this
is not particularly optimised, please check whether it is faster based on your
use case. See #1192 by @alxn.
Breaking changes
This release requires at least Go 1.21.
github.com/cilium/ebpf
(*Map).BatchLookup
,(*Map).BatchLookupAndDelete
: now take aMapBatchCursor
.
The previous implementation did not properly account for differences between
map types and was unsafe.
github.com/cilium/ebpf/btf
- CORERelocate: now takes an additional argument, which is usually
Spec.TypeID
. - MarshalExtInfos: now takes an additional
*Builder
instead of allocating it.
Simply passNewBuilder()
.
Both of these are considered somewhat internal API of the library.
github.com/cilium/ebpf/features
HaveBoundedLoops
: changed from var to funcHaveLargeInstructions
: changed from var to funcHaveV2ISA
: changed from var to funcHaveV3ISA
: changed from var to func
github.com/cilium/ebpf/link
QueryOptions.Path
: removed. Instead, pass an fd to the directory viaQueryOptions.Target
.QueryPrograms
: now returnsQueryResult
to be able to extend the API.RawAttachProgramOptions.Replace
: removed. Instead, passReplaceProgram()
toRawAttachProgramOptions.Anchor
.
What's Changed
- btf: fix CO-RE relocations for local type id by @lmb in #1191
- fix data race by caching ring buffer size by @brycekahle in #1217
- elf: generate ELF section patterns from libbpf by @lmb in #1209
- Move PossibleCPUs to a public API by @alxn in #1219
- CI: add go-apidiff check by @lmb in #1225
- CI: fix trusted workflow by @lmb in #1227
- CI: allow writing PRs from trusted workflow by @lmb in #1228
- link: add TCX support by @lmb in #1163
- map: allow pre-allocating per-CPU values on lookup by @alxn in #1220
- CI: store apidiff as json artifact by @lmb in #1229
- docs: split CONTRIBUTING.md into separate pages by @lmb in #1221
- CI: add logging to trusted workflow by @lmb in #1233
- Revert "CI: add logging to trusted workflow" by @lmb in #1234
- add kfunc benchmark by @lmb in #1231
- link: rename First, Last to Head, Tail by @lmb in #1232
- docs: remove WIP pages by @lmb in #1236
- go.mod: update golang.org/x/sys to v0.15.0 by @tklauser in #1241
- map: avoid allocations in MapIterator.Next by @lmb in #1243
- map: Introduce BatchCursor abstraction by @christarazi in #1223
- Xabier/fix typos by @txabman42 in #1248
- build(deps): bump pymdown-extensions from 10.3.1 to 10.5 in /docs by @dependabot in #1246
- build(deps): bump mkdocs-material from 9.4.7 to 9.4.14 in /docs by @dependabot in #1247
- map: fix flaky TestMapBatch/Hash by @lmb in #1250
- CI: execute benchmarks once to prevent bitrot by @lmb in #1244
- doc: use Sourcegraph query for list of importers by @lmb in #1252
- test: Migrate tests to github.com/go-quicktest/qt by @sayboras in #1253
- map: avoid allocations during batch lookup of common types by @lmb in #1254
- CI: run tests on arm64 by @lmb in #1245
- map: Fix MapBatch test for BatchLookupAndDelete case by @lmb in #1260
- link: fix TestUprobeExtWithOpts address by @rgo3 in #1272
- cmd/bpf2go: rephrase GOPACKAGE error message by @lmb in #1267
- run-tests: fetch kernels and selftests from containers by @lmb in #1264
- GH: use an issue form for bug reports by @lmb in #1268
- program: fix raw_tracepoint run repeat check bug by @mtardy in #1275
- fix make update-kernel-deps by @lmb in #1276
- Add per-CPU Map Support to Batch Operations by @alxn in #1192
- build(deps): bump mkdocs-material from 9.4.14 to 9.5.3 in /docs by @dependabot in #1285
- build(deps): bump mkdocs-git-revision-date-localized-plugin from 1.2.1 to 1.2.2 in /docs by @dependabot in #1287
- perf: fix nil pointer when perf map create failed by @cfc4n in #1282
- Fix link.Info.XDP comment to match method name by @aibor in #1292
- Add link.Info.TCX method by @aibor in #1293
- link: add feature test for tcx by @rgo3 in #1294
- cmd/bpf2go: Make LoongArch a supported target by @chenhengqi in #1296
- features: fix documentation by @lmb in #1299
- build(deps): bump gitpython from 3.1.40 to 3.1.41 in /docs by @dependabot in #1302
- link: fix tcx feature test by @rgo3 in #1303
- build(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs by @dependabot in #1305
- cmd/bpf2go: clean up goarch / clang / linux target handling by @lmb in #1310
- add kernel 6.7 by @lmb in #1314
- btf: fix slow LoadKernelSpec by making Spec.Copy lazy by @lmb in #1235
- cmd/bpf2go: fix s390x target by @lmb in #1312
- map: Make the Examples all testable examples. by @alxn in #1278
- Add support for uprobe multi link by @olsajiri in #1269
- link: add netfilter support by @mehrdadrad in #1313
- bpf2go: support specifying output directory and package name by @chent1996 in #1280
- build(deps): bump mkdocs-material from 9.5.3 to 9.5.6 in /docs by @dependabot in #1324
- bump minimum Go to 1.21 by @lmb in #1331
- add support for reading auxv from Go runtime by @paulcacheux in #1319
- dependabot: onboard github actions upgrades by @paulcacheux in #1332
- build(deps): bump actions/checkout from 3 to 4 by @dependabot in #1334
- use slices and maps packages instead of x/exp by @lmb in #1333
- build(deps): bump actions/setup-python from 4 to 5 by @dependabot in #1335
- build(deps): bump actions/github-script from 3 to 7 by @dependabot in #1336
- build(deps): bump actions/upload-artifact from 3 to 4 by @dependabot in #1337
- build(deps): bump mkdocs-git-revision-date-localized-plugin from 1.2.2 to 1.2.4 in /docs by @dependabot in #1339
- build(deps): bump mkdocs-material from 9.5.6 to 9.5.8 in /docs by @dependabot in #1340
- build(deps): bump actions/setup-go from 4 to 5 by @dependabot in #1338
- internal: replace internal memoize with sync.OnceValues by @kwakubiney in #1240
- fix minor contradiction in comments by @christian-2 in #1341
- map: rename BatchCursor to MapBatchCursor by @lmb in #1344
New Contributors
v0.12.3
This is a small release to fix an incompatibility with golang.org/x/sys/unix@v0.14.0. There is a variety of performance improvements as well.
What's Changed
- Add Remaining and Size to perf/ring Record by @brycekahle in #1167
- btf: correct printing size of Int type in bytes by @Asphaltt in #1182
- collection: Add Assign method by @danobi in #1114
- add 6.6 to CI by @lmb in #1187
- docs: add overview for package features by @rgo3 in #1164
- elf: skip local_kptr_stash libbpf test by @lmb in #1190
- btf: support both elf and raw BTF in loadKernelSpec by @wxx213 in #1177
- elf: skip local_kptr_stash_fail test by @lmb in #1198
- btf, sys: update vmlinux.btf.gz to 6.6 by @lmb in #1200
- btf: optimize stringTable to speed up vmlinux parsing by @lmb in #1203
- program: fix LINUX_HAS_SYSCALL_WRAPPER use with bpf_tracing.h by @paulcacheux in #1202
- btf: Optimize string table for globally increasing offsets by @dylandreimerink in #1210
- map: include full property diff in ErrMapIncompatible error string by @ti-mo in #1212
- Add new ISAv4 instructions by @dylandreimerink in #1193
- asm: cleanups for v4 ISA by @lmb in #1214
- build(deps): bump mkdocs-material from 9.4.4 to 9.4.7 in /docs by @dependabot in #1197
- build(deps): bump pymdown-extensions from 10.3 to 10.3.1 in /docs by @dependabot in #1196
- build(deps): bump mkdocs-macros-plugin from 1.0.4 to 1.0.5 in /docs by @dependabot in #1195
- build(deps): bump mkdocs-git-revision-date-localized-plugin from 1.2.0 to 1.2.1 in /docs by @dependabot in #1194
- small speedups during elf loading by @paulcacheux in #1207
- go.mod: update golang.org/x/sys to latest unreleased version by @tklauser in #1215
- btf: Optimizing BTF parsing by merging
readTypes
andinflateRawTypes
by @dylandreimerink in #1211
New Contributors
Full Changelog: v0.12.2...v0.12.3
v0.12.2
This release fixes unmarshaling from a map operation into a []byte
, see #1180. This is a regression in v0.12.0.
We now also properly return an error when the value to unmarshal into is too small, see #1181. This behaviour has existed for a long time.
What's Changed
- btf: stop accessing Spec.types from tests by @lmb in #1176
- PinType: change from int to uint32 by @ti-mo in #1179
- example: fix key type of xdp example by @BillyChen1 in #1178
- sysenc: special case unmarshaling into []byte by @lmb in #1180
- sysenc: refuse to unmarshal into undersized dst by @lmb in #1181
New Contributors
- @BillyChen1 made their first contribution in #1178
Full Changelog: v0.12.1...v0.12.2