Skip to content

go.mod: github.com/cilium/ebpf v0.5.0#2904

Merged
kolyshkin merged 1 commit into
opencontainers:masterfrom
thaJeztah:bump_ebpf2
Apr 14, 2021
Merged

go.mod: github.com/cilium/ebpf v0.5.0#2904
kolyshkin merged 1 commit into
opencontainers:masterfrom
thaJeztah:bump_ebpf2

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

full diff: cilium/ebpf@v0.4.0...v0.5.0

Breaking changes

All LoadPinned*() functions now take LoadPinOptions to control loader behaviour.
Simply pass nil to load with default options.

  • LoadPinnedMap()
  • LoadPinnedProgram()
  • LoadPinnedCgroup()
  • LoadPinnedIter()
  • LoadPinnedRawLink()
  • LoadPinnedNetNs()

Bug fixes

  • Program.IsPinned() now behaves correctly on maps loaded from bpffs
  • Map.Pin() no longer clobbers the destination file if it already exists

Features

  • Attaching to k(ret)probes and tracepoints can now be done with link.Kprobe(),
    link.Kretprobe() and link.Tracepoint()
  • Programs of type Kprobe automatically get their KernelVersion fields populated
    by detecting the kernel version at runtime
  • MapOptions now contains a LoadPinOptions
  • ProgSpec now contains a Flags field, adding support for BPF_F_SLEEPABLE
  • Made BTF map loader more flexible by looping over Vars in a BTF data section
  • Pinned Maps and Programs can now be loaded from bpffs in read-or write-only mode
  • Added golangci-lint project configuration, running in CI

Examples

kprobe and tracepoint examples updated to use the new link.Kprobe() and link.Tracepoint() API
There is now an example for how to attach eBPF programs to uprobes

Signed-off-by: Sebastiaan van Stijn github@gone.nl

full diff: cilium/ebpf@v0.4.0...v0.5.0

Breaking changes
------------------------------------------

All LoadPinned*() functions now take LoadPinOptions to control loader behaviour.
Simply pass nil to load with default options.

- LoadPinnedMap()
- LoadPinnedProgram()
- LoadPinnedCgroup()
- LoadPinnedIter()
- LoadPinnedRawLink()
- LoadPinnedNetNs()

Bug fixes
------------------------------------------

- Program.IsPinned() now behaves correctly on maps loaded from bpffs
- Map.Pin() no longer clobbers the destination file if it already exists

Features
------------------------------------------

- Attaching to k(ret)probes and tracepoints can now be done with link.Kprobe(),
  link.Kretprobe() and link.Tracepoint()
- Programs of type Kprobe automatically get their KernelVersion fields populated
  by detecting the kernel version at runtime
- MapOptions now contains a LoadPinOptions
- ProgSpec now contains a Flags field, adding support for BPF_F_SLEEPABLE
- Made BTF map loader more flexible by looping over Vars in a BTF data section
- Pinned Maps and Programs can now be loaded from bpffs in read-or write-only mode
- Added golangci-lint project configuration, running in CI

Examples
------------------------------------------

kprobe and tracepoint examples updated to use the new link.Kprobe() and link.Tracepoint() API
There is now an example for how to attach eBPF programs to uprobes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin kolyshkin merged commit 60973b5 into opencontainers:master Apr 14, 2021
@thaJeztah thaJeztah deleted the bump_ebpf2 branch April 14, 2021 13:15
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.

3 participants