ArticleslgStudy

computer science

GVisor

GVisor is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand GVisor rather than just read about it. In short: gVisor is an open-source container sandbox developed by Google that focuses on security, efficiency, and ease of use. It provides virtualization-like isolation while maintaining the resource efficiency of standard containers. gVisor intercepts application system calls and implements a large portion of the Linux system call ABI in userspace, offering additional security compared to standard containers that run direct…

Key takeaways

  • GVisor belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect GVisor to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of GVisor from memory before moving on to harder problems.

Reference excerpt

gVisor is an open-source container sandbox developed by Google that focuses on security, efficiency, and ease of use. It provides virtualization-like isolation while maintaining the resource efficiency of standard containers. gVisor intercepts application system calls and implements a large portion of the Linux system call ABI in userspace, offering additional security compared to standard containers that run directly on top of the Linux kernel and are isolated merely with namespaces. Unlike the Linux kernel, gVisor is written in the memory-safe programming language Go to prevent common pitfalls which frequently occur in software written in C. Modern features of the platform include checkpoint/restore functionality and Nvidia GPU/CUDA and Google Cloud TPU support for AI/ML workloads. According to Google and Brad Fitzpatrick, gVisor is used extensively in Google's production environment, including the App Engine standard environment, Cloud Functions, and Google Cloud Run. Furthermore, gVisor is integrated with Google Kubernetes Engine (GKE Sandbox), allowing users to sandbox their Kubernetes pods for use cases like SaaS and multitenancy. In October 2026, Google announced that it was donating gVisor to the Cloud Native Computing Foundation (CNCF) as a Sandbox project. Beyond Google, organizations using gVisor include Ant Group, DigitalOcean (for App Platform), Cloudflare (for Cloudflare Pages builds), Snowflake, and the Freedom of the Press Foundation's Dangerzone tool. OpenAI and Anthropic use gVisor to run untrusted or AI-generated code. Wordfully uses it to isolate containerized backend workloads. In addition, Docker (in Docker Desktop for Mac) and Tailscale use gVisor's netstack library for userspace networking. In July 2026, OpenAI reported a sandbox issue to the gVisor team, which said it released a fix the following week and that exploitation required a non-standard configuration its documentation discourages.

Architecture gVisor acts as an application kernel that intercepts and handles system calls and page faults from the sandboxed workload itself, rather than passing them to the host Linux kernel.

runsc is gVisor's Open Container Initiative (OCI) container runtime executable, which integrates with Docker, containerd, and Kubernetes to start and manage sandboxed containers. The Sentry is the core component of gVisor. It is a userspace kernel, written in Go, that implements a large subset of the Linux system-call interface along with subsystems such as process management, signal handling, and networking (via its userspace network stack, netstack). The logic runs entirely within gVisor's memory-safe code rather than being delegated to the host kernel. The Gofer is an optional, separate, slightly more privileged sidecar process that mediates access to the host filesystem and communicates with the Sentry over the LISAFS protocol (which replaced 9P). By default, with directfs enabled, the Gofer passes file descriptors for container mounts to the Sentry so it can perform restricted file-descriptor-relative system calls directly; when directfs is disabled, all file operations are proxied through the Gofer. To minimize the attack surface exposed to the host, the Sentry runs under a restrictive seccomp filter and in isolated user and mount namespaces, so that even the small set of host system calls it can make is tightly constrained. These restrictions form a second layer of defense, meaning that a vulnerability in the Sentry is not enough on its own to escape to the host. As with other sandboxed runtimes, gVisor generally does not protect against hardware side-channel attacks such as Spectre, which must be mitigated by the host kernel or hardware.

Platforms gVisor must intercept the sandboxed application's system calls and redirect them to the Sentry. It abstracts this behind a "platform" interface, of which two are currently provided:

Systrap uses the seccomp-bpf subsystem's SECCOMP_RET_TRAP feature: a sandboxed system call triggers a SIGSYS signal that hands control to gVisor. It requires no hardware virtualization and works even inside virtual machines, making it the most portable option. Systrap replaced the older ptrace platform as the default in mid-2023. KVM uses the kernel's KVM functionality, letting the Sentry act as both guest kernel and virtual machine monitor. It performs best on bare-metal hosts but suffers under nested virtualization and is unavailable on hardware lacking the relevant virtualization extensions. The original ptrace platform, based on PTRACE_SYSEMU, remains in the codebase but is no longer supported.

Features Checkpoint and restore: runsc can save the kernel and memory state of a running sandbox to disk and restore it into a new container, including workloads using CUDA GPUs (via NVIDIA's cuda-checkpoint utility). GPU and TPU passthrough: Through its nvproxy and tpuproxy drivers, gVisor intercepts ioctl and mmap calls on virtual accelerator device files, translates pointers and file descriptors from the sandbox address space, and forwards an allowlisted subset of calls to the host accelerator drivers. Because these calls are handled by the host kernel driver rather than emulated in the Sentry, vulnerabilities in those drivers remain part of the attack surface.

Performance Because the Sentry intercepts and handles system calls in userspace, gVisor adds overhead that falls most heavily on system-call-intensive and I/O-intensive workloads, while having little effect on CPU-bound workloads that execute natively within their own address space. gVisor's documentation notes that raw CPU execution, memory access, and disk I/O incur no significant structural overhead once mappings are established. To reduce filesystem overhead, gVisor enables a writable tmpfs root filesystem overlay and directfs by default, avoiding repeated round-trips to the Gofer.

See also OS-level virtualization User-mode Linux

References

Worked examples

Example 1 — a first encounter with GVisor

Start with the simplest possible case. Write down what GVisor claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to GVisor before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about GVisor ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of GVisor

In research
GVisor appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses GVisor in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
GVisor is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free software programmed in Go, Google software, Linux APIs, so understanding it makes those chapters shorter.
In everyday life
Look for GVisor outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “GVisor” →

How to study GVisor in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what GVisor means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain GVisor out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is GVisor in simple terms?

gVisor is an open-source container sandbox developed by Google that focuses on security, efficiency, and ease of use. It provides virtualization-like isolation while maintaining the resource efficiency of standard containers. gVisor intercepts application system calls and implements a large portion…

Why does GVisor matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study GVisor?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on GVisor.

Tags

  • Free software programmed in Go
  • Google software
  • Linux APIs
  • Software using the Apache license

Keep exploring