Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update all go dependencies master (minor) #200

Merged
merged 2 commits into from
Feb 7, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 1, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/cilium/ebpf v0.16.0 -> v0.17.2 age adoption passing confidence
github.com/docker/docker v27.4.1+incompatible -> v27.5.1+incompatible age adoption passing confidence
github.com/shirou/gopsutil/v4 v4.24.12 -> v4.25.1 age adoption passing confidence
golang.org/x/arch v0.11.0 -> v0.14.0 age adoption passing confidence
golang.org/x/sys v0.28.0 -> v0.30.0 age adoption passing confidence
k8s.io/cri-api v0.31.5 -> v0.32.1 age adoption passing confidence
k8s.io/cri-client v0.31.5 -> v0.32.1 age adoption passing confidence

Release Notes

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

v0.17.2

Compare Source

Another minor release to ship some bug fixes, notably for attaching bpf programs to symbols in kernel modules, and for reusing data sections across multiple Collections.

All users are encouraged to upgrade!

Features

Bug Fixes

Other Changes

Thanks to all who contributed and reported issues!

Full Changelog: cilium/ebpf@v0.17.1...v0.17.2

v0.17.1: Hotfix: don't retry endlessly on verifier errors on kernels <6.4

Compare Source

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.

v0.17.0: Global Variables, Decl Tags, and package pin

Compare Source

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 using CollectionSpec.RewriteConstants()! See the section on global variables under major features below.

  • program: remove LogSize and VerifierError.Truncated by @​lmb in https://github.com/cilium/ebpf/pull/1526

  • prog: add ProgramOptions.LogSizeStart to obtain full log after verifier bug by @​ti-mo in https://github.com/cilium/ebpf/pull/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. The ProgramOptions.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.

  • map: remove MapSpec.Freeze field by @​ti-mo in https://github.com/cilium/ebpf/pull/1558

  • elf_reader: don't use BPF_F_RDONLY_PROG flag to trigger map freezing by @​ti-mo in https://github.com/cilium/ebpf/pull/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 https://github.com/cilium/ebpf/pull/1576

  • info: expose more prog jited info by @​Asphaltt in https://github.com/cilium/ebpf/pull/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 doing unintended advanced things with BTF.

  • kallsyms: change Modules caching strategy, cache address lookups by @​ti-mo in https://github.com/cilium/ebpf/pull/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

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!

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:

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!

New Contributors

Full Changelog: cilium/ebpf@v0.16.0...v0.17.0

docker/docker (github.com/docker/docker)

v27.5.1+incompatible

Compare Source

v27.5.0+incompatible

Compare Source

shirou/gopsutil (github.com/shirou/gopsutil/v4)

v4.25.1

Compare Source

What's Changed
Other Changes

Full Changelog: shirou/gopsutil@v4.24.12...v4.25.1

kubernetes/cri-api (k8s.io/cri-api)

v0.32.1

Compare Source

v0.32.0

Compare Source

kubernetes/cri-client (k8s.io/cri-client)

v0.32.1

Compare Source

v0.32.0

Compare Source


Configuration

📅 Schedule: Branch creation - "* 0-3 1 * *" (UTC), Automerge - At any time (no schedule defined).

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

Rebasing: Never, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

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

@renovate renovate bot added dependencies Pull requests that update a dependency file renovate/stop-updating labels Dec 1, 2024
@mozillazg mozillazg changed the title fix(deps): update all go dependencies master (minor) chore(deps): update all go dependencies master (minor) Dec 1, 2024
@renovate renovate bot force-pushed the renovate/all-go-deps-master branch from 3108c81 to 7744419 Compare December 19, 2024 14:09
@renovate renovate bot changed the title chore(deps): update all go dependencies master (minor) fix(deps): update all go dependencies master (minor) Dec 19, 2024
@renovate renovate bot force-pushed the renovate/all-go-deps-master branch from 7744419 to d72cf93 Compare December 19, 2024 14:47
@renovate renovate bot force-pushed the renovate/all-go-deps-master branch from d72cf93 to bf41810 Compare January 4, 2025 11:00
@renovate renovate bot force-pushed the renovate/all-go-deps-master branch from bf41810 to cfc9841 Compare February 6, 2025 14:09
Copy link
Contributor Author

renovate bot commented Feb 6, 2025

ℹ 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

Details:

Package Change
github.com/ebitengine/purego v0.8.1 -> v0.8.2

@mozillazg mozillazg merged commit d946384 into master Feb 7, 2025
20 of 21 checks passed
@mozillazg mozillazg deleted the renovate/all-go-deps-master branch February 7, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file renovate/stop-updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant