kernel

package
v0.0.0-...-46749fd Latest Latest
Warning

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

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

Documentation

Overview

Package kernel holds kernel related files

Index

Constants

This section is empty.

Variables

View Source
var (

	// Kernel4_9 is the KernelVersion representation of kernel version 4.9
	Kernel4_9 = kernel.VersionCode(4, 9, 0)
	// Kernel4_10 is the KernelVersion representation of kernel version 4.10
	Kernel4_10 = kernel.VersionCode(4, 10, 0)
	// Kernel4_12 is the KernelVersion representation of kernel version 4.12
	Kernel4_12 = kernel.VersionCode(4, 12, 0)
	// Kernel4_13 is the KernelVersion representation of kernel version 4.13
	Kernel4_13 = kernel.VersionCode(4, 13, 0)
	// Kernel4_14 is the KernelVersion representation of kernel version 4.14
	Kernel4_14 = kernel.VersionCode(4, 14, 0)
	// Kernel4_15 is the KernelVersion representation of kernel version 4.15
	Kernel4_15 = kernel.VersionCode(4, 15, 0)
	// Kernel4_16 is the KernelVersion representation of kernel version 4.16
	Kernel4_16 = kernel.VersionCode(4, 16, 0)
	// Kernel4_18 is the KernelVersion representation of kernel version 4.18
	Kernel4_18 = kernel.VersionCode(4, 18, 0)
	// Kernel4_19 is the KernelVersion representation of kernel version 4.19
	Kernel4_19 = kernel.VersionCode(4, 19, 0)
	// Kernel4_20 is the KernelVersion representation of kernel version 4.20
	Kernel4_20 = kernel.VersionCode(4, 20, 0)
	// Kernel5_0 is the KernelVersion representation of kernel version 5.0
	Kernel5_0 = kernel.VersionCode(5, 0, 0)
	// Kernel5_1 is the KernelVersion representation of kernel version 5.1
	Kernel5_1 = kernel.VersionCode(5, 1, 0)
	// Kernel5_2 is the KernelVersion representation of kernel version 5.2
	Kernel5_2 = kernel.VersionCode(5, 2, 0)
	// Kernel5_3 is the KernelVersion representation of kernel version 5.3
	Kernel5_3 = kernel.VersionCode(5, 3, 0)
	// Kernel5_4 is the KernelVersion representation of kernel version 5.4
	Kernel5_4 = kernel.VersionCode(5, 4, 0)
	// Kernel5_5 is the KernelVersion representation of kernel version 5.5
	Kernel5_5 = kernel.VersionCode(5, 5, 0)
	// Kernel5_6 is the KernelVersion representation of kernel version 5.6
	Kernel5_6 = kernel.VersionCode(5, 6, 0)
	// Kernel5_7 is the KernelVersion representation of kernel version 5.7
	Kernel5_7 = kernel.VersionCode(5, 7, 0)
	// Kernel5_8 is the KernelVersion representation of kernel version 5.8
	Kernel5_8 = kernel.VersionCode(5, 8, 0)
	// Kernel5_9 is the KernelVersion representation of kernel version 5.9
	Kernel5_9 = kernel.VersionCode(5, 9, 0)
	// Kernel5_10 is the KernelVersion representation of kernel version 5.10
	Kernel5_10 = kernel.VersionCode(5, 10, 0)
	// Kernel5_11 is the KernelVersion representation of kernel version 5.11
	Kernel5_11 = kernel.VersionCode(5, 11, 0)
	// Kernel5_12 is the KernelVersion representation of kernel version 5.12
	Kernel5_12 = kernel.VersionCode(5, 12, 0)
	// Kernel5_13 is the KernelVersion representation of kernel version 5.13
	Kernel5_13 = kernel.VersionCode(5, 13, 0)
	// Kernel5_14 is the KernelVersion representation of kernel version 5.14
	Kernel5_14 = kernel.VersionCode(5, 14, 0)
	// Kernel5_15 is the KernelVersion representation of kernel version 5.15
	Kernel5_15 = kernel.VersionCode(5, 15, 0)
	// Kernel5_16 is the KernelVersion representation of kernel version 5.16
	Kernel5_16 = kernel.VersionCode(5, 16, 0)
	// Kernel5_17 is the KernelVersion representation of kernel version 5.17
	Kernel5_17 = kernel.VersionCode(5, 17, 0)
	// Kernel5_18 is the KernelVersion representation of kernel version 5.18
	Kernel5_18 = kernel.VersionCode(5, 18, 0)
	// Kernel5_19 is the KernelVersion representation of kernel version 5.19
	Kernel5_19 = kernel.VersionCode(5, 19, 0)
	// Kernel6_0 is the KernelVersion representation of kernel version 6.0
	Kernel6_0 = kernel.VersionCode(6, 0, 0)
	// Kernel6_1 is the KernelVersion representation of kernel version 6.1
	Kernel6_1 = kernel.VersionCode(6, 1, 0)
	// Kernel6_2 is the KernelVersion representation of kernel version 6.2
	Kernel6_2 = kernel.VersionCode(6, 2, 0)
	// Kernel6_3 is the KernelVersion representation of kernel version 6.3
	Kernel6_3 = kernel.VersionCode(6, 3, 0)
	// Kernel6_5 is the KernelVersion representation of kernel version 6.5
	Kernel6_5 = kernel.VersionCode(6, 5, 0)
	// Kernel6_6 is the KernelVersion representation of kernel version 6.6
	Kernel6_6 = kernel.VersionCode(6, 6, 0)
	// Kernel6_7 is the KernelVersion representation of kernel version 6.7
	Kernel6_7 = kernel.VersionCode(6, 7, 0)
	// Kernel6_10 is the KernelVersion representation of kernel version 6.10
	Kernel6_10 = kernel.VersionCode(6, 10, 0)
	// Kernel6_11 is the KernelVersion representation of kernel version 6.11
	Kernel6_11 = kernel.VersionCode(6, 11, 0)
)

