Skip to content

Conversation

AryanBakliwal
Copy link
Contributor

This PR fixes an issue where attaching eBPF programs to tracepoints with group names containing - (e.g., xhci-hcd) would fail with:

opening tracepoint: invalid tracefs group: "xhci-hcd"

The root cause is that the validIdentifier function in tracefs rejected - characters, even though they are valid in tracepoint group names.

Fixes #1854

@AryanBakliwal AryanBakliwal requested a review from a team as a code owner August 20, 2025 04:40
@mmat11
Copy link
Contributor

mmat11 commented Aug 20, 2025

I think this test will fail https://github.com/cilium/ebpf/blob/main/internal/tracefs/perf_event_test.go#L34

@AryanBakliwal AryanBakliwal force-pushed the fix-tracegroup-hyphen branch from 37d2421 to 7f392cc Compare August 20, 2025 17:19
@AryanBakliwal AryanBakliwal requested a review from mmat11 August 22, 2025 05:04
mmat11
mmat11 previously approved these changes Aug 22, 2025
Copy link
Contributor

@mmat11 mmat11 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Thanks! Pushed a small fixup to a comment and the name of the -EINVAL test.

@ti-mo ti-mo merged commit d1a69ef into cilium:main Sep 1, 2025
30 of 33 checks passed
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.

link: link.Tracepoint fails for tracepoint groups containing '-' (hyphen)
3 participants