Skip to content

Commit

Permalink
chore(deps): bump github.com/cilium/ebpf from 0.16.0 to 0.17.1 (#12396)
Browse files Browse the repository at this point in the history
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from
0.16.0 to 0.17.1.
<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>Hotfix: don't retry endlessly on verifier errors on kernels
&lt;6.4</h2>
<p>During the prior removal of <code>ProgramOptions.LogSize</code> in
v0.16, the tests weren't updated to exercise the retry logic. With the
last-minute addition of <code>ProgramOptions.LogSizeStart</code>, 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.</p>
<ul>
<li>prog: fix shadowing log size variable in verifier log retry loop by
<a href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1635">cilium/ebpf#1635</a></li>
</ul>
<h2>Global Variables, Decl Tags, and package <code>pin</code></h2>
<p><strong>Note: the hotfix release 0.17.1 is out. Users are highly
encouraged to upgrade.</strong></p>
<p>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.</p>
<p>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.</p>
<p>This release also marks the end of our Go 1.21 support; Go 1.22 is
required going forward.</p>
<h2>Breaking Changes</h2>
<p>Before we get to the fun stuff, we need to call out a few breaking
changes:</p>
<ul>
<li>
<p><strong>Global variables with a <code>static</code> qualifier can no
longer be rewritten using
<code>CollectionSpec.RewriteConstants()</code>!</strong> See the section
on global variables under major features below.</p>
</li>
<li>
<p>program: remove LogSize and VerifierError.Truncated by <a
href="https://github.com/lmb"><code>@​lmb</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1526">cilium/ebpf#1526</a></p>
</li>
<li>
<p>prog: add ProgramOptions.LogSizeStart to obtain full log after
verifier bug by <a
href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1630">cilium/ebpf#1630</a></p>
<p>The <code>ProgramOptions.LogSize</code> 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. The <code>ProgramOptions.LogSizeStart</code> 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.</p>
</li>
<li>
<p>map: remove MapSpec.Freeze field by <a
href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1558">cilium/ebpf#1558</a></p>
</li>
<li>
<p>elf_reader: don't use BPF_F_RDONLY_PROG flag to trigger map freezing
by <a href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1568">cilium/ebpf#1568</a></p>
<p>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.</p>
</li>
<li>
<p>info: expose ksym info and func info by ProgramInfo by <a
href="https://github.com/Asphaltt"><code>@​Asphaltt</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1576">cilium/ebpf#1576</a></p>
</li>
<li>
<p>info: expose more prog jited info by <a
href="https://github.com/Asphaltt"><code>@​Asphaltt</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1598">cilium/ebpf#1598</a></p>
<p>Some ext_info types in package btf were redefined to enable pulling
raw func and line infos out of <code>Program.Info()</code>. These were
all types without methods and all unexported fields, but calling them
out regardless in case someone's doing <del>unintended</del> advanced
things with BTF.</p>
</li>
<li>
<p>kallsyms: change Modules caching strategy, cache address lookups by
<a href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1590">cilium/ebpf#1590</a></p>
<p>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. <code>ProgramSpec.KernelModule()</code> was unexported
until further notice.</p>
<p>Also, bpf2go users should now be able to generate Go bindings as
unprivileged users once again. Oops!</p>
</li>
</ul>
<h2>Major Features</h2>
<h3>Easy global variables: introducing <code>ebpf.VariableSpec</code>
and <code>ebpf.Variable</code></h3>
<ul>
<li>CollectionSpec: add new Variables field to interact with constants
and global variables by <a
href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1564">cilium/ebpf#1564</a></li>
<li>Collection: add Variables field to interact with global variables by
<a href="https://github.com/ti-mo"><code>@​ti-mo</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1572">cilium/ebpf#1572</a></li>
<li>bpf2go: generate assignment structs and Go types for Variables and
VariableSpecs by <a
href="https://github.com/smagnani96"><code>@​smagnani96</code></a> in <a
href="https://redirect.github.com/cilium/ebpf/pull/1610">cilium/ebpf#1610</a></li>
</ul>
<p>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 <code>CollectionSpec.Variables</code> and
<code>CollectionSpec.Variables</code>. We've published a small guide
over on <a
href="https://ebpf-go.dev/concepts/global-variables">ebpf-go.dev/concepts/global-variables</a>
that details how to use them, so we're not going to reiterate here.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/cilium/ebpf/commit/e439d37e580e2d66e98f2b987f8ba0c295231439"><code>e439d37</code></a>
prog: fix shadowing log size variable in verifier log retry loop</li>
<li><a
href="https://github.com/cilium/ebpf/commit/228bb4e23714d7e133485a2e19841d86ed4c58dd"><code>228bb4e</code></a>
examples: tcx: use Variable API</li>
<li><a
href="https://github.com/cilium/ebpf/commit/580ff21224aa5b260a287fdd301541d5e11ce9b3"><code>580ff21</code></a>
bpf2go: generate Go types used in global variables</li>
<li><a
href="https://github.com/cilium/ebpf/commit/1e8f0798aac96c105a3fc849cb4a315b8917d1cb"><code>1e8f079</code></a>
bpf2go: generate assignment structs for Variables and VariableSpecs</li>
<li><a
href="https://github.com/cilium/ebpf/commit/c37b7afe4394b5c7fbd507faf50cb03b11af0a56"><code>c37b7af</code></a>
bpf2go: test: remove unused typesEqualComparer function</li>
<li><a
href="https://github.com/cilium/ebpf/commit/97cfce5d54c360fd9df3a854f422f34f1ffe1573"><code>97cfce5</code></a>
map: automatically set CPUMap MaxEntries based on possible CPUs</li>
<li><a
href="https://github.com/cilium/ebpf/commit/e8b05c5ff29b9d3a71199c91efdfe07bce52cec9"><code>e8b05c5</code></a>
prog: add ProgramOptions.LogSizeStart to obtain full log after verifier
bug</li>
<li><a
href="https://github.com/cilium/ebpf/commit/f2831062a1f49c984adfe973a866d2ce77c0b066"><code>f283106</code></a>
internal: add Between function for clamping a value between min and
max</li>
<li><a
href="https://github.com/cilium/ebpf/commit/6546014c10e632f3dd84035f14b95a3e6518e0db"><code>6546014</code></a>
README.md: add pin package to the overview</li>
<li><a
href="https://github.com/cilium/ebpf/commit/60405bb8b32b7c0af93c5209ce736442f8da7070"><code>60405bb</code></a>
examples: annotate ringbuf and perf event arrays with value type
information</li>
<li>Additional commits viewable in <a
href="https://github.com/cilium/ebpf/compare/v0.16.0...v0.17.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cilium/ebpf&package-manager=go_modules&previous-version=0.16.0&new-version=0.17.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Dec 26, 2024
1 parent 050da4b commit 7b62472
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/Nordix/simple-ipam v1.0.0
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/bakito/go-log-logr-adapter v0.0.3-0.20231211113354-bfa42fa7e121
github.com/cilium/ebpf v0.16.0
github.com/cilium/ebpf v0.17.1
github.com/containernetworking/cni v1.2.3
github.com/containernetworking/plugins v1.6.1
github.com/emicklei/go-restful/v3 v3.12.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMr
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cilium/ebpf v0.16.0 h1:+BiEnHL6Z7lXnlGUsXQPPAE7+kenAd4ES8MQ5min0Ok=
github.com/cilium/ebpf v0.16.0/go.mod h1:L7u2Blt2jMM/vLAVgjxluxtBKlz3/GWjB0dMOEngfwE=
github.com/cilium/ebpf v0.17.1 h1:G8mzU81R2JA1nE5/8SRubzqvBMmAmri2VL8BIZPWvV0=
github.com/cilium/ebpf v0.17.1/go.mod h1:vay2FaYSmIlv3r8dNACd4mW/OCaZLJKJOo+IHBvCIO8=
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI=
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
Expand Down

0 comments on commit 7b62472

Please sign in to comment.