modules

package
v0.0.0-...-4aaa17f Latest Latest
Warning

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

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

Documentation

Overview

Package modules provides fucntionality to install and sign Linux kernel modules.

Package modules provides fucntionality to install and sign Linux kernel modules.

Index

Constants

View Source
const (
	// PKEYIDPKCS7 is a constant defined in https://github.com/torvalds/linux/blob/master/scripts/sign-file.c
	PKEYIDPKCS7 = byte(2)

	SecondaryKeyring = "%keyring:.secondary_trusted_keys"
	IMAKeyring       = "%keyring:.ima"
)

Variables

This section is empty.

Functions

func AppendSignature

func AppendSignature(outfilePath, modulefilePath, sigfilePath string) error

AppendSignature appends a raw PKCS#7 signature to the end of a given kernel module. This is basically the Go implementation of `scripts/sign-file -s` in Linux upstream.

func LoadModule

func LoadModule(moduleName, modulePath string, moduleParams ModuleParameters) error

LoadModule loads a given kernel module to kernel.

func LoadPublicKey

func LoadPublicKey(keyName, keyPath, keyring string) error

LoadPublicKey loads the given public key to system keyring.

func UpdateHostLdCache

func UpdateHostLdCache(hostRootDir, moduleLibDir string) error

UpdateHostLdCache updates the ld cache on host.

Types

type ModuleParameters

type ModuleParameters map[string][]string

func NewModuleParameters

func NewModuleParameters() ModuleParameters

func (*ModuleParameters) Set

func (i *ModuleParameters) Set(value string) error

func (*ModuleParameters) String

func (i *ModuleParameters) String() string

Jump to

Keyboard shortcuts

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