Documentation ¶
Overview ¶
SPDX-License-Identifier: Apache-2.0 Copyright Authors of Tetragon
Index ¶
- Constants
- Variables
- func GetLoaderSensor() *sensors.Sensor
- func LoadGenericTracepointSensor(bpfDir, mapDir string, load *program.Program, version, verbose int) error
- func ReadArgBytes(r *bytes.Reader, index int) (*api.MsgGenericKprobeArgBytes, error)
- func ReloadGenericKprobeSelectors(kpSensor *sensors.Sensor, conf *v1alpha1.KProbeSpec) error
- func ReloadGenericTracepointSelectors(p *program.Program, conf *v1alpha1.TracepointSpec) error
- type BinaryMapKey
- type BinaryMapValue
- type GenericTracepointConf
Constants ¶
const ( CharBufErrorENOMEM = -1 CharBufErrorPageFault = -2 CharBufErrorTooLarge = -3 CharBufSavedForRetprobe = -4 MaxKprobesMulti = 100 // MAX_ENTRIES_CONFIG in bpf code )
Variables ¶
var (
MaxFilterIntArgs = 8
)
Functions ¶
func GetLoaderSensor ¶
func ReadArgBytes ¶
func ReloadGenericKprobeSelectors ¶
func ReloadGenericKprobeSelectors(kpSensor *sensors.Sensor, conf *v1alpha1.KProbeSpec) error
ReloadGenericKprobeSelectors will reload a kprobe by unlinking it, generating new selector data and updating filter_map, and then relinking the kprobe (entry).
This is intended for speeding up testing, so DO NOT USE elsewhere without checking its implementation first because limitations may exist (e.g,. the config map is not updated, the retprobe is not reloaded, userspace return filters are not updated, etc.).
func ReloadGenericTracepointSelectors ¶
func ReloadGenericTracepointSelectors(p *program.Program, conf *v1alpha1.TracepointSpec) error
ReloadGenericTracepointSelectors will reload a tracepoint by unlinking it, generating new selector data and updating filter_map, and then relinking the tracepoint.
This is intended for speeding up testing, so DO NOT USE elsewhere without checking its implementation first because limitations may exist (e.g., the config map is not updated). TODO: pass the sensor here
Types ¶
type BinaryMapKey ¶
type BinaryMapKey struct {
PathName [256]byte
}
func (*BinaryMapKey) DeepCopyMapKey ¶
func (k *BinaryMapKey) DeepCopyMapKey() bpf.MapKey
func (*BinaryMapKey) GetKeyPtr ¶
func (k *BinaryMapKey) GetKeyPtr() unsafe.Pointer
func (*BinaryMapKey) NewValue ¶
func (k *BinaryMapKey) NewValue() bpf.MapValue
func (*BinaryMapKey) String ¶
func (k *BinaryMapKey) String() string
type BinaryMapValue ¶
type BinaryMapValue struct {
Id uint32
}
func (*BinaryMapValue) DeepCopyMapValue ¶
func (v *BinaryMapValue) DeepCopyMapValue() bpf.MapValue
func (*BinaryMapValue) GetValuePtr ¶
func (v *BinaryMapValue) GetValuePtr() unsafe.Pointer
func (*BinaryMapValue) NewValue ¶
func (v *BinaryMapValue) NewValue() bpf.MapValue
func (*BinaryMapValue) String ¶
func (v *BinaryMapValue) String() string
type GenericTracepointConf ¶
type GenericTracepointConf = v1alpha1.TracepointSpec
GenericTracepointConf is the configuration for a generic tracepoint. This is a caller-defined structure that configures a tracepoint.