exec_bpfprog

package
v0.0.0-...-8b48234 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package exec_bpfprog hosts the BPF C source for the sched/sched_process_exec tracepoint live monitor and the generated Go bindings produced by bpf2go.

To regenerate (needs clang + libbpf-devel; the CI builder image carries both):

make bpf-gen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadExec

func LoadExec() (*ebpf.CollectionSpec, error)

LoadExec returns the embedded CollectionSpec for Exec.

func LoadExecObjects

func LoadExecObjects(obj interface{}, opts *ebpf.CollectionOptions) error

LoadExecObjects loads Exec and converts it into a struct.

The following types are suitable as obj argument:

*ExecObjects
*ExecPrograms
*ExecMaps

See ebpf.CollectionSpec.LoadAndAssign documentation for details.

Types

type ExecExecEvent

type ExecExecEvent struct {
	Uid        uint32
	Pid        uint32
	Ppid       uint32
	Comm       [16]uint8
	ParentComm [16]uint8
	Filename   [256]uint8
	// contains filtered or unexported fields
}

type ExecMapSpecs

type ExecMapSpecs struct {
	Events *ebpf.MapSpec `ebpf:"events"`
}

ExecMapSpecs contains maps before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ExecMaps

type ExecMaps struct {
	Events *ebpf.Map `ebpf:"events"`
}

ExecMaps contains all maps after they have been loaded into the kernel.

It can be passed to LoadExecObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*ExecMaps) Close

func (m *ExecMaps) Close() error

type ExecObjects

type ExecObjects struct {
	ExecPrograms
	ExecMaps
	ExecVariables
}

ExecObjects contains all objects after they have been loaded into the kernel.

It can be passed to LoadExecObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*ExecObjects) Close

func (o *ExecObjects) Close() error

type ExecProgramSpecs

type ExecProgramSpecs struct {
	CsmOnExec *ebpf.ProgramSpec `ebpf:"csm_on_exec"`
}

ExecProgramSpecs contains programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ExecPrograms

type ExecPrograms struct {
	CsmOnExec *ebpf.Program `ebpf:"csm_on_exec"`
}

ExecPrograms contains all programs after they have been loaded into the kernel.

It can be passed to LoadExecObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*ExecPrograms) Close

func (p *ExecPrograms) Close() error

type ExecSpecs

type ExecSpecs struct {
	ExecProgramSpecs
	ExecMapSpecs
	ExecVariableSpecs
}

ExecSpecs contains maps and programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ExecVariableSpecs

type ExecVariableSpecs struct {
	Unused *ebpf.VariableSpec `ebpf:"unused"`
}

ExecVariableSpecs contains global variables before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ExecVariables

type ExecVariables struct {
	Unused *ebpf.Variable `ebpf:"unused"`
}

ExecVariables contains all global variables after they have been loaded into the kernel.

It can be passed to LoadExecObjects or ebpf.CollectionSpec.LoadAndAssign.

Jump to

Keyboard shortcuts

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