Functions

This section is empty.

Types

type Version

type Version struct {
	OsRelease     map[string]string
	OsReleasePath string
	Code          kernel.Version
	UnameRelease  string
}

Version defines a kernel version helper

func NewKernelVersion

func NewKernelVersion() (*Version, error)

NewKernelVersion returns a new kernel version helper

func (*Version) HaveFentryNoDuplicatedWeakSymbols

func (k *Version) HaveFentryNoDuplicatedWeakSymbols() bool

HaveFentryNoDuplicatedWeakSymbols returns whether the kernel supports fentry probes with struct arguments

func (*Version) HaveFentrySupport

func (k *Version) HaveFentrySupport() bool

HaveFentrySupport returns whether the kernel supports fentry probes

func (*Version) HaveFentrySupportWithStructArgs

func (k *Version) HaveFentrySupportWithStructArgs() bool

HaveFentrySupportWithStructArgs returns whether the kernel supports fentry probes with struct arguments

func (*Version) HaveLegacyPipeInodeInfoStruct

func (k *Version) HaveLegacyPipeInodeInfoStruct() bool

HaveLegacyPipeInodeInfoStruct returns whether the kernel uses the legacy pipe_inode_info struct

func (*Version) HaveMmapableMaps

func (k *Version) HaveMmapableMaps() bool

HaveMmapableMaps returns whether the kernel supports mmapable maps.

func (*Version) HavePIDLinkStruct

func (k *Version) HavePIDLinkStruct() bool

HavePIDLinkStruct returns whether the kernel uses the pid_link struct, which was removed in 4.19

func (*Version) HaveRingBuffers

func (k *Version) HaveRingBuffers() bool

HaveRingBuffers returns whether the kernel supports ring buffer.

func (*Version) IsAmazonLinux2022Kernel

func (k *Version) IsAmazonLinux2022Kernel() bool

