runbook: /proc route reads and writes; native apps' journal copy
The open /proc route is stated as witnessed: it reads the host's files and creates files on its disk. A new section says what changed in the agent journal's copy of native apps' output: 8 KiB lines, empty lines left out, 4096 lines a minute per process after 1024, 8192 a minute for the agent after 4096, stderr to the agent's stdout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+21
−2
docs/superpowers/runbooks/gvisor-demos.md+21 −2
diff --git a/docs/superpowers/runbooks/gvisor-demos.md b/docs/superpowers/runbooks/gvisor-demos.md| index d306c0215..bcb2b3326 100644 |
| --- a/docs/superpowers/runbooks/gvisor-demos.md |
| +++ b/docs/superpowers/runbooks/gvisor-demos.md |
| @@ -161,8 +161,10 @@ One route is open, and the witness checks that it is. The set includes |
| `CAP_SETUID`, so a child can switch to another user. It can then open |
| `/proc/<pid>/root` of a host process of that user that holds no |
| capabilities, such as `carlos-relay` or an admin shell, and pass it back |
| -to its root parent. Through it the parent reads the host's files, |
| -`/etc/carlos` included, with or without `CAP_SYS_ADMIN`. No unit setting |
| +to its root parent. That is the root of the host's own filesystem, where |
| +`/` is writable. Through it the parent reads the host's files, |
| +`/etc/carlos` included, and creates new files on the host's disk, with |
| +or without `CAP_SYS_ADMIN`. The witness does both. No unit setting |
| closes this route and still lets runsc run. runsc needs `CAP_SETUID` and |
| the calls the route uses. Hiding the host's processes from `/proc` with |
| `ProtectProc=` does not hide a process from its own user. `PrivatePIDs=` |
| @@ -182,6 +184,23 @@ what runsc needs, not a boundary against a compromised runsc parent or |
| hook. Treat one as root on the box. A boundary that holds against it |
| needs mandatory access control, or privileged setup moved out of the unit. |
| +## App output in the agent's journal |
| + |
| +Native apps, the ones not under gVisor, still send `carlos logs` every |
| +line they did before. Their copy in the agent's journal changed with |
| +this release. It now goes through the same queue as the gVisor log |
| +listener's, so a stalled journald no longer holds an app up: |
| + |
| +- A line longer than 8 KiB is cut there, with the app log's truncation |
| + marker. Empty lines are left out. |
| +- Each app process may put 4096 lines a minute in the journal, after a |
| + first 1024. Lines past that are dropped from the journal only, and the |
| + journal gets "<host>: dropped N byte(s) of app output (journal line |
| + cap)". |
| +- The agent writes at most 8192 lines a minute to its journal, all apps |
| + together, after a first 4096. |
| +- An app's stderr lines go to the agent's stdout, not its stderr. |
| + |
| ## Roll the dev box |
| The file `/etc/carlos/host.env` must be a root-owned regular file under 1 MiB. |