package abi

import "gvisor.dev/gvisor/pkg/abi"

Package abi describes the interface between a kernel and userspace.

Index

Constants

const Host = Linux

Host specifies the host ABI.

Types

type ABI

type ABI interface {
}

ABI is an interface that defines OS-specific interactions.

type FlagSet

type FlagSet []struct {
	Flag uint64
	Name string
}

A FlagSet is a slice of bit-flags and their name.

func (FlagSet) Parse

func (s FlagSet) Parse(val uint64) string

Parse returns a pretty version of val, using the flag names for known flags. Unknown flags remain numeric.

type OS

type OS int

OS describes the target operating system for an ABI.

Note that OS is architecture-independent. The details of the OS ABI will vary between architectures.

const (
	// Linux is the Linux ABI.
	Linux OS = iota
)

func (OS) String

func (o OS) String() string

String implements fmt.Stringer.

type ValueSet

type ValueSet map[uint64]string

ValueSet is a map of syscall values to their name. Parse will use the name or the value if unknown.

func (ValueSet) Parse

func (s ValueSet) Parse(val uint64) string

Parse returns the name of the value associated with `val`. Unknown values are converted to hex.

func (ValueSet) ParseDecimal

func (s ValueSet) ParseDecimal(val uint64) string

ParseDecimal returns the name of the value associated with `val`. Unknown values are converted to decimal.

func (ValueSet) ParseName

func (s ValueSet) ParseName(name string) (uint64, bool)

ParseName returns the flag value associated with 'name'. Returns false if no value is found.

Source Files

abi.go abi_linux.go flag.go

Directories

PathSynopsis
pkg/abi/attestationPackage attestation includes definitions needed for gVisor attestation.
pkg/abi/gasketPackage gasket describes the userspace interface for Gasket devices.
pkg/abi/linuxPackage linux contains the constants and types needed to interface with a Linux kernel.
pkg/abi/linux/errnoPackage errno holds errno codes for abi/linux.
pkg/abi/nvgpuPackage nvgpu tracks the ABI of the Nvidia GPU Linux kernel driver: https://github.com/NVIDIA/open-gpu-kernel-modules
pkg/abi/sentryPackage sentry contains ABI-related constants for the gVisor sentry.
pkg/abi/tpuPackage tpu defines constants used to interact with TPUs.
Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
4 hours ago

Tools for package owners.