Ginux 转型用户态内核 打造智能体沙箱

原标题:Greg Kurtzer's Ginux is now a userspace kernel
62AI 研判分

Ginux 项目宣布放弃独立可引导内核路线,转为运行在普通 Linux 进程中的可配置用户态内核,通过显式版本化契约隔离受管工作负载与宿主内核。项目方称此前由 AI 编码智能体在人类架构指导下完成的可引导内核实验已验证可行性,但受限于 Linux 生态的兼容性与社区现实,最终转向更务实的沙箱定位,目前定位为生产级智能体沙箱。

报道正文

本文目录3 个章节

Ginux

Ginux is a configurable userspace kernel for isolated Linux compatibility instances. It runs as an ordinary Linux process and places an explicit, versioned contract between managed workloads and the host kernel.

[!IMPORTANT] Ginux began as an independent Rust kernel that booted directly through UEFI and ran a Rocky Linux 10 userspace. That research phase is complete. Its final source is permanently preserved on the bootable-kernel branch and at the bootable-kernel-final tag. Active development now continues here as a userspace kernel.

Why the project changed direction

The standalone-kernel experiment proved that an AI coding agent, directed by an experienced human through architecture, gates, and executable tests, could construct a new kernel capable of running meaningful Linux userspace. It also made the limits of that result obvious.

Linux is much more than source code. It is a stable interface, a development process, a global community, vendor and hardware alignment, and decades of compatibility and operational experience. Reimplementing kernel mechanisms does not reproduce that ecosystem, and competing with Linux was never the goal.

The more useful result is the boundary the experiment exposed. Linux must preserve a broad userspace ABI; as Linus Torvalds put it, “And we simply do not break user space.” The kernel regression documentation records that rule. Ginux can sit above Linux and deliberately offer a smaller contract to each managed instance. Before a managed syscall has a host effect, Ginux decides whether to emulate it, perform a validated mediated operation, or deny it.

Put bluntly: Linux must not break userspace; Ginux is designed to break the full Linux ABI guarantee deliberately and selectively. A instance receives only the capabilities and interface behavior its approved workload requires. Every departure is intended to be explicit, versioned, reviewable, and tested, rather than accidental incompatibility.

This pivot is also a result of the development method. AI made it practical to build disposable but executable prototype code, test an architectural idea, learn from the running system, and carry the valuable parts into a better design. The prototype was evidence, not an obligation to turn every experiment into a product.

What Ginux is now

TEXT
Host Linux kernel
  `- host systemd (real PID 1)
       `- ginux (ordinary trusted host process)
            `- instance contract
                 |- virtual processes and identities
                 |- virtual descriptors and kernel views
                 |- assigned devices and resources
                 `- managed Rocky Linux userspace
                      `- instance systemd (virtual PID 1)

Ginux supervises native x86-64 programs and intercepts managed syscalls before their host effect. Its central dispatcher resolves the instance contract and chooses one of three outcomes:

  • Emulate: answer entirely from Ginux-owned state.
  • Mediate: validate and translate the request, then perform a narrow Ginux-owned host operation.
  • Deny: return a configured Linux-compatible error or terminate the task.

The current implementation includes:

  • a security-focused x86-64 interpreter and a balanced native ptrace backend;
  • strict, versioned instance configuration and lifecycle;
  • a digest-pinned OCI root, immutable filesystem index, and bounded overlay;
  • Ginux-owned process, credential, signal, synchronization, timer, and event models;
  • virtual devices with explicit assignment, ownership, and revocation; and
  • bounded virtual /proc, /sys, cgroup v2, mount, namespace, machine, and boot-identity views;
  • a host-shared network backend that remains syscall-mediated; and
  • a pinned Rocky Linux 10 systemd baseline that reaches multi-user.target, authenticates a managed console login, updates through Rocky's enabled repositories, and shuts the instance down cleanly.

This is a named compatibility baseline, not a claim of complete Linux or systemd compatibility. Its exact image, readiness marker, tests, evidence, and limitations are recorded in hdae/gates-todo/9-systemd-baseline.md.

Agent containment research

Ginux is also being tested as a containment boundary for AI agents and other automated software that can execute commands, modify files, open network connections, and start additional processes. Instead of giving an agent the host's complete Linux ABI, an operator can place its process tree inside a instance whose kernel contract exposes only the operations and virtual resources required for the task.

The research goal is a reviewable boundary spanning syscalls, ioctls, filesystems, devices, networking, process authority, and virtual /proc and /sys state. For example, a contract may allow an agent to read time, inspect its own processes, and modify one assigned workspace while denying clock changes, host filesystem access, unapproved network listeners, and unrelated devices. Ginux can then audit the contract decisions made while the agent and its child processes run.

This is an active verification target, not a claim that Ginux is currently a production-grade agent sandbox. The contract inventory, configurable policy, adversarial tests, performance costs, and escape boundaries are tracked through the HDAE gates and must be demonstrated before stronger containment claims are made.

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)