Skip to content

Update module github.com/cilium/ebpf to v0.12.2 #98

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

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 23, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/cilium/ebpf require minor v0.10.0 -> v0.12.2

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

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

v0.12.2

Compare Source

This release fixes unmarshaling from a map operation into a []byte, see #​1180. This is a regression in v0.12.0.

We now also properly return an error when the value to unmarshal into is too small, see #​1181. This behaviour has existed for a long time.

What's Changed

New Contributors

Full Changelog: cilium/ebpf@v0.12.1...v0.12.2

v0.12.1

Compare Source

Fixes

Fix ProgramInfo.Instructions failing to decode ExtInfos

A recent change to ProgramInfo.Instructions failed to take a difference between kernel and ELF wire format into account. This meant that retrieving the instructions of a program from the kernel failed with a error.

See #​1168, fixed by #​1169.

Fix reading auxv on 32-bit platforms

The code to determine the kernel version from vdso has been broken on 32-bit platforms. Note that 32-bit arches are not officially supported to the fix is best effort.

See #​1133, fixed by #​1144.

What's Changed

Full Changelog: cilium/ebpf@v0.12.0...v0.12.1

v0.12.0

Compare Source

This release requires at least Go 1.20. It is mainly a bugfix release without any expected breaking changes. Map operations have also been made faster on the Go side.

Fixes

Correctly freeze .rodata maps

.rodata maps were frozen after programs referring to them were loaded, preventing the verifier from eliminating dead code based on the contents of the .rodata maps. Upgrade if you're running into odd verifier errors that don't occur on libbpf.

See https://github.com/cilium/ebpf/pull/1159.

Fix fd leak in error path of kfunc support

The library leaked file descriptors when trying to use non-existent kfuncs.

See https://github.com/cilium/ebpf/pull/1145.

Fix incorrect formatting of signed BTF enums with negative values

Signed enums with negative values were incorrectly formatted, leading to invalid output from bpf2go.

See https://github.com/cilium/ebpf/pull/1155.

Additions

Map operations using common types are much faster

Keys and values used in map operations were indiscriminately passed through the encoding/binary package. There is now a fast path which skips this step when the in-memory layout of a type is equivalent to the output produced by binary.Write. The result is less allocations and CPU usage.

The optimization doesn't apply to per-CPU maps.

See https://github.com/cilium/ebpf/pull/1062.

What's Changed

New Contributors

Full Changelog: cilium/ebpf@v0.11.0...v0.12.0

v0.11.0: Support for __ksym and __kfunc

Compare Source

Breaking changes

This release requires at least Go 1.19.

github.com/cilium/ebpf/btf:

  • Handle.Spec() now takes a base *Spec argument.
    nil is accepted if the Handle is for vmlinux. If Handle is for a (split BTF) kernel module, pass the result of LoadKernelSpec().
  • NewHandle() now takes a *Builder instead of a *Spec.
    Loading BTF into the kernel now goes via a new Builder type. See the 'Additions' section below.

github.com/cilium/ebpf/link:

  • KprobeMultiOptions.Addresses: changed from []uint64 to []uintptr
    The old API didn't take 32-bit architectures into account.

Fixes

Work around the kernel rejecting some Datasec

The kernel erroneously rejects Datasec where a Typedef, Volatile, Const, Restrict or typeTag follows a Pointer, Struct, Union or Array. There is now a workaround in place, see https://github.com/cilium/ebpf/pull/954.

Marshaling Map keys and values is more efficient

The marshaling code in the library now uses sync.Pool to re-use bytes.Buffer, which makes common map operations cheaper, see https://github.com/cilium/ebpf/pull/1053.

CO-RE relocations are a lot more efficient

The CO-RE code now does much less copying of BTF types, which makes CO-RE relocation a lot faster, especially against large types such as sk_buff. See https://github.com/cilium/ebpf/pull/1084.

Additions

__ksym (kfunc) support

It's now possible to use new-style BPF helpers aka kfunc with the library. Going forward, all new BPF 'helper' functionality in the kernel will be exposed as kfuncs, and new helpers won't be added. See https://github.com/cilium/ebpf/pull/966 and https://github.com/cilium/ebpf/pull/996.

__kconfig support

Tracing programs often need to vary their behaviour based on kernel configuration, such as CONFIG_HZ. Such references to __kconfig variables are now automatically populated from a variety of sources such as /proc/config.gz. Note that if you run your application implementing ebpf-go in a container, it will need access to the host's /boot on some distributions that don't ship /proc/config(.gz). (notably, Debian-based distros)

As a special mention, the LINUX_HAS_SYSCALL_WRAPPER kconfig is also supported. This allows writing portable kprobes using the BPF_KSYSCALL macro from bpf_tracing.h.

See https://github.com/cilium/ebpf/pull/951, https://github.com/cilium/ebpf/pull/960 and https://github.com/cilium/ebpf/pull/995.

Overwritable perf buffer support

The perf reader now allows creating "overwritable" perf buffers, which always contain the most recent events in case the buffer ever gets full. This is in contrast to regular perf buffers which drop recent events if there is no more space. This is useful to implement "flight recorder" type functionality for events sourced from BPF.

See https://github.com/cilium/ebpf/pull/953.

btf.Builder

Constructing custom BTF type blobs is now possible through the new btf.Builder type. Call btf.NewBuilder() to obtain one, Builder.Add(t btf.Type) to add any types you need, followed by btf.NewHandle(b btf.Builder) to load the types into the kernel. Builder also has a Marshal() method for serializing the type collection into the canonical BTF format so it can be stored for later use.

What's Changed

New Contributors

Full Changelog: cilium/ebpf@v0.10.0...v0.11.0


Configuration

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

🚦 Automerge: Enabled.

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge October 23, 2023 09:53
@renovate
Copy link
Contributor Author

renovate bot commented Oct 23, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: docker run --rm --name=renovate_a_sidecar --label=renovate_a_child --memory=3584m -v "/tmp/worker/b89d65/be0d5d/repos/github/miscord-dev/tetrapod":"/tmp/worker/b89d65/be0d5d/repos/github/miscord-dev/tetrapod" -v "/tmp/worker/b89d65/be0d5d/cache":"/tmp/worker/b89d65/be0d5d/cache" -e GOPATH -e GOPROXY -e GOSUMDB -e GOFLAGS -e CGO_ENABLED -e GIT_CONFIG_KEY_0 -e GIT_CONFIG_VALUE_0 -e GIT_CONFIG_KEY_1 -e GIT_CONFIG_VALUE_1 -e GIT_CONFIG_KEY_2 -e GIT_CONFIG_VALUE_2 -e GIT_CONFIG_COUNT -e CONTAINERBASE_CACHE_DIR -w "/tmp/worker/b89d65/be0d5d/repos/github/miscord-dev/tetrapod" ghcr.io/containerbase/sidecar:9.23.4 bash -l -c "install-tool golang 1.21.3 && go get -d -t ./..."
go: github.com/benbjohnson/clock@v1.1.0: Get "https://proxy.golang.org/github.com/benbjohnson/clock/@v/v1.1.0.mod": EOF

@renovate renovate bot added this pull request to the merge queue Oct 23, 2023
Merged via the queue into main with commit 2cf2959 Oct 23, 2023
@renovate renovate bot deleted the renovate/github.com-cilium-ebpf-0.x branch October 23, 2023 09:56
@github-actions github-actions bot mentioned this pull request Mar 20, 2024
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.

0 participants