untrusted code: Namespace → Seccomp-BPF → Cgroup → TimeoutNamespaceSeccomp-BPFCgroupTimeoutps → hostptrace()fork() ×∞while (true)exec(llm_output)untrusted code
Core components
5
Isolation layers
4
Namespace types (kernel 6.1)
8
Lifecycle steps
6
  1. ALLOW read(3, buf, 4096)
  2. ALLOW write(1, "42\n", 3)
  3. DENY ptrace(PTRACE_ATTACH) → EPERM
  4. DENY mount("/") → EPERM
  5. LIMIT clone() → EAGAIN pids.max
  6. KILL memory.max → OOM
  7. KILL wall-clock → SIGKILL

Five layers, top to bottom

Only the fourth layer runs untrusted code. Select a layer to read what it does.

  1. L1Frontend UIUpload, launch, view results
    • File upload
    • Sandbox launch
    • Result display
  2. L2DatabaseTemporary & result store
    • Job (ID / Status)
    • Results
    • Logs
  3. L3Job ManagerDispatch · monitor · return
    • Dispatch to nodes
    • Monitor status
    • Return results
    • Store to Sandbox
  4. L4Sandbox ExecutorRuns untrusted code under four kernel-level controls
    • Linux Namespace
    • Seccomp-BPF
    • Cgroups
    • Timeout
  5. L5Monitoring & LogsObserve everything, touch nothing
    • Live resource metrics
    • Anomaly alerts
    • Log query

Open the full architecture diagram

Treat every workload as hostile, then make 'hostile' boring.

Read the design principles

Learn it