Documentation
¶
Index ¶
- func AvailableSyscalls() ([]string, error)
- func FindBTFFuncParamFromHook(hook string, argIndex int) (*btf.FuncParam, error)
- func FindBTFStruct(name string) (*btf.Struct, error)
- func GetCachedBTFFile() string
- func GetSyscallsList() ([]string, error)
- func InitCachedBTF(lib, btf string) error
- func NewBTF() (*btf.Spec, error)
- func ResolveBTFPath(btfArgs *[api.MaxBTFArgDepth]api.ConfigBTFArg, currentType btf.Type, ...) (*btf.Type, error)
- func ResolveNestedTypes(ty btf.Type) btf.Type
- func ValidateKprobeSpec(bspec *btf.Spec, call string, kspec *v1alpha1.KProbeSpec, ks *ksyms.Ksyms) error
- type Spec
- type ValidationFailedError
- type ValidationWarnError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableSyscalls ¶ added in v0.11.0
AvailableSyscalls returns the list of available syscalls.
It uses syscallinfo.SyscallsNames() and filters calls via information in BTF.
func FindBTFFuncParamFromHook ¶ added in v1.5.0
func GetCachedBTFFile ¶
func GetCachedBTFFile() string
func GetSyscallsList ¶ added in v0.11.0
func InitCachedBTF ¶
func ResolveBTFPath ¶ added in v1.5.0
func ResolveBTFPath( btfArgs *[api.MaxBTFArgDepth]api.ConfigBTFArg, currentType btf.Type, pathToFound []string, i int, ) (*btf.Type, error)
Return: The last type found matching the path, or error.
func ValidateKprobeSpec ¶
func ValidateKprobeSpec(bspec *btf.Spec, call string, kspec *v1alpha1.KProbeSpec, ks *ksyms.Ksyms) error
ValidateKprobeSpec validates a kprobe spec based on BTF information
NB: turns out we need more than BTF information for the validation (see syscalls). We still keep this code in the btf package for now, and we can move it once we found a better home for it.
Types ¶
type ValidationFailedError ¶ added in v1.5.0
type ValidationFailedError struct {
// contains filtered or unexported fields
}
ValidationFailedError is used to mark that validation was not successful and that the we should not continue with loading this spec.
func (*ValidationFailedError) Error ¶ added in v1.5.0
func (err *ValidationFailedError) Error() string
func (*ValidationFailedError) Unwrap ¶ added in v1.5.0
func (err *ValidationFailedError) Unwrap() error
type ValidationWarnError ¶ added in v1.5.0
type ValidationWarnError struct {
// contains filtered or unexported fields
}
ValidationWarnError is used to mark that validation was not successful but it's not clear that the spec is problematic. Callers may use this error to issue a warning instead of aborting
func (*ValidationWarnError) Error ¶ added in v1.5.0
func (err *ValidationWarnError) Error() string
func (*ValidationWarnError) Unwrap ¶ added in v1.5.0
func (err *ValidationWarnError) Unwrap() error