Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tetragon: Fix override program pin for fmodret and kprobe multi #3298

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/tetragon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ func tetragonExecuteCtx(ctx context.Context, cancel context.CancelFunc, ready fu
observer.GetSensorManager().LogSensorsAndProbes(ctx)
defer func() {
observer.RemoveSensors(ctx)
os.Remove(observerDir)
}()

pm, err := tetragonGrpc.NewProcessManager(
Expand Down
4 changes: 2 additions & 2 deletions pkg/sensors/program/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func fmodretAttachOverride(load *Program, bpfDir string,
return fmt.Errorf("failed to clone generic_fmodret_override program: %w", err)
}

pinPath := filepath.Join(bpfDir, fmt.Sprint(load.PinPath, "-override"))
pinPath := filepath.Join(bpfDir, filepath.Join(load.PinPath, "prog_override"))

if err := prog.Pin(pinPath); err != nil {
return fmt.Errorf("pinning '%s' to '%s' failed: %w", load.Label, pinPath, err)
Expand Down Expand Up @@ -501,7 +501,7 @@ func MultiKprobeAttach(load *Program, bpfDir string) AttachFunc {
return nil, fmt.Errorf("failed to clone program '%s': %w", load.Label, err)
}

pinPath := filepath.Join(bpfDir, fmt.Sprint(load.PinPath, "-override"))
pinPath := filepath.Join(bpfDir, filepath.Join(load.PinPath, "prog_override"))

if err := progOverride.Pin(pinPath); err != nil {
return nil, fmt.Errorf("pinning '%s' to '%s' failed: %w", load.Label, pinPath, err)
Expand Down
Loading