-
Notifications
You must be signed in to change notification settings - Fork 830
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When trying to attach an eBPF program to a tracepoint whose group contains a hyphen (e.g. xhci-hcd), link.Tracepoint fails with:
opening tracepoint: invalid tracefs group: "xhci-hcd"
This happens because the validIdentifier function currently rejects hyphens (-), even though they are valid in tracefs event groups (for example, USB tracepoints use xhci-hcd).
This prevents attaching to valid tracepoints that exist in the kernel.
Expected behavior
The tracepoint should attach successfully, since xhci-hcd is a valid group under /sys/kernel/tracing/events/.
How to reproduce
Build a simple Go program that tries to attach to a tracepoint with a - in the group:
tp, err := link.Tracepoint("xhci-hcd", "xhci_setup_device", objs.XhciSetupDevice, nil)
if err != nil {
log.Fatalf("opening tracepoint: %s", err)
}
defer tp.Close()
and run the program.
Version information
github.com/cilium/ebpf v0.19.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working