Repository navigation
A sent handle of another kind is InvalidArgument whatever its rights, and adopted_services_stay checks only its own copy of toyos - #1280
Conversation
Review r1 of #1280 at 0df33fdArchitecture. The kernel half is right and small.
The ABI docs for The test half rests on a wrong diagnosis and does not fix the red. FindingsB1
B2
B3 S1 S2 (discovery; record or document, do not implement here) The two Evidence
PR body (for the orchestrator)The kernel section is accurate, including the three callers. The Net: kernel +6/−4, SDK docs +2/−1, test +3/−2, issue +4/−5. SEND BACK |
…toyos Correction to the previous commit's message: the adopter's early listing did not refuse its adoption. std links its own copy of `toyos`, and each copy keeps its own adopted services. std's `adopt_services` filled std's copy; the adopter's `toyos::endow::services()` read its own, which adopted nothing, so the check that it held `fs:/system` after adopting went red (run 43156966054, `assert_failed::<Vec<&str>, [&str; 1]>`), and the listing before it had sealed only the copy std never consults. - The adopter checks again that it was endowed no service, through its own copy, which never adopts. The check after the adoption goes: the helper's spawn proves the adoption, since std reads its image through `/system`, which std holds only by adopting it. - The two doc lines the wrong diagnosis added go. std's `adopt_services` says what ends its adoption: std's own resolution of a file or lookup of a service. - `process_tree`'s `a_pipe_is_no_place` no longer explains its refusal by the order the kernel no longer has, and `WrongType`'s doc says that `get_sent` never builds it. - `issues/a-programs-own-toyos-never-sees-the-services-std-adopted.md` records the two adopted sets, the defect #1226 closed for stdio's state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rights `HandleTable::get_sent`, the lookup of a handle a peer sent (`SYS_CONNECT`'s connector, `SYS_SPAWN`'s place and job), checked the handle's rights before its kind, so a handle of another kind that also lacked the right answered `PermissionDenied`. Its own contract, `connect`'s and the spawn fields' ABI docs all answer such a handle `InvalidArgument`, and a right means something only on its own kind. `connect` through an acceptor, which carries no `WRITE`, is the case `abuse_listener_hijack` holds, and it went red in `testcases_members_exit_0` once #1252 made connecting need `WRITE`. The kind is now checked first. A place or a job of another kind without `WRITE` answers `InvalidArgument` too, as their docs already say. `WrongType`'s doc says `get_sent` never builds it, and `process_tree`'s `a_pipe_is_no_place` no longer explains its refusal by the old order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The adopter, which std's `adopt_services` gives `fs:/system`, then checked that `toyos::endow::services()` listed it. std links its own copy of `toyos`, and each copy keeps its own adopted services: std's adoption filled std's copy, and the program's listing read its own, which adopted nothing. So the check went red in `testcases_members_exit_0` (run 43156966054, `assert_failed::<Vec<&str>, [&str; 1]>`). - The adopter still checks, through its own copy, that it was endowed no service: that copy never adopts, so the check holds at any point. The check after the adoption goes. The helper's spawn proves the adoption, since std reads the helper's image through `/system`, which std holds only by adopting it. - std's `adopt_services` says what ends its adoption: std's own resolution of a file or lookup of a service. - `issues/a-programs-own-toyos-never-sees-the-services-std-adopted.md` records the two adopted sets, the defect #1226 closed for stdio's state. - The owed-on-metal record for #1252 says `testcases_members_exit_0` runs the members #1252 adapted on QEMU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bd1a044 to
8daef7f
Compare
Review r2 of #1280 at bd1a044Re-check of r1's findings. The tree at bd1a044 is r1 findings
EvidenceHost checks
The coordinator judges these runs. I expect both members green at the head and both red in the control. Records
No new blocker. LAND |
Review r2 of #1280 at 8daef7fThis replaces the r2 comment I posted at bd1a044. The tree is unchanged, so that comment's findings carry over, and this one adds the rewritten history. Tree. 8daef7f's tree is
History. There are two commits on 302fb36.
PR body. The body is accurate: the head, both commits, the tree identity, the guest run's tree, and evidence reused from 0df33fd for a delta of comments, docs, one test and records. The note on the first diagnosis now refers to no hash, so it no longer goes stale. No blocker. LAND |
|
Orchestrator verification at 8daef7f. Review r2 is LAND. Landing run 43162379536 at bd1a044, whose tree The control is 43156966054: main 302fb36 plus #1227's SDK-only changes, red on exactly these two members. Main's own control run is cancelled because it would only repeat that. The body is updated to match. The PR merges cleanly onto main ee15a2e, since #1258 touches neither |
Problem
#1252 landed with two of the shared
testcasesmembers it adapted not yet run. Once #1271 made them a guest row,testcases_members_exit_0went red on both (run 43156966054, main 302fb36 plus #1227's SDK changes):abuse_listener_hijack:connectthrough an acceptor answeredPermissionDeniedwhere the test,connect's ABI doc and the kernel's own lookup contract sayInvalidArgument.adopted_services_stay: the adopter exited 101.Both are main's, from #1252.
Cause and resulting behaviour
The kernel's lookup of a handle a peer sent checked rights before kind.
HandleTable::get_sentservesSYS_CONNECT's connector andSYS_SPAWN's place and job. It calledget, which refuses a missing right before it looks at the kind. So a handle of another kind that also lacked the right answeredPermissionDenied. An acceptor carries noWRITE, and #1252 made connecting needWRITE, which exposed it.get_sentnow checks the kind first: a handle of another kind isInvalidArgumentwhatever rights it carries. A right means something only on its own kind, andget_sent's contract,connect's ABI doc and the spawn fields' docs already promiseInvalidArgument.WRITEnow answersInvalidArgument, as their docs say, where it answeredPermissionDenied.getitself, whose wrong kind ends the caller, is unchanged.The adopter read the services of another copy of
toyos. std links its own copy oftoyos, and each copy keeps its own adopted services. std'sadopt_servicesfilled std's copy. The adopter'stoyos::endow::services()read its own copy, which adopted nothing, so its check that it heldfs:/systemafter adopting went red: in run 43156966054 the adopter failed inassert_failed::<Vec<&str>, [&str; 1]>./system, which std holds only by adopting it.adopt_servicessays what ends its adoption: std's own resolution of a file or lookup of a service.issues/a-programs-own-toyos-never-sees-the-services-std-adopted.md, whose exit is one adopted set both copies see. It is not fixed here.Record. The owed-on-metal entry for #1252 in
issues/the-kernel-is-small-interrupts-post-and-threads-wait.mdnow saystestcases_members_exit_0runs the members #1252 adapted on QEMU; what metal owes is unchanged.Checks and evidence
Evidence branch
pr-1280, at0ce94a131. Each log ends with its exit code; local paths are masked. The head is 8daef7f, on main 302fb36, in two commits: 71876b8, the kernel fix, and 8daef7f, the test, docs and records. Its tree, 7bc0336016d4f2cf9f3e78ca049677cb1d15cdb8, is bd1a044's, the head the guest run below was dispatched at; review r1's fixes were squashed into this history so that no commit states the first, wrong diagnosis. The host checks ran at 0df33fd, from which the head differs only in comments, docs, one guest test and records.Host checks at 0df33fd, a clean tree (
r14/):--build-only;sched-check,toyos-abi,toyosand the other crates A child's handles are a list its parent names: labels and namespaces leave the kernel #1252 touched;build/clippy.rs: host, host with the kernel's controls, x86_64 default, both actuator sets, the instrument set, the two heap-band sets, aarch64 default, both actuator sets and its instrument set;toyos(all targets andfd-table), the libraries andtoyos-abi.All exit 0.
HandleTablehas no host test: the kernel's handle table is not built for the host. The guest row is the test of the lookup, andabuse_listener_hijackholdsconnect's answer.Guest rows, one run at bd1a044, whose tree is the head's: 43162379536, all 3 pass, and
testcasessays 242 members exited 0 (verdicts). 43160566562 at 0df33fd was cancelled while queued.testcases_members_exit_0: everytestcasesmember,abuse_listener_hijackandadopted_services_stayamong them, and the four members A child's handles are a list its parent names: labels and namespaces leave the kernel #1252 adapted (poll_belongs_to_its_handle,messages_are_whole,moved_rights,mutual_kill);a_launch_gives_each_unsent_stdio_slot_a_nullandsession_lifecycle: the supervisor's launches, which name a place and a job, whose lookup this changes. They run on x86-64 QEMU; each is one ofMACHINE_TESTS.Control: main 302fb36 without this change, the coordinator's run 43155677796 (
testcases_members_exit_0,shared_debug_members_exit_0). It was cancelled before it ran, so no clean control of main exists yet. The reds this PR fixes are those of #1227's run 43156966054, at main 302fb36 plus #1227's SDK changes, which touch neither the kernel nor these two members' failing lines.No metal is staged or requested: the benches are down, and what metal owes is in the record above.
Risks
WRITE" from "no such kind" by the order now seesInvalidArgumentfor both on a wrong kind. The three callers are the ones named above, and their docs already sayInvalidArgument.🤖 Generated with Claude Code