Skip to content

Require go 1.25, Update cilium/ebpf to 0.22.0 and golang.org/x dependencies - #75

Merged
arthurfabre merged 4 commits into
masterfrom
afabre/update
Jul 25, 2026
Merged

Require go 1.25, Update cilium/ebpf to 0.22.0 and golang.org/x dependencies#75
arthurfabre merged 4 commits into
masterfrom
afabre/update

Conversation

@arthurfabre

Copy link
Copy Markdown
Collaborator

Housekeeping: switch to the last supported golang version, and update our dependencies. cilium/ebpf had a few breaking changes:

  • ebpf.SanitizeName() is done automatically, and has been removed.
  • ebpf.CollectionSpec.RewriteMaps() has been replaced by ebpf.CollectionOptions.MapReplacements. To avoid breaking our API, keep a slimmed down version of RewriteMaps(), and add a new PatchOpts() function that uses MapReplacements.
  • asm.StoreImm(DWord) has been incorrectly removed. asm: Allow StoreImm with DWord size cilium/ebpf#2066 fixes it upstream, in the mean time we can work around it with a temporary register.

It's currently the oldest supported release.
The API has changed a bit:

- ebpf.SanitizeName() is done automatically, and has been removed.
- ebpf.CollectionSpec.RewriteMaps() has been replaced by
  ebpf.CollectionOptions.MapReplacements. To avoid breaking our API,
  keep a slimmed down version of RewriteMaps(), and add a new
  PatchOpts() function that uses MapReplacements.
- asm.StoreImm(DWord) has been incorrectly removed.
  cilium/ebpf#2066 fixes it upstream, in the
  mean time we can work around it with a temporary register.
Newer kernels have started rejecting BPF_PROG_RUN calls with an empty
packet. Pass in an empty 14 byte buffer.
@arthurfabre
arthurfabre requested review from Dhiver and lmtcf July 24, 2026 18:03
@arthurfabre
arthurfabre merged commit 96f7ea5 into master Jul 25, 2026
3 of 4 checks passed
@arthurfabre
arthurfabre deleted the afabre/update branch July 25, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants