base

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Execve = program.Builder(
		config.ExecObj(),
		"sched/sched_process_exec",
		"tracepoint/sys_execve",
		"event_execve",
		"execve",
	).SetPolicy(basePolicy)

	ExecveBprmCommit = program.Builder(
		"bpf_execve_bprm_commit_creds.o",
		"security_bprm_committing_creds",
		"kprobe/security_bprm_committing_creds",
		"tg_kp_bprm_committing_creds",
		"kprobe",
	).SetPolicy(basePolicy)

	Exit = program.Builder(
		"bpf_exit.o",
		"acct_process",
		"kprobe/acct_process",
		"event_exit",
		"kprobe",
	).SetPolicy(basePolicy)

	Fork = program.Builder(
		"bpf_fork.o",
		"wake_up_new_task",
		"kprobe/wake_up_new_task",
		"kprobe_pid_clear",
		"kprobe",
	).SetPolicy(basePolicy)

	/* Event Ring map */
	TCPMonMap = program.MapBuilder("tcpmon_map", Execve)
	/* Networking and Process Monitoring maps */
	ExecveMap          = program.MapBuilder("execve_map", Execve)
	ExecveTailCallsMap = program.MapBuilderProgram("execve_calls", Execve)

	ExecveJoinMap = program.MapBuilder("tg_execve_joined_info_map", ExecveBprmCommit)

	/* Tetragon runtime configuration */
	TetragonConfMap = program.MapBuilder("tg_conf_map", Execve)

	/* Internal statistics for debugging */
	ExecveStats        = program.MapBuilder("execve_map_stats", Execve)
	ExecveJoinMapStats = program.MapBuilder("tg_execve_joined_info_map_stats", ExecveBprmCommit)
	StatsMap           = program.MapBuilder("tg_stats_map", Execve)

	MatchBinariesSetMap = program.MapBuilder(mbset.MapName, Execve)

	ErrMetricsMap = program.MapBuilder(errmetrics.MapName, Execve)
)
View Source
var (
	// GetInitialSensor returns the base sensor
	GetInitialSensor     = sync.OnceValue(initBaseSensor)
	GetInitialSensorTest = initBaseSensorFn()
)

Functions

func ApplyExtensions added in v1.3.2

func ApplyExtensions(s *sensors.Sensor) *sensors.Sensor

func GetDefaultMaps

func GetDefaultMaps() []*program.Map

func GetDefaultPrograms

func GetDefaultPrograms() []*program.Program

func GetExecveMap

func GetExecveMap() *program.Map

func GetExecveMapStats

func GetExecveMapStats() *program.Map

func GetTetragonConfMap

func GetTetragonConfMap() *program.Map

func IsExecve added in v1.3.2

func IsExecve(p *program.Program) bool

IsExecve returns true if this is a base execve program

func IsExit added in v1.3.2

func IsExit(p *program.Program) bool

func IsFork added in v1.3.2

func IsFork(p *program.Program) bool

func RegisterExtensionAtInit added in v1.3.2

func RegisterExtensionAtInit(name string, fn ExtensionFn)

Types

type ExtensionFn added in v1.3.2

type ExtensionFn func(base *sensors.Sensor) (*sensors.Sensor, error)

Jump to

Keyboard shortcuts

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