Repository navigation
Step 8's exit: views hold only what a row gives, each app's /tmp its own - #1181
Conversation
Step 8's exit (the small-kernel track's stage 4; the isolation track's stage 1). On main, after #1152, the kernel serves no path: `/tmp` and `/system` are file-server grants, and std and libc both resolve through `toyos::files`. What still stood between a view and the exit was `toyos_manifest`'s `temporary`, the machine's whole `/tmp` added to every package's view, and the escape suite's rename race. - A package's `/tmp` is its own: the MEMORY grant rooted at `toyos_manifest::app_temporary` (`/tmp/apps/<name>` of the machine's), made by the supervisor with the app's home before it runs. This is the owner's "Per session" ruling of 2026-10-03, under which each app has its own `/tmp`. A view is now only what its row is given. - fileserver's resolver refuses a start outside the grant's root itself, by component, where `main.rs` checked it beside the resolver and the resolver `expect`ed it. The escape suite gains its rename races: a held directory renamed out of the root, by a name that only shares the root's spelling, or with the root itself renamed away, names nothing; one renamed inside the root resolves where it now is. - `toyos::files`' routing is a pure function of the view, so the exit's "a process given an empty view names nothing" is a host test. - `app_view` asks the app's `/tmp` is its own. The kernel is unchanged: 223 `.rs` files, 56,823 lines in `kernel/src`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A declared row's own view is the isolation track's stage 2, and SYS_GETCWD is a later step of the small-kernel track. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #1181 at 914ef65 (base e11b6a7)ArchitectureThe design fits the approved track. The owner's "Per session" ruling of 2026-10-03 ( Escaping a view. I traced the following:
I found no escape. The negative controls in Step 8's exit. The exit is "an escape suite red on a global-tree resolver and green on fileserver's; a process given an empty view names nothing". This PR meets it as the track defines it. The two remaining items are recorded with owner and exit:
The issue edits are accurate. Evidence gap (not a blocker here, by the review's scope). No run so far exercises the change end to end: supervisor FindingsBLOCKER
SUGGESTION
VerdictSEND BACK, for the one false doc comment. Once it is fixed, landing also depends on the pending |
…ORARIES `app_temporary`'s comment claimed no other program's view names an app's `/tmp`. A declared row holds the whole MEMORY tree, so the claim holds of other packages alone, and the comment now says so. `APP_TEMPORARIES` names the directory every app's `/tmp` is made in, so the supervisor makes it without splitting a path and `expect`ing the split. `beneath` and `data_dir` take `&str`. `Program::view`'s comment no longer says package and app for one thing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r2 of #1181:
|
Draft. Step 8's exit, the small-kernel track's stage 4 and the isolation track's stage 1. Evidence: https://github.com/ToyOSOrg/evidence/tree/b2e7fc5ad3193b5078866adfa6bca9e7cd0f836f/step8-r1
What main already had
After #1152 (
e11b6a784) the kernel serves no path.SYS_SPAWNrefuses a spawn without an image,/tmpis the MEMORY file server's,/systemis SYSTEM's, and libc and std both resolve throughtoyos::files. Two items of step 9's file half remain:SYS_GETCWD, a spawn's starting directory kept as text and checked only for syntax, and the half's measurement. The record's "the kernel serves/tmpto every process" was stale.What still stood against the empty view was
toyos_manifest'stemporary, the machine's whole/tmpadded to every package's view. The other open part of the exit was the escape suite's rename race.What changes
/tmpis its own. Its MEMORY grant is rooted attoyos_manifest::app_temporary(/tmp/apps/<name>of the machine's), which the supervisor makes with the app's home before the app runs. This follows the owner's "Per session" ruling of 2026-10-03: each app has its own/tmp. A view is now only what its row gives. A declared row still sees the whole tree but/state, which is stage 2's to narrow.fileserver::resolverefuses a start outside the grant's root by component. Before,main.rschecked it beside the resolver and the resolverexpected it. New tests cover the rename races: a held directory renamed out of the root, renamed to a name that only shares the root's spelling, or left outside after the root itself was renamed, names nothing. One renamed inside the root resolves where it now is.toyos::files' routing is a function of the view, so "a process given an empty view names nothing" is the host testan_empty_view_names_nothing_but_an_empty_root.app_viewchecks/tmp. The app's/tmpwrite lands in/tmp/apps/appview. Its/tmplists only that write. Neither the machine's/tmpfile nor another app's is reachable by path.Kernel size: unchanged.
kernel/srchas 223.rsfiles and 56,823 lines, before and after. No kernel path was superseded here, because #1152 had already deleted them.Checks
cargo run -- --ci hostat2d86471a9: exit 0, 108 steps green.2d86471a9:resolvetests red, namely every escape test, both halves of the suite. Exit 101.a_held_directory_renamed_out_of_the_root_names_nothingred. Exit 101.2d86471a9(run 41981594527):a_launch_gives_each_unsent_stdio_slot_a_nullandthe_data_partition_beside_the_stick_is_designatedboth PASS.std_fs,hierarchy_pathsandstate_vieware members of the sharedtestcasesboot, not QEMU rows. An earlier dispatch that named them booted nothing (run 41977385238). No aarch64 rows: no kernel, loader or architecture code changed.914ef657eand1d470454achange only the issue records, so every check above still applies.68bc9c0bc):app_temporary's comment now claims only that no other package's view names an app's/tmp.APP_TEMPORARIESreplaces the supervisor's path split and itsexpect.beneathanddata_dirtake&str.cargo run -- --ci hostat68bc9c0bc: exit 0, 108 steps green (https://github.com/ToyOSOrg/evidence/tree/dcc78cff0f2ff7d0ea65cdd1be1254a552f5d77a/step8-r3). The guest and T14 results above still apply: the change does not alter which directories the supervisor makes or what any view holds, which the unchanged manifest view tests pin.2d86471a9and run by the orchestrator: both boots passed. Judged by re-running the staging command with the readbacks in place: exit 0, "5 passed, 0 failed, 2 boot(s)". That isapp_viewonproctreecase, andstd_fs,std_fs_write,hierarchy_pathsandstate_viewontestcases.app_viewlogged "the app's /tmp write is in /tmp/apps/appview" and "its /tmp lists only what it wrote". Evidence: https://github.com/ToyOSOrg/evidence/tree/f03b51b3ff3fb1141991e7f8610991bc0263537d/step8-r2Unresolved
SYS_GETCWDis a later small-kernel step (item 1 of that track's list). Isolation stage 1 already decides that a spawn names a directory the child is given, not text the kernel keeps; what is open is only how the child learns that directory's name. A declared row's own view, which still holds the whole tree but/state, is the isolation track's stage 2. Both records name both items./tmplives inside the machine's/tmp, so a login session's programs can read it, as they can read the app's home. A session's own/tmpremains stage 3's./tmpis not emptied when the app ends. The machine's/tmpis not emptied either.🤖 Generated with Claude Code