Skip to content

Conversation

@olsajiri
Copy link
Contributor

Recent ebpf changes make ebpf.LoadPinnedProgram fail on opening link path. We want to open only programs, so failing on opening links/maps is fine ad we just want to continue scanning.

Fixes: #3234

@netlify
Copy link

netlify bot commented Dec 17, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 4db3ec2
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/6764195fbaa6b00008b8e3ac
😎 Deploy Preview https://deploy-preview-3235--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@olsajiri olsajiri added the release-note/minor This PR introduces a minor user-visible change label Dec 17, 2024
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

fyi:

if strings.HasSuffix(path, "link") {
return nil // skip BPF links, they make the syscall fail since cilium/ebpf@78074c59
}
prog, err := ebpf.LoadPinnedProgram(path, nil)
if err != nil {
return fmt.Errorf("failed to load pinned object %q: %w", path, err)
}

Commit: ca9aaa0

@mtardy
Copy link
Member

mtardy commented Dec 17, 2024

Also added in the meantime, something we could actually use to do thing properly cilium/ebpf#1626.

@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch 5 times, most recently from 8954c06 to 0b460c2 Compare December 18, 2024 09:46
@olsajiri olsajiri marked this pull request as ready for review December 18, 2024 13:22
@olsajiri olsajiri requested a review from a team as a code owner December 18, 2024 13:22
@olsajiri olsajiri requested a review from jrfastab December 18, 2024 13:22
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

LGTM. Left some comments. Let me know what you think.

Thanks!

Recent ebpf changes make ebpf.LoadPinnedProgram fail on opening
link path. We want to open only programs, so failing on opening
links/maps is fine ad we just want to continue scanning.

Enforcing leading '/' and adding '/link_override' suffix.

Fixes: #3234
Signed-off-by: Jiri Olsa <[email protected]>
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Adding support to detect bpffs mount so we don't need
to specify --bpf-dir when running on top of k8s.

Signed-off-by: Jiri Olsa <[email protected]>
Adding support to detect lib directory so we don't need
to specify --bpf-lib when running on top of k8s.

Signed-off-by: Jiri Olsa <[email protected]>
Detect available terminal lines and print only output
that fits on terminal.

This is enabled only when in periodical output with
cleared screen.

Signed-off-by: Jiri Olsa <[email protected]>
With the new auto detect values.

Signed-off-by: Jiri Olsa <[email protected]>
@olsajiri olsajiri merged commit de2b126 into main Dec 20, 2024
42 checks passed
@olsajiri olsajiri deleted the pr/olsajiri/fixes branch December 20, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/minor This PR introduces a minor user-visible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tetra debug progs bug

3 participants