IsAmazonLinux2022Kernel returns whether the kernel is an amazon linux 2022 kernel

func (*Version) IsAmazonLinux2023Kernel

func (k *Version) IsAmazonLinux2023Kernel() bool

IsAmazonLinux2023Kernel returns whether the kernel is an amazon linux 2023 kernel

func (*Version) IsAmazonLinuxKernel

func (k *Version) IsAmazonLinuxKernel() bool

IsAmazonLinuxKernel returns whether the kernel is an amazon linux kernel

func (*Version) IsCOSKernel

func (k *Version) IsCOSKernel() bool

IsCOSKernel returns whether the kernel is a suse kernel

func (*Version) IsDebianKernel

func (k *Version) IsDebianKernel() bool

IsDebianKernel returns whether the kernel is a debian kernel

func (*Version) IsInRangeCloseOpen

func (k *Version) IsInRangeCloseOpen(begin kernel.Version, end kernel.Version) bool

IsInRangeCloseOpen returns whether the kernel version is between the begin version (included) and the end version (excluded)

func (*Version) IsOpenSUSELeap15_3Kernel

func (k *Version) IsOpenSUSELeap15_3Kernel() bool

IsOpenSUSELeap15_3Kernel returns whether the kernel is an opensuse 15.3 kernel

func (*Version) IsOpenSUSELeapKernel

func (k *Version) IsOpenSUSELeapKernel() bool

IsOpenSUSELeapKernel returns whether the kernel is an opensuse kernel

func (*Version) IsOracleUEKKernel

func (k *Version) IsOracleUEKKernel() bool

IsOracleUEKKernel returns whether the kernel is an oracle uek kernel

func (*Version) IsRH7Kernel

func (k *Version) IsRH7Kernel() bool

IsRH7Kernel returns whether the kernel is a rh7 kernel

func (*Version) IsRH8Kernel

func (k *Version) IsRH8Kernel() bool

IsRH8Kernel returns whether the kernel is a rh8 kernel

func (*Version) IsRH9Kernel

func (k *Version) IsRH9Kernel() bool

IsRH9Kernel returns whether the kernel is a rh9 kernel

func (*Version) IsRH9_3Kernel

func (k *Version) IsRH9_3Kernel() bool

IsRH9_3Kernel returns whether the kernel is a rh9.3 kernel

func (*Version) IsRH9_4Kernel

func (k *Version) IsRH9_4Kernel() bool

IsRH9_4Kernel returns whether the kernel is a rh9.3 kernel

func (*Version) IsSLESKernel

func (k *Version) IsSLESKernel() bool

IsSLESKernel returns whether the kernel is a sles kernel

func (*Version) IsSuse12Kernel

func (k *Version) IsSuse12Kernel() bool

IsSuse12Kernel returns whether the kernel is a sles 12 kernel

func (*Version) IsSuse15Kernel

func (k *Version) IsSuse15Kernel() bool

IsSuse15Kernel returns whether the kernel is a sles 15 kernel

func (*Version) IsSuseKernel

func (k *Version) IsSuseKernel() bool

IsSuseKernel returns whether the kernel is a suse kernel

func (*Version) IsUbuntuKernel

func (k *Version) IsUbuntuKernel() bool

IsUbuntuKernel returns whether the kernel is an ubuntu kernel

func (*Version) String

func (k *Version) String() string

func (*Version) SupportBPFSendSignal

func (k *Version) SupportBPFSendSignal() bool

SupportBPFSendSignal returns true if the eBPF function bpf_send_signal is available

func (*Version) SupportCORE

func (k *Version) SupportCORE() bool

SupportCORE returns is CORE is supported

func (*Version) UbuntuKernelVersion

func (k *Version) UbuntuKernelVersion() *kernel.UbuntuKernelVersion

UbuntuKernelVersion returns a parsed ubuntu kernel version or nil if not on ubuntu or if parsing failed

Jump to

Keyboard shortcuts

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