ovltracer

package
v0.19.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package ovltracer provides an eBPF-based tracer for catching overlayfs "in-use" errors (EBUSY). When overlayfs detects a directory conflict (e.g., trying to use an upperdir already in use), this tracer captures the event and logs the paths involved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (ebpf.Tracer, error)

New creates a new overlay tracer. It loads the BPF program and attaches to the necessary tracepoints and kprobes. Returns an error if BTF is not available or the required kernel symbol is not found.

Types

type Event

type Event struct {
	TimestampNs uint64
	Mntns       uint32
	Tgid        uint32
	Comm        [16]byte
	DentryName0 [dentryNameLen]byte // The dentry itself
	DentryName1 [dentryNameLen]byte // Parent
	DentryName2 [dentryNameLen]byte // Grandparent
	MountSrc    [maxPathLen]byte
	MountDst    [maxPathLen]byte
	MountData   [maxDataLen]byte
}

Event represents an overlay in-use event captured by the BPF program. It matches the C struct event in ovl_inuse.bpf.c.

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

Tracer is an eBPF-based tracer for overlay in-use errors.

func (*Tracer) Close

func (t *Tracer) Close() error

Close releases all resources held by the tracer.

func (*Tracer) Run

func (t *Tracer) Run(ctx context.Context)

Run starts reading events from the ring buffer and logs them. It blocks until the context is cancelled. Run should be called in a goroutine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL