gvisor-kernel-development
Skill20k starsChanged 10 days agoApache-2.0View on GitHub
Use when modifying gVisor application kernel behavior: adding a new system call, adding new flags to an existing system call, editing the syscall tests in `//test/syscalls`.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
When modifying or expanding the way the gVisor kernel works, such as when implementing a new system call, adding a new flag to an existing …
- Distinctive: line 15
If applicable, come up with a way to quickly test and exercise the relevant kernel functionality by using a shell command or a short Python …
- Very specific: line 24
Before you look at any gVisor code, start by establishing a black-box understanding of the current behavior of both Linux and gVisor for …
- Very specific: line 28
If asked to modify the behavior of a specific system call, look for existing syscall tests that cover this syscall.
- Very specific: line 32
Only after you have done the above, start reading gVisor kernel source code.
- Distinctive: line 33
Do not stop at the first file you think is most likely to implement the functionality you want to implement.
- Very specific: line 81
If you change or add a syscall test, you should first run it under Linux to make sure that the syscall test works properly under Linux.
- Very specific: line 90
Only after a syscall test works under Linux does it make sense to ever run it under gVisor.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When modifying or expanding the way the gVisor kernel works, such as when implementing a new system call, adding a new flag to an existing system call, or modifying the way an existing system call works, you should generally follow this approach:
- Repeat your understanding of this aspect of the Linux kernel functionality.
- If applicable, come up with a way to quickly test and exercise the relevant
kernel functionality by using a shell command or a short Python script. For
example, if asked to change the way the
stat(2)system call works on a specific device file like/dev/zero, you can usestat /dev/zeroas a representative command for which the output can guide your understanding of the way the kernel works. See the "Running a C program in gVisor" section below for how to run it. Syscall tests are also appropriate and excellent at establishing coverage of all the edge cases a syscall may have; during development, both are useful. - Before you look at any gVisor code, start by establishing a black-box understanding of the current behavior of both Linux and gVisor for the representative command or script you have come up with. Use the tools available at your disposal to verify this.
- If asked to modify the behavior of a specific system call, look for existing syscall tests that cover this syscall. Read the syscall test file, and run it under both Linux and gVisor at least once to make sure it is starting from a good state to begin with.
- Only after you have done the above, start reading gVisor kernel source code. Do not stop at the first file you think is most likely to implement the functionality you want to implement; look for multiple such files and only settle on a decision once you are confident about your decision.
- Make code changes, running your representative command or script or syscall tests as often as necessary.
While Linux man pages are the ABI spec, they are also often wrong or
out-of-date, hence gVisor's use of black-box syscall tests to assert Linux
behavior.
Running gVisor development workflows
Running a C program in gVisor
During development, to verify more complex syscall behavior in gVisor, it may be useful to write a custom program in C that calls system calls directly, then to compile it, and to run it in Linux and in gVisor.
To do so, generate a dependency-free C program, compile it with gcc, move it
to a temporary directory such as /tmp (important: gVisor cannot directly run
from special directories such as bazel-bin due to uninteresting permission
issues), then use runsc's do helper as follows:
# Recompile and extract to a world-accessible directory:
$ make release-tarball DESTINATION=out/ && mkdir -p /tmp/gvisor && tar -C /tmp/gvisor -xf out/gvisor.tar.bz2
# Run:
$ /tmp/gvisor/runsc --rootless=true --network=none --debug-log=/dev/stderr --strace=true do /absolute/path/to/the/binaryThis will run /absolute/path/to/the/binary inside gVisor, with debug logs and
the syscall trace (strace) output included. Don't forget to also run it under
Linux so that you can compare its behavior.
Running syscall tests
As gVisor is a kernel meant to replicate Linux-like behavior, application-observable kernel behavior is not tested with Go unit tests, and you should not add such tests for it. Go unit tests are only appropriate for self-contained internals with no Linux behavior to compare against. Instead, the gVisor kernel behavior is tested by "syscall tests", which are C++ test binaries which can be run either in Linux and in gVisor. These syscall test binaries call some system calls in the kernel they are run in (either Linux or gVisor), and verify that the system call behaves in the same expected way.
These tests are defined in //test/syscalls/linux as .cc.
If you change or add a syscall test, you should first run it under Linux to make sure that the syscall test works properly under Linux. A syscall test that fails under Linux reflects a problem with the test itself, not a problem in gVisor. If this happens, fix the syscall test C++ program itself. Example:
make syscall-tests TARGETS="//test/syscalls:signalfd_test_native"Only after a syscall test works under Linux does it make sense to ever run
it under gVisor. A syscall test that succeeds under Linux but fails under gVisor
reflects a problem in gVisor itself. In this case, iterate on the gVisor kernel
code, and keep running the syscall test under gVisor until the syscall test
passes. Example to run signalfd.cc in both Linux and gVisor in one shot:
make syscall-tests TARGETS="//test/syscalls:signalfd_test_native //test/syscalls:signalfd_test_runsc_systrap_shared"Trending
More talk lately.about the whole repository
Who's talking about google/gvisor
- A Hacker News story“Go CheckLocks Analyzer”Hacker News · Dec 29, 2021 · 94 points
- cncf/sandbox“[Sandbox] gVisor”GitHub · Sep 7, 2026 · 45 reactions
- Stack Overflow“What is meant by shared kernel in Docker?”Stack Overflow · Sep 24, 2015 · 36 votes
- A Hacker News story“Gvisor: Application Kernel for Containers”Hacker News · Jan 3, 2024 · 26 points
- golang/go“all: remove nacl port”GitHub · Feb 27, 2019 · 26 reactions
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub, Stack Overflow, Hacker News and Bluesky (52 times).
On GitHub · 35
- Sep 7, 2026[Sandbox] gVisor — cncf/sandbox45 reactions · 13 comments
- Feb 27, 2019all: remove nacl port — golang/go26 reactions · 55 comments
- Dec 16, 2025go 1.26.0, go@1.25 1.25.7 (new formula) — Homebrew/homebrew-core12 reactions · 10 comments
- Jul 23, 2022tun/netstack: bump to latest gvisor — WireGuard/wireguard-go5 reactions · 1 comment
- May 2, 2018x/playground: use gVisor on linux/amd64 binaries instead of NaCl for sandboxing — golang/go4 reactions · 57 comments
30 more on GitHub
- Jul 7, 2024Disable racy `EpollTest.UnblockWithSignal` — asterinas/asterinas3 reactions · 8 comments
- Feb 8, 2019Proposal & looking for feedback: fostering more of a community — u-root/u-root3 reactions · 4 comments
- May 8, 2018pre-fetch all dependencies for build envs without network — bazelbuild/bazel3 reactions · 5 comments
- Jul 6, 2026Report `ENOMEM` in `mmap()` if the address is not in user space (even if it is not page-aligned) — asterinas/asterinas2 reactions
- Feb 10, 2026Does not build with Go 1.26rc3 — netbirdio/netbird2 reactions · 2 comments
- Mar 29, 2024Does not search all specified devcontainer locations — coder/envbuilder2 reactions
- Feb 18, 2024Add support for gVisor — pdtpartners/nix-snapshotter2 reactions · 1 comment
- Jun 18, 2020maybe u could refer this project — PioneerIncubator/betterGo2 reactions · 2 comments
- May 2, 2018package request/idea: gvisor — NixOS/nixpkgs2 reactions · 1 comment
- Oct 24, 2026Allow root-module Linux header defaults — hermeticbuild/hermetic-llvm1 reaction · 3 comments
- Aug 4, 2026tools/gvisor-smoke-test.sh: Unmount `null-netns` before workdir cleanup — google/syzkaller1 reaction · 1 comment
- Jul 3, 2026Support gvisor and sandboxed nodes in Karpener — cloudpilot-ai/karpenter-provider-gcp1 reaction · 1 comment
- Feb 8, 2026[gvisor-tests] Nightly Summary: gVisor Syscall Analysis [2026-02-08] - 93 Syscalls Verified ✅ — lpcox/aw-litebox1 reaction
- Oct 28, 2025proposal: package to parse coverage data — golang/go1 reaction · 6 comments
- Sep 8, 2025Support container checkpoint/restore for gVisor runtime — containerd/containerd1 reaction · 8 comments
- Aug 23, 2025Preview / Blocked by upstream: MLX on three clouds: Fal, Modal, Replicate — mflux-community/mflux1 reaction · 2 comments
- Aug 15, 2025ci: automatically bump GVISOR_VERSION file — gardener/gardener-extension-runtime-gvisor1 reaction
- Mar 13, 2025Add way to specify `--runtime-flag` in `containers.conf` — podman-container-tools/podman1 reaction · 9 comments
- Dec 15, 2023tools/docker/syzbot: add libbpf-dev to Dockerfile — google/syzkaller1 reaction · 2 comments
- May 9, 2023wgengine/netstack: switch to cubic congestion control — tailscale/tailscale1 reaction · 5 comments
- Mar 24, 2021Explore circumvention of Iran's "Protocol Whitelister" — celzero/firestack1 reaction · 5 comments
- Oct 30, 2026chore: bump gVisor to 20261026.0 — gardener/gardener-extension-runtime-gvisor0 reactions · 4 comments
- Oct 26, 2026chore: bump gVisor to 20261019.0 — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Oct 19, 2026chore: bump gVisor to 20261012.0 — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Oct 12, 2026chore: bump gVisor to 20261005.0 — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Oct 5, 2026chore: bump gVisor to 20260928.0 — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Sep 28, 2026chore: bump gVisor to 20260921.0 — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Sep 21, 2026chore: bump gVisor to 20260914.0-staging — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Sep 14, 2026chore: bump gVisor to 20260907.0-staging — Vincinator/gardener-extension-runtime-gvisor0 reactions
- Sep 7, 2026chore: bump gVisor to 20260831.0 — Vincinator/gardener-extension-runtime-gvisor0 reactions
On Stack Overflow · 8
- Sep 24, 2015What is meant by shared kernel in Docker?36 votes
- Nov 23, 2021Laravel application hang on Google Cloud Run but runs fine on home setup2 votes
- Jul 15, 2021Is the shell executor a safe option when running GitLab Runner in a docker container?2 votes
- Sep 12, 2020Chromium inside docker image on Google Cloud Run1 vote · 1 answer
- Sep 1, 2020Unable to fetch cpu pod metrics, k8s- containerd - containerd-shim-runsc-v1 - gvisor1 vote
3 more on Stack Overflow
- Nov 4, 2024cannot create sandbox: cannot read client sync file: waiting for sandbox to start: EOF: unknown0 votes
- Aug 24, 2022Can't launch pod using gVisor0 votes
- Aug 15, 2019Cloud-Run process fails with 500 status-code and a membarrier gvisor error0 votes
On Hacker News · 7
- Dec 29, 2021Go CheckLocks Analyzer94 points · 19 comments
- Jan 3, 2024Gvisor: Application Kernel for Containers26 points · 5 comments
- May 8, 2018gVisor: Container Runtime Sandbox, a user-space kernel for containers9 points · 1 comment
- May 2, 2018GVisor: Google Sandboxed Container Runtime6 points
- May 3, 2018Google created generics for Go5 points
2 more on Hacker News
- May 4, 2018GVisor: making it simple to run sandboxed containers2 points
- Aug 21, 2018Gvisor1 point
On Bluesky · 2
- Aug 16, 2026gvisor by @GoogleOSS (⭐️ 19094) Application Kernel for Containers #go — @golangoss.bsky.social1 likes and repost
- May 10, 2018A new runtime on AppEngine: node.js Serverless, autoscaled, fully managed, and built on state of the art open source container on bare… — @martin-gorner.bsky.social0 likes and reposts · 1 reply
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- images/systemd-user/gnome-mcp/AGENTS.mdAGENTS.md
- gvisor-performanceSkill
- update-gvisor-maintainersSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

