Documentation ¶
Index ¶
- func GetCPUCount() (int, error)
- func GetCPUCountFromProc() (int, error)
- func GetCPUCountFromSysDevices() (int, error)
- func GetLinuxKernelVersion() (*version.Version, error)
- func LoadEBPFObjects(spec *ebpf.CollectionSpec, to interface{}, opts *ebpf.CollectionOptions) error
- func SupportsContextPropagation() bool
- type KernelLockdown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCPUCount ¶
func GetCPUCountFromProc ¶
func GetLinuxKernelVersion ¶
func GetLinuxKernelVersion() (*version.Version, error)
parse logic adapted from https://github.com/golang/go/blob/go1.21.3/src/internal/syscall/unix/kernel_version_linux.go
func LoadEBPFObjects ¶
func LoadEBPFObjects(spec *ebpf.CollectionSpec, to interface{}, opts *ebpf.CollectionOptions) error
LoadEBPFObjects loads eBPF objects from the given spec into the given interface. If the environment variable OTEL_GO_AUTO_SHOW_VERIFIER_LOG is set to true, the verifier log will be printed.
func SupportsContextPropagation ¶
func SupportsContextPropagation() bool
Does kernel version check and /sys/kernel/security/lockdown inspection to determine if it's safe to use bpf_probe_write_user.
Types ¶
type KernelLockdown ¶
type KernelLockdown uint8
const ( KernelLockdownNone KernelLockdown = iota + 1 // Linux Kernel security lockdown mode [none] KernelLockdownIntegrity // Linux Kernel security lockdown mode [integrity] KernelLockdownConfidentiality // Linux Kernel security lockdown mode [confidentiality] KernelLockdownOther // Linux Kernel security lockdown mode unknown )
func KernelLockdownMode ¶
func KernelLockdownMode() KernelLockdown
Click to show internal directories.
Click to hide internal directories.