Skip to content

Conversation

atenart
Copy link
Contributor

@atenart atenart commented Aug 25, 2025

Cookie support in raw tracepoints was done looking at if the bpf_get_attach_cookie_tracing type existed, but this[1] actually precede the introduction of the raw tp cookie support. Fix this by also checking if the cookie field exist in the bpf_raw_tp_link struct instead, which was introduced as part of the raw tp cookie support[2].

Fixes #560.

[1] 2fcc82411e74 ("bpf, x86: Attach a cookie to fentry/fexit/fmod_ret/lsm."). [2] 68ca5d4eebb8 ("bpf: support BPF cookie in raw tracepoint (raw_tp, tp_btf)
programs").

Fixes: d55a7f7 ("core: probe: kernel: set the symbol address in the BPF cookie").

Cookie support in raw tracepoints was done looking at if the
bpf_get_attach_cookie_tracing type existed, but this[1] actually precede the
introduction of the raw tp cookie support. Fix this by also checking if the
cookie field exist in the bpf_raw_tp_link struct instead, which was introduced
as part of the raw tp cookie support[2].

Fixes #560.

[1] 2fcc82411e74 ("bpf, x86: Attach a cookie to fentry/fexit/fmod_ret/lsm.").
[2] 68ca5d4eebb8 ("bpf: support BPF cookie in raw tracepoint (raw_tp, tp_btf)
    programs").

Fixes: d55a7f7 ("core: probe: kernel: set the symbol address in the BPF cookie").
Signed-off-by: Antoine Tenart <[email protected]>
@atenart atenart added this to the v1.7 milestone Aug 25, 2025
@atenart atenart added the run-functional-tests Request functional tests to be run by CI label Aug 25, 2025
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #562      +/-   ##
==========================================
- Coverage   37.24%   37.23%   -0.02%     
==========================================
  Files         104      104              
  Lines       10812    10816       +4     
  Branches    10812    10816       +4     
==========================================
  Hits         4027     4027              
- Misses       6482     6486       +4     
  Partials      303      303              
Flag Coverage Δ
aarch64 37.23% <0.00%> (-0.02%) ⬇️
x86_64 37.23% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@vlrpl vlrpl left a comment

Choose a reason for hiding this comment

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

thanks @atenart and @joseorpa.
Merged!

@vlrpl vlrpl merged commit b64cb03 into main Aug 25, 2025
18 checks passed
@vlrpl vlrpl deleted the at/raw_tp_cookie_fix branch August 25, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-functional-tests Request functional tests to be run by CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest image of retis throwing "failed to attach raw tracepoint" errors
2 participants