Skip to content

Commit

Permalink
bpflbr: Skip tracing bpf progs
Browse files Browse the repository at this point in the history
Tracing bpf progs, like `fentry` and `fexit`, are not allowed to be
traced by `fentry` or `fexit` again.

Signed-off-by: Leon Hwang <[email protected]>
  • Loading branch information
Asphaltt committed Dec 6, 2024
1 parent 593feb9 commit 9fa8b11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/bpflbr/bpf_tracing_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ type bpfTracingInfo struct {
}

func (p *bpfProgs) addTracing(id ebpf.ProgramID, funcName string, prog *ebpf.Program) error {
if prog.Type() == ebpf.Tracing {
return nil
}

key := fmt.Sprintf("%d:%s", id, funcName)
if _, ok := p.tracings[key]; ok {
return nil
Expand Down

0 comments on commit 9fa8b11

Please sign in to comment.