gvisor – gvisor.dev/gvisor Directories

gvisor/ directory

Directories

PathSynopsis
images
images/benchmarks
images/benchmarks/profile-helperBinary profilehelper helps exfiltrate benchmark profiles.
images/gpu
images/gpu/cuda-testsrun_sample runs a CUDA sample test.
images/gpu/cuda-tests-12-8run_sample runs a CUDA sample test.
images/gpu/ollama
images/gpu/ollama/clientA simple `curl`-like HTTP client that prints metrics after the request.
pkg
pkg/abiPackage abi describes the interface between a kernel and userspace.
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.
pkg/aioPackage aio provides asynchronous I/O on host file descriptors.
pkg/atomicbitopsPackage atomicbitops provides extensions to the sync/atomic package.
pkg/binaryPackage binary translates between select fixed-sized types and a binary representation.
pkg/bitmapPackage bitmap provides the implementation of bitmap.
pkg/bitsPackage bits includes all bit related types and operations.
pkg/bpfPackage bpf provides tools for working with Berkeley Packet Filter (BPF) programs.
pkg/bufferPackage buffer provides the implementation of a non-contiguous buffer that is reference counted, pooled, and copy-on-write.
pkg/cleanupPackage cleanup provides utilities to clean "stuff" on defers.
pkg/compressioPackage compressio provides parallel compression and decompression, as well as optional SHA-256 hashing.
pkg/contextPackage context defines an internal context type.
pkg/control
pkg/control/clientPackage client provides a basic control client interface.
pkg/control/serverPackage server provides a basic control server interface.
pkg/coretagPackage coretag implements core tagging.
pkg/coveragePackage coverage provides an interface through which Go coverage data can be collected, converted to kcov format, and exposed to userspace.
pkg/cpuidPackage cpuid provides basic functionality for creating and adjusting CPU feature sets.
pkg/cryptoPackage crypto wraps crypto primitives.
pkg/devutilPackage devutil provides device specific utilities.
pkg/erofsPackage erofs provides the ability to access the contents in an EROFS [1] image.
pkg/errorsPackage errors holds the standardized error definition for gVisor.
pkg/errors/linuxerrPackage linuxerr contains syscall error codes exported as an error interface pointers.
pkg/eventchannelPackage eventchannel contains functionality for sending any protobuf message on a socketpair.
pkg/eventfdPackage eventfd wraps Linux's eventfd(2) syscall.
pkg/fdPackage fd provides types for working with file descriptors.
pkg/fdchannelPackage fdchannel implements passing file descriptors between processes over Unix domain sockets.
pkg/fdnotifierPackage fdnotifier contains an adapter that translates IO events (e.g., a file became readable/writable) from native FDs to the notifications in the waiter package.
pkg/flipcallPackage flipcall implements a protocol providing Fast Local Interprocess Procedure Calls between mutually-distrusting processes.
pkg/fspathPackage fspath provides efficient tools for working with file paths in Linux-compatible filesystem implementations.
pkg/fsutilPackage fsutil contains filesystem utilities that can be shared between the sentry and other sandbox components.
pkg/gohacksPackage gohacks contains utilities for subverting the Go compiler.
pkg/goidPackage goid provides the Get function.
pkg/gomaxprocsPackage gomaxprocs synchronizes adjustments to GOMAXPROCS.
pkg/gvisordetectPackage gvisordetect implements a library that callers may use to detect whether they are running on a gVisor kernel, assuming it is configured to expose the gVisor marker file.
pkg/hostarchPackage hostarch contains host arch address operations for user memory.
pkg/hostosPackage hostos contains utility functions for getting information about the host OS.
pkg/hostsyscallPackage hostsyscall provides functions like unix.RawSyscall, but without the overhead of multiple stack frame allocations.
pkg/hosttidPackage hosttid provides the Current function.
pkg/ilistPackage ilist provides the implementation of intrusive linked lists.
pkg/linewriterPackage linewriter provides an io.Writer which calls an emitter on each line.
pkg/lisafsPackage lisafs (LInux SAndbox FileSystem) defines the protocol for filesystem RPCs between an untrusted Sandbox (client) and a trusted filesystem server.
pkg/lisafs/testsuitePackage testsuite provides a integration testing suite for lisafs.
pkg/logPackage log implements a library for logging.
pkg/marshalPackage marshal defines the Marshallable interface for serialize/deserializing go data structures to/from memory, according to the Linux ABI.
pkg/marshal/primitivePackage primitive defines marshal.Marshallable implementations for primitive types.
pkg/memutilPackage memutil provides utilities for working with shared memory files.
pkg/metricPackage metric provides primitives for collecting metrics.
pkg/metric/buckettoolbuckettool prints buckets for distribution metrics.
pkg/p9Package p9 is a 9P2000.L implementation.
pkg/p9/p9testPackage p9test provides standard mocks for p9.
pkg/poolPackage pool provides a trivial integer pool.
pkg/prometheusPackage prometheus contains Prometheus-compliant metric data structures and utilities in pure Go.
pkg/randPackage rand implements a cryptographically secure pseudorandom number generator.
pkg/rawfilePackage rawfile contains utilities for using raw host files on Linux hosts.
pkg/refsPackage refs defines an interface for reference counted objects.
pkg/ring0Package ring0 provides basic operating system-level stubs.
pkg/ring0/pagetablesPackage pagetables provides a generic implementation of pagetables.
pkg/ringdequePackage ringdeque provides the Deque type.
pkg/safecopyPackage safecopy provides an efficient implementation of functions to access memory that may result in SIGSEGV or SIGBUS being sent to the accessor.
pkg/safememPackage safemem provides the Block and BlockSeq types.
pkg/seccompPackage seccomp provides generation of basic seccomp filters.
pkg/seccomp/precompiledseccompprecompile_gen generates a Go library that contains precompiled seccomp programs.
pkg/seccomp/precompiledseccomp/examplePackage example defines two seccomp programs ("example_program1" and "example_program2") to be embedded in the `usage` package in this directory.
pkg/seccomp/precompiledseccomp/example/usagePackage usage shows how to use precompiled seccomp-bpf programs.
pkg/seccomp/victimTest binary used to test that seccomp filters are properly constructed and indeed kill the process on violation.
pkg/secioPackage secio provides support for sectioned I/O.
pkg/segmentPackage segment provides tools for working with collections of segments.
pkg/segment/testPackage segment is a test package.
pkg/sentry
pkg/sentry/archPackage arch provides abstractions around architecture-dependent details, such as syscall calling conventions, native types, etc.
pkg/sentry/arch/fpuPackage fpu provides basic floating point helpers.
pkg/sentry/contexttestPackage contexttest builds a test context.Context.
pkg/sentry/controlPackage control contains types that expose control server methods, and can be used to configure and interact with a running sandbox process.
pkg/sentry/devices
pkg/sentry/devices/memdevPackage memdev implements "mem" character devices, as implemented in Linux by drivers/char/mem.c and drivers/char/random.c.
pkg/sentry/devices/nvproxyPackage nvproxy implements proxying for the Nvidia GPU Linux kernel driver: https://github.com/NVIDIA/open-gpu-kernel-modules.
pkg/sentry/devices/nvproxy/nvconfPackage nvconf provides configuration structures and utilities for nvproxy.
pkg/sentry/devices/tpuproxyPackage tpuproxy contains tpu backend driver proxy implementations and helper functions.
pkg/sentry/devices/tpuproxy/accelPackage accel implements a proxy for gasket based accel devices.
pkg/sentry/devices/tpuproxy/utilPackage util contains helper functions for tpuproxy implementations.
pkg/sentry/devices/tpuproxy/vfioPackage vfio implements a proxy for VFIO devices.
pkg/sentry/devices/ttydevPackage ttydev implements a vfs.Device for /dev/tty.
pkg/sentry/devices/tundevPackage tundev implements the /dev/net/tun device.
pkg/sentry/fdcollectorPackage fdcollector provides a goroutine that reads from a vfs.FileDescription (which may block) into a bytes.Buffer.
pkg/sentry/fdimportPackage fdimport provides the Import function.
pkg/sentry/fsimpl
pkg/sentry/fsimpl/cgroupfsPackage cgroupfs implements cgroupfs.
pkg/sentry/fsimpl/devPackage dev provides a filesystem implementation for /dev.
pkg/sentry/fsimpl/devptsPackage devpts provides a filesystem implementation that behaves like devpts.
pkg/sentry/fsimpl/devtmpfsPackage devtmpfs provides a singleton fsimpl/dev filesystem instance, analogous to Linux's devtmpfs.
pkg/sentry/fsimpl/erofsPackage erofs implements erofs.
pkg/sentry/fsimpl/eventfdPackage eventfd implements event fds.
pkg/sentry/fsimpl/fusePackage fuse implements fusefs.
pkg/sentry/fsimpl/goferPackage gofer provides a filesystem implementation that is backed by a 9p server, interchangeably referred to as "gofers" throughout this package.
pkg/sentry/fsimpl/hostPackage host provides a filesystem implementation for host files imported as file descriptors.
pkg/sentry/fsimpl/iouringfsPackage iouringfs provides a filesystem implementation for IO_URING basing it on anonfs.
pkg/sentry/fsimpl/kernfsPackage kernfs provides the tools to implement inode-based filesystems.
pkg/sentry/fsimpl/lockPackage lock is the API for POSIX-style advisory regional file locks and BSD-style full file locks.
pkg/sentry/fsimpl/mqfsPackage mqfs provides a filesystem implementation to back POSIX message queues.
pkg/sentry/fsimpl/nsfsPackage nsfs provides the filesystem implementation backing Kernel.NsfsMount.
pkg/sentry/fsimpl/overlayPackage overlay provides an overlay filesystem implementation, which synthesizes a filesystem by composing one or more immutable filesystems ("lower layers") with an optional mutable filesystem ("upper layer").
pkg/sentry/fsimpl/pipefsPackage pipefs provides the filesystem implementation backing Kernel.PipeMount.
pkg/sentry/fsimpl/procPackage proc implements a partial in-memory file system for procfs.
pkg/sentry/fsimpl/signalfdPackage signalfd provides basic signalfd file implementations.
pkg/sentry/fsimpl/sockfsPackage sockfs provides a filesystem implementation for anonymous sockets.
pkg/sentry/fsimpl/sysPackage sys implements sysfs.
pkg/sentry/fsimpl/testutilPackage testutil provides common test utilities for kernfs-based filesystems.
pkg/sentry/fsimpl/timerfdPackage timerfd implements timer fds.
pkg/sentry/fsimpl/tmpfsPackage tmpfs provides an in-memory filesystem whose contents are application-mutable, consistent with Linux's tmpfs.
pkg/sentry/fsimpl/userPackage user contains methods for resolving filesystem paths based on the user and their environment.
pkg/sentry/fsmetricPackage fsmetric defines filesystem metrics.
pkg/sentry/fsutilPackage fsutil provides utilities for implementing vfs.FileDescriptionImpl and vfs.FilesystemImpl.
pkg/sentry/hostcpuPackage hostcpu provides utilities for working with CPU information provided by a host Linux kernel.
pkg/sentry/hostfdPackage hostfd provides efficient I/O with host file descriptors.
pkg/sentry/hostmmPackage hostmm provides tools for interacting with the host Linux kernel's virtual memory management subsystem.
pkg/sentry/inetPackage inet defines semantics for IP stacks.
pkg/sentry/kernelPackage kernel provides an emulation of the Linux kernel.
pkg/sentry/kernel/authPackage auth implements an access control model that is a subset of Linux's.
pkg/sentry/kernel/contexttestPackage contexttest provides a test context.Context which includes a dummy kernel pointing to a valid platform.
pkg/sentry/kernel/fasyncPackage fasync provides FIOASYNC related functionality.
pkg/sentry/kernel/futexPackage futex provides an implementation of the futex interface as found in the Linux kernel.
pkg/sentry/kernel/ipcPackage ipc defines functionality and utilities common to sysvipc mechanisms.
pkg/sentry/kernel/memeventPackage memevent implements the memory usage events controller, which periodically emits events via the eventchannel.
pkg/sentry/kernel/mqPackage mq provides an implementation for POSIX message queues.
pkg/sentry/kernel/msgqueuePackage msgqueue implements System V message queues.
pkg/sentry/kernel/pipePackage pipe provides a pipe implementation.
pkg/sentry/kernel/schedPackage sched implements scheduler related features.
pkg/sentry/kernel/semaphorePackage semaphore implements System V semaphores.
pkg/sentry/kernel/shmPackage shm implements sysv shared memory segments.
pkg/sentry/ktimePackage ktime provides an API for clocks and timers implemented by the sentry.
pkg/sentry/limitsPackage limits provides resource limits.
pkg/sentry/loaderPackage loader loads an executable file into a MemoryManager.
pkg/sentry/loader/vdsodataPackage vdsodata contains a compiled VDSO object.
pkg/sentry/memmapPackage memmap defines semantics for memory mappings.
pkg/sentry/mmPackage mm provides a memory management subsystem.
pkg/sentry/pgallocPackage pgalloc contains the page allocator subsystem, which provides allocatable memory that may be mapped into application address spaces.
pkg/sentry/platformPackage platform provides a Platform abstraction.
pkg/sentry/platform/interruptPackage interrupt provides an interrupt helper.
pkg/sentry/platform/kvmPackage kvm provides a kvm-based implementation of the platform interface.
pkg/sentry/platform/kvm/testutilPackage testutil provides common assembly stubs for testing.
pkg/sentry/platform/platformsPackage platforms imports all available platform packages.
pkg/sentry/platform/ptracePackage ptrace provides a ptrace-based implementation of the platform interface.
pkg/sentry/platform/systrapPackage systrap provides a seccomp-based implementation of the platform interface.
pkg/sentry/platform/systrap/sysmsgPackage sysmsg provides a stub signal handler and a communication protocol between stub threads and the Sentry.
pkg/sentry/platform/systrap/usertrapPackage usertrap implements the library to replace syscall instructions with function calls.
pkg/sentry/seccheckPackage seccheck defines a structure for dynamically-configured security checks in the sentry.
pkg/sentry/seccheck/sinks
pkg/sentry/seccheck/sinks/nullPackage null defines a seccheck.Sink that does nothing with the trace points, akin to /dev/null.
pkg/sentry/seccheck/sinks/remotePackage remote defines a seccheck.Sink that serializes points to a remote process.
pkg/sentry/seccheck/sinks/remote/serverPackage server provides a common server implementation that can connect with remote.Remote.
pkg/sentry/seccheck/sinks/remote/testPackage test provides functionality used to test the remote sink.
pkg/sentry/seccheck/sinks/remote/wirePackage wire defines structs used in the wire format for the remote checker.
pkg/sentry/socketPackage socket provides the interfaces that need to be provided by socket implementations and providers, as well as per family demultiplexing of socket creation.
pkg/sentry/socket/controlPackage control provides internal representations of socket control messages.
pkg/sentry/socket/hostinetPackage hostinet implements AF_INET and AF_INET6 sockets using the host's network stack.
pkg/sentry/socket/netfilterPackage netfilter helps the sentry interact with netstack's netfilter capabilities.
pkg/sentry/socket/netlinkPackage netlink provides core functionality for netlink sockets.
pkg/sentry/socket/netlink/nlmsgPackage nlmsg provides helpers to parse and construct netlink messages.
pkg/sentry/socket/netlink/portPackage port provides port ID allocation for netlink sockets.
pkg/sentry/socket/netlink/routePackage route provides a NETLINK_ROUTE socket protocol.
pkg/sentry/socket/netlink/ueventPackage uevent provides a NETLINK_KOBJECT_UEVENT socket protocol.
pkg/sentry/socket/netstackPackage netstack provides an implementation of the socket.Socket interface that is backed by a tcpip.Endpoint.
pkg/sentry/socket/netstack/packetmmapPackage packetmmap contains the packet mmap implementation for netstack.
pkg/sentry/socket/pluginPackage plugin provides a set of interfaces to interact with third-party netstack.
pkg/sentry/socket/plugin/cgoPackage cgo provides interfaces definition to interact with third-party network stack.
pkg/sentry/socket/plugin/stackPackage stack provides an implementation of plugin.PluginStack interface and an implementation of socket.Socket interface.
pkg/sentry/socket/unixPackage unix provides an implementation of the socket.Socket interface for the AF_UNIX protocol family.
pkg/sentry/socket/unix/transportPackage transport contains the implementation of Unix endpoints.
pkg/sentry/statePackage state provides high-level state wrappers.
pkg/sentry/stracePackage strace implements the logic to print out the input and the return value of each traced syscall.
pkg/sentry/syscallsPackage syscalls is the interface from the application to the kernel.
pkg/sentry/syscalls/linuxPackage linux provides syscall tables for amd64 and arm64 Linux.
pkg/sentry/timePackage time provides a calibrated clock synchronized to a system reference clock.
pkg/sentry/unimplPackage unimpl contains interface to emit events about unimplemented features.
pkg/sentry/uniqueidPackage uniqueid defines context.Context keys for obtaining system-wide unique identifiers.
pkg/sentry/usagePackage usage provides representations of resource usage.
pkg/sentry/vfsPackage vfs implements a virtual filesystem layer.
pkg/sentry/vfs/genericfstreePackage genericfstree provides tools for implementing vfs.FilesystemImpls that follow a standard pattern for synchronizing Dentry parent and name.
pkg/sentry/vfs/memxattrPackage memxattr provides a default, in-memory extended attribute implementation.
pkg/sentry/watchdogPackage watchdog is responsible for monitoring the sentry for tasks that may potentially be stuck or looping inderterminally causing hard to debug hangs in the untrusted app.
pkg/shim
pkg/shim/v1Package v1 implements Containerd Shim v2 interface.
pkg/shim/v1/extensionPackage extension provides an extension to the shim.
pkg/shim/v1/procPackage proc is responsible to manage the communication between the shim and the sandbox process running the container.
pkg/shim/v1/runscPackage runsc implements Containerd Shim v2 interface.
pkg/shim/v1/runsccmdPackage runsccmd provides an API to interact with runsc command line.
pkg/shim/v1/runtimeoptionsPackage runtimeoptions contains the runtimeoptions proto for containerd 1.5 and above.
pkg/shim/v1/runtimeoptions/v14Package v14 contains the runtimeoptions proto for containerd 1.4 and earlier.
pkg/shim/v1/utilsPackage utils container miscellaneous utility function used by the shim.
pkg/sigframePackage sigframe implements a mechanism to create a signal frame on the stack and execute a user-defined callback function within that context.
pkg/sighandlingPackage sighandling contains helpers for handling signals to applications.
pkg/sleepPackage sleep allows goroutines to efficiently sleep on multiple sources of notifications (wakers).
pkg/statePackage state provides functionality related to saving and loading object graphs.
pkg/state/prettyPackage pretty is a pretty-printer for state streams.
pkg/state/statefilePackage statefile defines the state file data stream.
pkg/state/testsPackage tests tests the state packages.
pkg/state/wirePackage wire contains a few basic types that can be composed to serialize graph information for the state package.
pkg/syncPackage sync provides synchronization primitives.
pkg/sync/atomicptrPackage seqatomic doesn't exist.
pkg/sync/atomicptrmapPackage atomicptrmap instantiates generic_atomicptrmap for testing.
pkg/synceventPackage syncevent provides efficient primitives for goroutine synchronization based on event bitmasks.
pkg/sync/lockingPackage locking implements lock primitives with the correctness validator.
pkg/sync/seqatomicPackage seqatomic doesn't exist.
pkg/syserrPackage syserr contains sandbox-internal errors.
pkg/tcpipPackage tcpip provides the interfaces and related types that users of the tcpip stack will use in order to create endpoints used to send and receive data over the network stack.
pkg/tcpip/adapters
pkg/tcpip/adapters/gonetPackage gonet provides a Go net package compatible wrapper for a tcpip stack.
pkg/tcpip/checkerPackage checker provides helper functions to check networking packets for validity.
pkg/tcpip/checksumPackage checksum provides the implementation of the encoding and decoding of network protocol headers.
pkg/tcpip/faketimePackage faketime provides a fake clock that implements tcpip.Clock interface.
pkg/tcpip/hash
pkg/tcpip/hash/jenkinsPackage jenkins implements Jenkins's one_at_a_time, non-cryptographic hash functions created by by Bob Jenkins.
pkg/tcpip/headerPackage header provides the implementation of the encoding and decoding of network protocol headers.
pkg/tcpip/header/parsePackage parse provides utilities to parse packets.
pkg/tcpip/internal
pkg/tcpip/link
pkg/tcpip/link/channelPackage channel provides the implementation of channel-based data-link layer endpoints.
pkg/tcpip/link/ethernetPackage ethernet provides an implementation of an ethernet link endpoint that wraps an inner link endpoint.
pkg/tcpip/link/fdbasedPackage fdbased provides the implementation of data-link layer endpoints backed by boundary-preserving file descriptors (e.g., TUN devices, seqpacket/datagram sockets).
pkg/tcpip/link/loopbackPackage loopback provides the implementation of loopback data-link layer endpoints.
pkg/tcpip/link/muxedPackage muxed provides a muxed link endpoints.
pkg/tcpip/link/nestedPackage nested provides helpers to implement the pattern of nested stack.LinkEndpoints.
pkg/tcpip/link/packetsocketPackage packetsocket provides a link endpoint that enables delivery of incoming and outgoing packets to any interested packet sockets.
pkg/tcpip/link/pipePackage pipe provides the implementation of pipe-like data-link layer endpoints.
pkg/tcpip/link/qdisc
pkg/tcpip/link/qdisc/fifoPackage fifo provides the implementation of FIFO queuing discipline that queues all outbound packets and asynchronously dispatches them to the lower link endpoint in the order that they were queued.
pkg/tcpip/link/sharedmemPackage sharedmem provides the implementation of data-link layer endpoints backed by shared memory.
pkg/tcpip/link/sharedmem/pipePackage pipe implements a shared memory ring buffer on which a single reader and a single writer can operate (read/write) concurrently.
pkg/tcpip/link/sharedmem/queuePackage queue provides the implementation of transmit and receive queues based on shared memory ring buffers.
pkg/tcpip/link/snifferPackage sniffer provides the implementation of data-link layer endpoints that wrap another endpoint and logs inbound and outbound packets.
pkg/tcpip/link/stopfdPackage stopfd provides an type that can be used to signal the stop of a dispatcher.
pkg/tcpip/link/tunPackage tun contains methods to open TAP and TUN devices.
pkg/tcpip/link/vethPackage veth provides the implementation of virtual ethernet device pair.
pkg/tcpip/link/waitablePackage waitable provides the implementation of data-link layer endpoints that wrap other endpoints, and can wait for inflight calls to WritePacket or DeliverNetworkPacket to finish (and new ones to be prevented).
pkg/tcpip/link/xdpPackage xdp provides link layer endpoints backed by AF_XDP sockets.
pkg/tcpip/network
pkg/tcpip/network/arpPackage arp implements the ARP network protocol.
pkg/tcpip/network/hashPackage hash contains utility functions for hashing.
pkg/tcpip/network/internal
pkg/tcpip/network/ipv4Package ipv4 contains the implementation of the ipv4 network protocol.
pkg/tcpip/network/ipv6Package ipv6 contains the implementation of the ipv6 network protocol.
pkg/tcpip/nftablesPackage nftables provides the interface to process packets through a netfilter (nf) ruleset and maintain/modify the ruleset accordingly.
pkg/tcpip/portsPackage ports provides PortManager that manages allocating, reserving and releasing ports.
pkg/tcpip/prependablePackage prependable defines a buffer that grows backwards.
pkg/tcpip/sample
pkg/tcpip/sample/tun_tcp_connectThis sample creates a stack with TCP and IPv4 protocols on top of a TUN device, and connects to a peer.
pkg/tcpip/sample/tun_tcp_echoThis sample creates a stack with TCP and IPv4 protocols on top of a TUN device, and listens on a port.
pkg/tcpip/seqnumPackage seqnum defines the types and methods for TCP sequence numbers such that they fit in 32-bit words and work properly when overflows occur.
pkg/tcpip/stackPackage stack provides the glue between networking protocols and the consumers of the networking stack.
pkg/tcpip/stack/groPackage gro implements generic receive offload.
pkg/tcpip/tests
pkg/tcpip/tests/integration
pkg/tcpip/tests/utilsPackage utils holds common testing utilities for tcpip.
pkg/tcpip/testutilPackage testutil provides helper functions for netstack unit tests.
pkg/tcpip/transportPackage transport supports transport protocols.
pkg/tcpip/transport/icmpPackage icmp contains the implementation of the ICMP and IPv6-ICMP transport protocols for use in ping.
pkg/tcpip/transport/internal
pkg/tcpip/transport/packetPackage packet provides the implementation of packet sockets (see packet(7)).
pkg/tcpip/transport/rawPackage raw provides the implementation of raw sockets (see raw(7)).
pkg/tcpip/transport/tcpPackage tcp contains the implementation of the TCP transport protocol.
pkg/tcpip/transport/tcpconntrackPackage tcpconntrack implements a TCP connection tracking object.
pkg/tcpip/transport/tcp/test
pkg/tcpip/transport/tcp/test/e2ePackage e2e contains definitions common to all e2e tcp tests.
pkg/tcpip/transport/tcp/testing
pkg/tcpip/transport/tcp/testing/contextPackage context provides a test context for use in tcp tests.
pkg/tcpip/transport/testing
pkg/tcpip/transport/testing/contextPackage context provides a context used by datagram-based network endpoints tests.
pkg/tcpip/transport/udpPackage udp contains the implementation of the UDP transport protocol.
pkg/test
pkg/test/criutilPackage criutil contains utility functions for interacting with the Container Runtime Interface (CRI), principally via the crictl command line tool.
pkg/test/dockerutilPackage dockerutil is a collection of utility functions.
pkg/test/testutilPackage testutil contains utility functions for runsc tests.
pkg/timingPackage timing provides a way to record the timing of a series of operations across one or more goroutines.
pkg/triePackage trie provides a character-based prefix trie data structure for storing arbitrary payloads in an efficiently retrievable manner.
pkg/unetPackage unet provides a minimal net package based on Unix Domain Sockets.
pkg/urpcPackage urpc provides a minimal RPC package based on unet.
pkg/usermemPackage usermem governs access to user memory.
pkg/waiterPackage waiter provides the implementation of a wait queue, where waiters can be enqueued to be notified when an event of interest happens.
pkg/xdpPackage xdp provides tools for working with AF_XDP sockets.
runscBinary runsc implements the OCI runtime interface.
runsc/bootPackage boot loads the kernel and runs a container.
runsc/boot/filterPackage filter installs seccomp filters to prevent prohibited syscalls in case it's compromised.
runsc/boot/filter/configPackage config defines all syscalls the sandbox is allowed to make to the host.
runsc/boot/filter/dumpfilterdumpfilter dumps the seccomp-bpf program used by the Sentry.
runsc/boot/portforwardPackage portforward holds the infrastructure to support the port forward command.
runsc/boot/pprofPackage pprof provides a stub to initialize custom profilers.
runsc/boot/procfsPackage procfs holds utilities for getting procfs information for sandboxed processes.
runsc/cgroupPackage cgroup provides an interface to read and write configuration to cgroup.
runsc/cliPackage cli is the main entrypoint for runsc.
runsc/cmdPackage cmd holds implementations of the runsc commands.
runsc/cmd/metricserverThe metricserver binary is a separate binary that implements the 'runsc metric-server' subcommand.
runsc/cmd/metricserver/metricservercmdPackage metricservercmd partially implements the 'metric-server' subcommand.
runsc/cmd/nvproxyPackage nvproxy provides subcommands for the nvproxy command.
runsc/cmd/tracePackage trace provides subcommands for the trace command.
runsc/cmd/utilPackage util groups a bunch of common helper functions used by commands.
runsc/configPackage config provides basic infrastructure to set configuration settings for runsc.
runsc/consolePackage console contains utilities for working with pty consols in runsc.
runsc/containerPackage container creates and manipulates containers.
runsc/donationPackage donation tracks files that are being donated to a child process and using flags to notified the child process where the FDs are.
runsc/flagPackage flag wraps flag primitives.
runsc/fsgoferPackage fsgofer provides a lisafs server implementation which gives access to local files.
runsc/fsgofer/filterPackage filter defines all syscalls the gofer is allowed to make, and installs seccomp filters to prevent prohibited syscalls in case it's compromised.
runsc/hostsettingsPackage hostsettings provides suggestions or adjustments for host kernel settings to improve runsc performance, stability, or security.
runsc/metricserverPackage metricserver implements a Prometheus metric server for runsc data.
runsc/metricserver/containermetricsPackage containermetrics returns metrics and labels interesting to export about a container or sandbox.
runsc/mitigatePackage mitigate provides libraries for the mitigate command.
runsc/profilePackage profile contains profiling utils.
runsc/sandboxPackage sandbox creates and manipulates sandboxes.
runsc/sandbox/bpfPackage bpf provides compiled bpf programs as byte slices.
runsc/specutilsPackage specutils contains utility functions for working with OCI runtime specs.
runsc/specutils/safemount_testsafemount_runner is used to test the SafeMount function.
runsc/specutils/seccompPackage seccomp implements some features of libseccomp in order to support OCI.
runsc/starttimePackage starttime holds the time the `runsc` command started.
runsc/versionPackage version holds a string containing version information for runsc.
shimBinary containerd-shim-runsc-v1 is the v2 containerd shim (implementing the formal v1 API).
shim/v1
shim/v1/cliPackage cli defines the command line interface for the V2 shim.
shim/v2Binary containerd-shim-runsc-v2 is the v3 containerd shim (implementing the formal v2 API).
test
test/benchmarks
test/benchmarks/basePackage base holds utility methods common to the base tests.
test/benchmarks/databasePackage database holds benchmarks around database applications.
test/benchmarks/fs
test/benchmarks/fs/fsbenchPackage fsbench provides utility functions for filesystem benchmarks.
test/benchmarks/harnessPackage harness holds utility code for running benchmarks on Docker.
test/benchmarks/mediaPackage media holds benchmarks around media processing applications.
test/benchmarks/mlPackage ml holds benchmarks around machine learning performance.
test/benchmarks/networkPackage network holds benchmarks around raw network performance.
test/benchmarks/tcpBinary tcp_proxy is a simple TCP proxy.
test/benchmarks/toolsPackage tools holds tooling to couple command formatting and output parsers together.
test/cmd
test/cmd/test_appBinary test_app is like a swiss knife for tests that need to run anything inside the sandbox.
test/e2ePackage integration is empty.
test/fsstressPackage fsstress is empty.
test/gpu
test/gpu/cudaPackage cuda holds libraries for testing CUDA workloads.
test/gpu/ollamaPackage ollama provides an Ollama API client.
test/gpu/stablediffusionPackage stablediffusion provides utilities to generate images with Stable Diffusion.
test/gpu/vllm
test/imagePackage image is empty.
test/iptablesPackage iptables contains a set of iptables tests implemented as TestCases
test/iptables/runnerPackage main runs iptables tests from within a docker container.
test/kubernetesPackage kubernetes contains utilities for gVisor tests.
test/kubernetes/benchmarksPackage gsutil is used to benchmark the speed of large (10GB) downloads.
test/kubernetes/benchmarks/httpbenchPackage httpbench provides a library for benchmarking an HTTP server.
test/kubernetes/benchmarks/profilingPackage profiling helps with getting profiles from running benchmarks.
test/kubernetes/benchmetricPackage benchmetric provides utilities for benchmark metrics.
test/kubernetes/k8sctxPackage k8sctx is used to manage the lifecycle of a Kubernetes test or benchmark running in one or more Kubernetes clusters.
test/kubernetes/k8sctx/kubectlctxPackage kubectlctx provides a KubernetesContext that uses one or more kubectl configs to determine the cluster(s) to use for tests and benchmarks.
test/kubernetes/testclusterPackage testcluster wraps the Kubernetes library for common test operations.
test/kubernetes/testsPackage driver implements tests for driver version compatibility.
test/metricclientPackage metricclient provides utility functions to start, stop, and talk to a metric server.
test/metricsvizPackage metricsviz charts profiling metrics data and renders them to HTML.
test/metricsviz/metricsviz_climetricsviz_cli visualizes metrics from profiling metrics logs.
test/packetimpact
test/packetimpact/dutPackage dut provides common definitions and utilities to be shared by DUTs.
test/packetimpact/dut/linuxPackage linux provides utilities specific to bringing up linux DUTs.
test/packetimpact/dut/nativeThe native binary is used to bring up a native linux DUT.
test/packetimpact/dut/runscThe devid binary is used to get the device ID in the runsc container.
test/packetimpact/internal
test/packetimpact/netdevs
test/packetimpact/netdevs/netlinkPackage netlink has routines to get interfaces information through netlink.
test/packetimpact/runnerThe runner binary is used as the test runner for PacketImpact tests.
test/packetimpact/testbenchPackage testbench has utilities to send and receive packets, and also command the DUT to run POSIX functions.
test/packetimpact/tests
test/rootPackage root is used for tests that requires sysadmin privileges run.
test/rtnetlink
test/rtnetlink/linuxtcp_serv creates a TCP server socket, reads data from stdin, and sends that data to the socket.
test/runnerBinary syscall_test_runner runs the syscall test suites in gVisor containers and on the host platform.
test/runner/fuseBinary main starts a fuse server that forwards filesystem operations from /tmp to /fuse.
test/runner/gtestPackage gtest contains helpers for running google-test tests from Go.
test/runtimes
test/runtimes/proctorBinary proctor runs the test for a particular runtime.
test/runtimes/proctor/libPackage lib contains proctor functions.
test/runtimes/runnerBinary runner runs the runtime tests in a Docker container.
test/runtimes/runner/libPackage lib provides utilities for runner.
test/secbenchThe runner binary executes a single benchmark run and prints out results.
test/secbench/secbenchdefPackage secbenchdef contains struct definitions for secbench benchmarks.
test/secfuzzPackage secfuzz allows fuzz-based testing of seccomp-bpf programs.
test/tracePackage trace is empty.
test/trace/configPackage config providides helper functions to configure trace sessions.
test/udsPackage uds contains helpers for testing external UDS functionality.
tools
tools/bigqueryPackage bigquery defines a BigQuery schema for benchmarks.
tools/checkalignedPackage checkaligned ensures that atomic (u)int operations happen exclusively via the atomicbitops package.
tools/checkconstPackage checkconst checks constant values.
tools/checkescapePackage checkescape allows recursive escape analysis for hot paths.
tools/checkescape/test1Package test1 is a test package.
tools/checkescape/test2Package test2 is a test package that imports test1.
tools/checklinknamePackage checklinkname ensures that linkname declarations match their source.
tools/checklinkname/testPackage test provides linkname test targets.
tools/checklocksPackage checklocks performs lock analysis to identify and flag unprotected access to annotated fields.
tools/checklocks/cmd
tools/checklocks/cmd/checklocksBinary checklocks is a `vettool` for `go vet`.
tools/checklocks/testPackage test is a test package.
tools/checklocks/test/crosspkgPackage crosspkg is a second package for testing.
tools/checkunsafePackage checkunsafe allows unsafe imports only in files named appropriately.
tools/constraintutilPackage constraintutil provides utilities for working with Go build constraints.
tools/embeddedbinaryPackage embeddedbinary embeds an external binary and provides a function to exec it.
tools/embeddedbinary/testhelloworld_bundler bundles helloworld_bundlee and executes it.
tools/embeddedbinary/test/helloworldhelloworld_bundlee writes "Hello, gVisor!\n" to stdout.
tools/githubBinary github is the entry point for GitHub utilities.
tools/github/reviverPackage reviver scans the code looking for TODOs and pass them to registered Buggers to ensure TODOs point to active issues.
tools/go_fieldenumBinary fieldenum emits field bitmasks for all structs in a package marked "+fieldenum".
tools/go_genericsgo_generics reads a Go source file and writes a new version of that file with a few transformations applied to each.
tools/go_generics/globalsPackage globals provides an AST visitor that calls the visit function for all global identifiers.
tools/go_generics/go_merge
tools/go_generics/rules_tests
tools/go_generics/tests
tools/go_generics/tests/all_stmts
tools/go_generics/tests/all_types
tools/go_generics/tests/all_types/lib
tools/go_generics/tests/anon
tools/go_generics/tests/consts
tools/go_generics/tests/imports
tools/go_generics/tests/remove_typedef
tools/go_generics/tests/simple
tools/go_marshalgo_marshal is a code generation utility for automatically generating code to marshal go data structures to memory.
tools/go_marshal/analysisPackage analysis implements common functionality used by generated go_marshal tests.
tools/go_marshal/gomarshalPackage gomarshal implements the go_marshal code generator.
tools/go_marshal/testPackage test contains data structures for testing the go_marshal tool.
tools/go_marshal/test/escapePackage escape contains test cases for escape analysis.
tools/go_marshal/test/externalPackage external defines types we can import for testing.
tools/go_stateifyStateify provides a simple way to generate Load/Save methods based on existing types and struct tags.
tools/gpuPackage main downloads and installs drivers.
tools/gpu/driversPackage drivers contains methods to download and install drivers.
tools/gvisor2pcapBinary gvisor2pcap converts gVisor packet sniffer output to .pcap files that can be fed to Wireshark or tcpdump.
tools/gvisor_k8s_toolgvisor_k8s_tool is a command-line tool to interact with gVisor in Kubernetes clusters.
tools/gvisor_k8s_tool/clusterPackage cluster provides functions for dealing with Kubernetes clusters.
tools/gvisor_k8s_tool/cmd
tools/gvisor_k8s_tool/cmd/installPackage install provides a function to install gVisor in a k8s cluster.
tools/gvisor_k8s_tool/provider
tools/gvisor_k8s_tool/provider/clusterflagPackage clusterflag implements a flag.Value which can be used in commands to represent a Kubernetes cluster.
tools/gvisor_k8s_tool/provider/gkePackage gke contains functions to interact with Google Kubernetes Engine.
tools/gvisor_k8s_tool/provider/kubectlPackage kubectl contains functions to interact with Kubernetes clusters controlled using kubectl configurations.
tools/gvisor_k8s_tool/specPackage spec contains Kubernetes object specifications for gVisor setup.
tools/gvisor_k8s_tool/utilPackage util contains utility functions for gvisor_k8s_tools.
tools/ioctl_snifferPackage main sets up the ioctl sniffer and runs a given command.
tools/ioctl_sniffer/snifferPackage sniffer parses the output of the ioctl hook.
tools/nogoBinary nogo performs static analysis.
tools/nogo/checkPackage check implements binary analysis similar to bazel's nogo, or the unitchecker package.
tools/nogo/cliPackage cli implements a basic command line interface.
tools/nogo/configPackage config defines a filter configuration for nogo findings.
tools/nogo/factsPackage facts implements alternate fact types.
tools/nogo/flagsPackage flags contains globally-visible flags.
tools/nogo/sanityPackage sanity provides a basic sanity test.
tools/nvidia_driver_differPackage main sets up and runs the NVIDIA driver differ.
tools/nvidia_driver_differ/parserPackage parser contains functions for interfacing with driver_ast_parser.
tools/parsersPackage parsers holds parsers to parse Benchmark test output.
tools/profiletoolprofiletool deals with pprof profiles.
tools/stucktasksPackage main implements a tool to help troubleshoot watchdog dumps.
tools/tracereplayPackage tracereplay implements a tool that can save and replay messages issued from remote.Remote.
tools/tracereplay/mainPackage main implements a tool that can save and replay messages from issued from remote.Remote.
tools/xdpThe xdp_loader tool is used to load compiled XDP object files into the XDP hook of a net device.
tools/xdp/cmdPackage cmd implements the subcommands of xdp_loader.
tools/yamltestBinary yamltest does strict yaml parsing and validation.
webhookBinary main serves a mutating Kubernetes webhook.
webhook/pkg
webhook/pkg/cliPackage cli provides a CLI interface for a mutating Kubernetes webhook.
webhook/pkg/injectorPackage injector handles mutating webhook operations.
website
website/cmd
website/cmd/serverServer is the main gvisor.dev binary.
website/cmd/syscalldocsBinary syscalldocs generates system call markdown.
Version
v0.0.0-20250603074042-45108140e4ad (latest)
Published
Jun 3, 2025
Platform
linux/amd64
Last checked
1 day ago

Tools for package owners.