deps: bump github.com/cilium/ebpf from 0.20.1-0.20260218191617-ee67e7f43dd9 to 0.21.0 - #2225
Merged
Quang Nguyen (nddq) merged 1 commit intoApr 22, 2026
Conversation
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.20.1-0.20260218191617-ee67e7f43dd9 to 0.21.0. - [Release notes](https://github.com/cilium/ebpf/releases) - [Commits](https://github.com/cilium/ebpf/commits/v0.21.0) --- updated-dependencies: - dependency-name: github.com/cilium/ebpf dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
force-pushed
the
dependabot/go_modules/github.com/cilium/ebpf-0.21.0
branch
from
April 21, 2026 19:43
f411f40 to
7d1d4cc
Compare
Quang Nguyen (nddq)
approved these changes
Apr 21, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Apr 21, 2026
Quang Nguyen (nddq)
deleted the
dependabot/go_modules/github.com/cilium/ebpf-0.21.0
branch
April 22, 2026 01:00
Laksh (lakshk98)
pushed a commit
to lakshk98/retina
that referenced
this pull request
Aug 4, 2026
…f43dd9 to 0.21.0 (microsoft#2225) Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.20.1-0.20260218191617-ee67e7f43dd9 to 0.21.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/cilium/ebpf/releases">github.com/cilium/ebpf's releases</a>.</em></p> <blockquote> <h2>v0.21.0: Struct Ops, Weak Symbols and BTF deduplication</h2> <p>Hi, everyone! The Cilium project is proud to announce v0.21.0 of ebpf-go, our first major 2026 feature release. Please note that this version comes with a few breaking changes for XDP users that may require some intervention based on your use case, so please read the following section carefully before upgrading! We've also removed some long-deprecated APIs.</p> <h2>Breaking changes</h2> <h3>XDP Attach Type</h3> <p>This release saw a change to the ELF parsing logic, specifically to XDP programs. Previously, XDP programs had their <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramSpec.AttachType"><code>ProgramSpec.AttachType</code></a> set to <code>AttachNone</code>. Prompted by upstream changes in Linux 6.18, XDP programs now come with an <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#AttachXDP"><code>AttachXDP</code></a> attach type. This change ensures compatibility with kernels going forward, as well as better interoperability with libbpf-based tools using shared PROG_ARRAY maps.</p> <p>tl;dr: Linux 6.18 and later disallows mixing attach types within the same program array.</p> <p>If your application uses a pinned program array, you may need to manually change the attach type of your XDP programs to <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#AttachType"><code>AttachNone</code></a> before they are loaded to ensure they can still be inserted into maps containing pre-upgrade programs.</p> <p>The same goes for BPF links. If you're updating an XDP link created by an older version of ebpf-go, you need to ensure your XDP program is loaded with the same attach type the link was initially created with, or updating will fail with EINVAL.</p> <p>For an example of how to deal with this change, <a href="https://redirect.github.com/cilium/cilium/pull/44209">here's the the Cilium PR</a> that implemented logic to try both attach types when updating links.</p> <h3>Windows helper function rename</h3> <p>ebpf-for-windows was upgraded from <code>0.21.0</code> to <code>v1.0.0-rc1</code>. efW made breaking changes to the names of helper functions, our API has been updated to match:</p> <ul> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0/asm#WindowsFnMemcmp"><code>asm.WindowsFnMemcmp</code></a> -> <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/asm#WindowsFnMemcmpS"><code>asm.WindowsFnMemcmpS</code></a></li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0/asm#WindowsFnMemcpy"><code>asm.WindowsFnMemcpy</code></a> -> <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/asm#WindowsFnMemcpyS"><code>asm.WindowsFnMemcpyS</code></a></li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0/asm#WindowsFnMemmove"><code>asm.WindowsFnMemmove</code></a> -> <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/asm#WindowsFnMemmoveS"><code>asm.WindowsFnMemmoveS</code></a></li> </ul> <h2>New Features</h2> <ul> <li>Struct ops — The ELF reader can now parse struct ops sections, building <code>MapSpecs</code> and resolving function-pointer members. <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/link#AttachStructOps"><code>link.AttachStructOps</code></a> has been added to allow attaching a <code>StructOpsMap</code> as a link. A sched_ext example can be found <a href="https://github.com/cilium/ebpf/tree/v0.21.0/examples/sched_ext">here</a>.</li> <li>Weak symbol & ELF linking — Programs and maps defined as weak symbols are now fully supported. The ELF reader performs per-symbol decoding for both <code>ProgramSpec</code> and <code>MapSpec</code>, meaning linked objects (produced via <code>bpftool gen object</code>) are now handled correctly.</li> <li>BTF type deduplication — <code>btf.Builder</code> can now deduplicate types while generating a BTF blob. Deduplication can be enabled by passing <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/btf#BuilderOptions"><code>BuilderOptions</code></a> to <code>NewBuilder</code> with the <code>Deduplication</code> field set to true.</li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramSpec.Compatible"><code>ProgramSpec.Compatible</code></a> was added — <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramSpec.Tag"><code>ProgramSpec.Tag</code></a> is now deprecated. The new <code>ProgramSpec.Compatible</code> method compares a loaded program's tag against both SHA-1 and SHA-256 hashes of the spec, ensuring correct behaviour across kernels — including kernel v6.18+, which switched to SHA-256 for program hashing.</li> <li>ProgramInfo improvements — The program name as reported by <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramInfo.Name"><code>ProgramInfo.Name</code></a> is now sourced from BTF func info when available to provide the full program name if it's longer than 15 bytes.</li> <li>LinkInfo improvements — Added a number of methods and types related to reading back link info.</li> <li>Reverse symbol lookup — Added <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/link#Executable.Symbol"><code>Executable.Symbol</code></a> to resolve addresses to a symbol and relative offset.</li> <li>Uprobe/kprobe link feature probing — <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/features#HaveBPFLinkKprobeMulti"><code>HaveBPFLinkKprobeMulti</code></a>, <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/features#HaveBPFLinkUprobeMulti"><code>HaveBPFLinkUprobeMulti</code></a>, and <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/features#HaveBPFLinkKprobeSession"><code>HaveBPFLinkKprobeSession</code></a> are now exported from the features package, making it easier to probe for multi-attach support before loading programs.</li> <li>Program run batching — A new <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#RunOptions"><code>RunOptions.BatchSize</code></a> option has been added to support batching when running programs.</li> </ul> <h2>Bug Fixes</h2> <ul> <li>Allow weak kfuncs loading without <code>CAP_SYS_ADMIN</code> — Loading programs with weak kfuncs on kernels that don't have the kfunc no longer fails with "operation not permitted" when the caller lacks <code>CAP_SYS_ADMIN</code>. The permission error is now treated as "not found" for weak kfuncs.</li> <li>ELF reader nil panic — Fixed a panic that could occur when loading an ELF without BTF due to a nil extInfo pointer. Along with the fix, a suite of regression tests was added that exercises the core loader logic with non-BTF ELFs as well.</li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/link#QueryResult.HaveLinkInfo"><code>QueryResult.HaveLinkInfo</code></a> heuristic — The heuristic has been updated to check for at least one attached program with a non-zero link ID, fixing a false positive introduced by a kernel change that began populating the revision field for cgroup queries.</li> <li>Windows map/program count — Increased the default map and program count on Windows to reduce failures when loading collections with more maps than previously allocated.</li> </ul> <h2>More breaking changes</h2> <h3>Deprecations</h3> <p>In this release we have removed a number of features which had been deprecated for a while.</p> <ul> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0#CollectionSpec.RewriteMaps"><code>CollectionSpec.RewriteMaps</code></a> - Pass <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#CollectionOptions"><code>CollectionOptions.MapReplacements</code></a> when loading the Collection instead.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/cilium/ebpf/commits/v0.21.0">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Laksh (lakshk98)
pushed a commit
to lakshk98/retina
that referenced
this pull request
Aug 4, 2026
…f43dd9 to 0.21.0 (microsoft#2225) Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.20.1-0.20260218191617-ee67e7f43dd9 to 0.21.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/cilium/ebpf/releases">github.com/cilium/ebpf's releases</a>.</em></p> <blockquote> <h2>v0.21.0: Struct Ops, Weak Symbols and BTF deduplication</h2> <p>Hi, everyone! The Cilium project is proud to announce v0.21.0 of ebpf-go, our first major 2026 feature release. Please note that this version comes with a few breaking changes for XDP users that may require some intervention based on your use case, so please read the following section carefully before upgrading! We've also removed some long-deprecated APIs.</p> <h2>Breaking changes</h2> <h3>XDP Attach Type</h3> <p>This release saw a change to the ELF parsing logic, specifically to XDP programs. Previously, XDP programs had their <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramSpec.AttachType"><code>ProgramSpec.AttachType</code></a> set to <code>AttachNone</code>. Prompted by upstream changes in Linux 6.18, XDP programs now come with an <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#AttachXDP"><code>AttachXDP</code></a> attach type. This change ensures compatibility with kernels going forward, as well as better interoperability with libbpf-based tools using shared PROG_ARRAY maps.</p> <p>tl;dr: Linux 6.18 and later disallows mixing attach types within the same program array.</p> <p>If your application uses a pinned program array, you may need to manually change the attach type of your XDP programs to <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#AttachType"><code>AttachNone</code></a> before they are loaded to ensure they can still be inserted into maps containing pre-upgrade programs.</p> <p>The same goes for BPF links. If you're updating an XDP link created by an older version of ebpf-go, you need to ensure your XDP program is loaded with the same attach type the link was initially created with, or updating will fail with EINVAL.</p> <p>For an example of how to deal with this change, <a href="https://redirect.github.com/cilium/cilium/pull/44209">here's the the Cilium PR</a> that implemented logic to try both attach types when updating links.</p> <h3>Windows helper function rename</h3> <p>ebpf-for-windows was upgraded from <code>0.21.0</code> to <code>v1.0.0-rc1</code>. efW made breaking changes to the names of helper functions, our API has been updated to match:</p> <ul> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0/asm#WindowsFnMemcmp"><code>asm.WindowsFnMemcmp</code></a> -> <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/asm#WindowsFnMemcmpS"><code>asm.WindowsFnMemcmpS</code></a></li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0/asm#WindowsFnMemcpy"><code>asm.WindowsFnMemcpy</code></a> -> <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/asm#WindowsFnMemcpyS"><code>asm.WindowsFnMemcpyS</code></a></li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0/asm#WindowsFnMemmove"><code>asm.WindowsFnMemmove</code></a> -> <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/asm#WindowsFnMemmoveS"><code>asm.WindowsFnMemmoveS</code></a></li> </ul> <h2>New Features</h2> <ul> <li>Struct ops — The ELF reader can now parse struct ops sections, building <code>MapSpecs</code> and resolving function-pointer members. <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/link#AttachStructOps"><code>link.AttachStructOps</code></a> has been added to allow attaching a <code>StructOpsMap</code> as a link. A sched_ext example can be found <a href="https://github.com/cilium/ebpf/tree/v0.21.0/examples/sched_ext">here</a>.</li> <li>Weak symbol & ELF linking — Programs and maps defined as weak symbols are now fully supported. The ELF reader performs per-symbol decoding for both <code>ProgramSpec</code> and <code>MapSpec</code>, meaning linked objects (produced via <code>bpftool gen object</code>) are now handled correctly.</li> <li>BTF type deduplication — <code>btf.Builder</code> can now deduplicate types while generating a BTF blob. Deduplication can be enabled by passing <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/btf#BuilderOptions"><code>BuilderOptions</code></a> to <code>NewBuilder</code> with the <code>Deduplication</code> field set to true.</li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramSpec.Compatible"><code>ProgramSpec.Compatible</code></a> was added — <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramSpec.Tag"><code>ProgramSpec.Tag</code></a> is now deprecated. The new <code>ProgramSpec.Compatible</code> method compares a loaded program's tag against both SHA-1 and SHA-256 hashes of the spec, ensuring correct behaviour across kernels — including kernel v6.18+, which switched to SHA-256 for program hashing.</li> <li>ProgramInfo improvements — The program name as reported by <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#ProgramInfo.Name"><code>ProgramInfo.Name</code></a> is now sourced from BTF func info when available to provide the full program name if it's longer than 15 bytes.</li> <li>LinkInfo improvements — Added a number of methods and types related to reading back link info.</li> <li>Reverse symbol lookup — Added <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/link#Executable.Symbol"><code>Executable.Symbol</code></a> to resolve addresses to a symbol and relative offset.</li> <li>Uprobe/kprobe link feature probing — <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/features#HaveBPFLinkKprobeMulti"><code>HaveBPFLinkKprobeMulti</code></a>, <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/features#HaveBPFLinkUprobeMulti"><code>HaveBPFLinkUprobeMulti</code></a>, and <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/features#HaveBPFLinkKprobeSession"><code>HaveBPFLinkKprobeSession</code></a> are now exported from the features package, making it easier to probe for multi-attach support before loading programs.</li> <li>Program run batching — A new <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#RunOptions"><code>RunOptions.BatchSize</code></a> option has been added to support batching when running programs.</li> </ul> <h2>Bug Fixes</h2> <ul> <li>Allow weak kfuncs loading without <code>CAP_SYS_ADMIN</code> — Loading programs with weak kfuncs on kernels that don't have the kfunc no longer fails with "operation not permitted" when the caller lacks <code>CAP_SYS_ADMIN</code>. The permission error is now treated as "not found" for weak kfuncs.</li> <li>ELF reader nil panic — Fixed a panic that could occur when loading an ELF without BTF due to a nil extInfo pointer. Along with the fix, a suite of regression tests was added that exercises the core loader logic with non-BTF ELFs as well.</li> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0/link#QueryResult.HaveLinkInfo"><code>QueryResult.HaveLinkInfo</code></a> heuristic — The heuristic has been updated to check for at least one attached program with a non-zero link ID, fixing a false positive introduced by a kernel change that began populating the revision field for cgroup queries.</li> <li>Windows map/program count — Increased the default map and program count on Windows to reduce failures when loading collections with more maps than previously allocated.</li> </ul> <h2>More breaking changes</h2> <h3>Deprecations</h3> <p>In this release we have removed a number of features which had been deprecated for a while.</p> <ul> <li><a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0#CollectionSpec.RewriteMaps"><code>CollectionSpec.RewriteMaps</code></a> - Pass <a href="https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0#CollectionOptions"><code>CollectionOptions.MapReplacements</code></a> when loading the Collection instead.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/cilium/ebpf/commits/v0.21.0">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps github.com/cilium/ebpf from 0.20.1-0.20260218191617-ee67e7f43dd9 to 0.21.0.
Release notes
Sourced from github.com/cilium/ebpf's releases.
... (truncated)
Commits