Part 3 of 13 · 1 min read
The layers and the limits
Each layer is a field in a Policy, and six presets turn them on one at a time so the experiments can show what each buys.
| Level | Adds | Real mechanism |
|---|---|---|
| L0 bare | nothing (a 4-second watchdog so the experiment cannot hang) | a child process |
| L1 limits | wall-clock limit, CPU, memory, file size, open files, output cap, sweep of leftovers | setrlimit, a polling loop, a process session |
| L2 env and cwd | scrubbed environment, private working directory | a fresh environment and a temporary directory |
| L3 processes | own process tree, a cap on the number of processes | a PID namespace and a monitor that walks /proc |
| L4 network | no way out to the network | a network namespace |
| L5 filesystem and capabilities | chosen paths hidden, no capabilities | a mount namespace, setpriv |