bpfib icon indicating copy to clipboard operation
bpfib copied to clipboard

fix(deps): update module github.com/cilium/ebpf to v0.20.0

Open renovate[bot] opened this issue 1 month ago • 1 comments

This PR contains the following updates:

Package Change Age Confidence
github.com/cilium/ebpf v0.19.0 -> v0.20.0 age confidence

Release Notes

cilium/ebpf (github.com/cilium/ebpf)

v0.20.0

Compare Source

Performance Improvements
  • btf: Memory-map vmlinux BTF when possible instead of copying to heap (saves several megabytes)
  • btf: Decode BTF from byte slices instead of io.Reader for better performance
  • btf: Cache BTF during fixups and target search to avoid loading each blob multiple times
  • linker: Resolve kernel symbols in a single pass instead of individually
  • prog: Speed up opening pinned programs by using minimal program info
  • map: Avoid allocations during PerCPUMap batch lookups (76% faster, 99% fewer allocations)
New Features
  • btf: Added LoadSplitSpec function for easier use of split-BTF files
  • btf: Accept empty string tables in BTF data
  • link: Added Detach() method for explicitly detaching links
  • map: Preliminary support for arena maps
  • map: Parse and expose map_extra field in MapSpec (enables bloom filter configuration)
  • prog: Allow explicit ifindex specification when loading programs
  • prog: Support getting context output from syscall programs
  • prog: Allow passing extra targets for CO-RE relocations via ExtraRelocationTargets
  • bpf2go: Allow multiple commands in BPF2GO_CC environment variable (e.g., ccache clang)
  • tracefs: Allow hyphens in tracepoint group names
  • kallsyms: Return ErrRestrictedKernel when reading zero addresses due to kernel.kptr_restrict
  • info: Return ErrRestrictedKernel when program info is restricted by kernel security settings
  • prog: Tolerate ErrRestrictedKernel during ksym resolution unless ksyms are required
Bugfixes
  • ringbuf: Fixed panic when reading after close
  • btf: Fixed race condition when loading cached kernel/module specs
  • ringbuf: Fixed 32-bit compatibility by using uintptr for positions
  • memory: Set cleanup on *Memory instead of **Memory to fix resource leak
  • link: Fixed concurrent cleanup ordering for perf events and tracefs events
Windows Support Improvements
  • ringbuf: Added Windows support for ring buffer operations
  • windows: Fixed compatibility with recent eBPF for Windows changes (XDP_TEST removal, SAMPLE program type)
  • windows: Enabled Hyper-V support in test VMs
  • program: Added workaround for eBPF for Windows rejecting empty ContextOut
Breaking Changes
ProgramOptions.KernelModuleTypes removed

The KernelModuleTypes field in ProgramOptions has been removed. In 99% of cases this field should not be necessary anymore. Module BTF should be merged into the vmlinux BTF, as tools like btfhub do.

For advanced use cases that still require passing additional BTF specs for CO-RE relocations, use the new ExtraRelocationTargets field:

Before:

opts := &ebpf.ProgramOptions{
    KernelModuleTypes: map[string]*btf.Spec{
        "module1": moduleSpec1,
    },
}

After:

// Merge module BTF into vmlinux BTF (recommended)
// Or for advanced cases:
opts := &ebpf.ProgramOptions{
    ExtraRelocationTargets: []*btf.Spec{
        moduleSpec1,
    },
}
btf.Cache fields unexported

The KernelTypes, ModuleTypes, and LoadedModules fields in btf.Cache have been unexported. These fields were internal implementation details and should not have been accessed directly. Users should continue using btf.NewCache() to create cache instances - no code changes are needed if you weren't directly accessing these fields.

cache := btf.NewCache()
cache.KernelTypes = mySpec  // This will no longer compile
What's Changed
New Contributors

Full Changelog: https://github.com/cilium/ebpf/compare/v0.19.0...v0.20.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

renovate[bot] avatar Oct 31 '25 19:10 renovate[bot]

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 1 additional dependency was updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.23.0 -> 1.24.0
golang.org/x/sys v0.31.0 -> v0.37.0

renovate[bot] avatar Oct 31 '25 19:10 renovate[bot]