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

chore(deps): update github.com/cilium/ebpf to v0.17.1 #232

Merged
merged 3 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ jobs:
# renovate: datasource=docker depName=quay.io/lvh-images/kernel-images
- '6.6-20241031.113911'
# renovate: datasource=docker depName=quay.io/lvh-images/kernel-images
- '6.12-20250116.014736'
# renovate: datasource=docker depName=quay.io/lvh-images/kernel-images
- 'bpf-20241101.013334'
# renovate: datasource=docker depName=quay.io/lvh-images/kernel-images
- 'bpf-next-20241101.013334'
Expand Down Expand Up @@ -300,10 +302,12 @@ jobs:
exit 1

- name: build demo app
if: ${{ (!startsWith(matrix.kernel, '5.4')) && (!startsWith(matrix.kernel, '4.')) }}
run: |
make -C testdata/gohttpapp build

- name: Test go tls keylog (unstripped)
if: ${{ (!startsWith(matrix.kernel, '5.4')) && (!startsWith(matrix.kernel, '4.')) }}
uses: cilium/little-vm-helper@97c89f004bd0ab4caeacfe92ebc956e13e362e6b # v0.0.19
with:
provision: 'false'
Expand All @@ -322,6 +326,7 @@ jobs:
exit 1

- name: Test go tls keylog (PIE)
if: ${{ (!startsWith(matrix.kernel, '5.4')) && (!startsWith(matrix.kernel, '4.')) }}
uses: cilium/little-vm-helper@97c89f004bd0ab4caeacfe92ebc956e13e362e6b # v0.0.19
with:
provision: 'false'
Expand All @@ -340,6 +345,7 @@ jobs:
exit 1

- name: Test go tls keylog (stripped)
if: ${{ (!startsWith(matrix.kernel, '5.4')) && (!startsWith(matrix.kernel, '4.')) }}
uses: cilium/little-vm-helper@97c89f004bd0ab4caeacfe92ebc956e13e362e6b # v0.0.19
with:
provision: 'false'
Expand All @@ -358,6 +364,7 @@ jobs:
exit 1

- name: Test go tls keylog (stripped + PIE)
if: ${{ (!startsWith(matrix.kernel, '5.4')) && (!startsWith(matrix.kernel, '4.')) }}
uses: cilium/little-vm-helper@97c89f004bd0ab4caeacfe92ebc956e13e362e6b # v0.0.19
with:
provision: 'false'
Expand Down
13 changes: 6 additions & 7 deletions bpf/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -cc clang -no-strip -target $TARGET -type gconfig_t -type packet_event_t -type exec_event_t -type exit_event_t -type flow_pid_key_t -type process_meta_t -type packet_event_meta_t -type go_keylog_event_t -type new_netdevice_event_t -type netdevice_change_event_t -type mount_event_t Bpf ./ptcpdump.c -- -I./headers -I./headers/$TARGET -I. -Wall

const tcFilterName = "ptcpdump"
const logSzie = ebpf.DefaultVerifierLogSize * 64
const logSzie = 64 * 1024 * 64

type BPF struct {
spec *ebpf.CollectionSpec
Expand Down Expand Up @@ -117,9 +117,7 @@ func (b *BPF) Load(opts Options) error {
}
if !b.isLegacyKernel {
log.Infof("rewrite constants with %+v", config)
err = b.spec.RewriteConstants(map[string]interface{}{
"g": config,
})
err = b.spec.Variables["g"].Set(config)
if err != nil {
return fmt.Errorf("rewrite constants: %w", err)
}
Expand All @@ -136,12 +134,13 @@ load:
loadCount++
err = b.spec.LoadAndAssign(b.objs, &ebpf.CollectionOptions{
Programs: ebpf.ProgramOptions{
KernelTypes: opts.kernelTypes,
LogLevel: ebpf.LogLevelInstruction,
LogSize: logSzie,
KernelTypes: opts.kernelTypes,
LogLevel: ebpf.LogLevelInstruction,
LogSizeStart: logSzie,
},
IgnoreUnknownProgram: true,
IgnoreNotSupportedProgram: true,
IgnoreUnknownVariable: true,
})
if err != nil {
log.Infof("load and assign failed: %+v", err)
Expand Down
36 changes: 35 additions & 1 deletion bpf/bpf_arm64_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified bpf/bpf_arm64_bpfel.o
Binary file not shown.
34 changes: 33 additions & 1 deletion bpf/bpf_legacy_arm64_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified bpf/bpf_legacy_arm64_bpfel.o
Binary file not shown.
34 changes: 33 additions & 1 deletion bpf/bpf_legacy_x86_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified bpf/bpf_legacy_x86_bpfel.o
Binary file not shown.
36 changes: 35 additions & 1 deletion bpf/bpf_no_tracing_arm64_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified bpf/bpf_no_tracing_arm64_bpfel.o
Binary file not shown.
Loading
Loading