utils

package
v0.12.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPUCount

func GetCPUCount() (int, error)

func GetCPUCountFromProc

func GetCPUCountFromProc() (int, error)

func GetCPUCountFromSysDevices

func GetCPUCountFromSysDevices() (int, error)

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

Jump to

Keyboard shortcuts

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