P2: later
An appendix to the milestone.
P2: later
-
Refusal::errnorestates numbers the contract defines. DONE (errnoreadsdir::EINVAL,ENOTDIR,EISDIR,EPERMandfile_grant::EBADF;ENOENT,ELOOPandEXDEVstay literal and the doc says whose numbering they are). Finding:EPERM,ENOTDIRandEINVALexist infile_system_contract::dir(andEISDIR, which item 4 needs); the crate writes 1, 20 and 22 again.ENOENT,ELOOP,EXDEVandEBADFhave no constant in the contract. The numbers are Linux's generic values (ELOOPis 40 here and 62 on macOS), and the doc says the crate speaks no wire while it does speak a numbering. Evidence:crates/subtree_scope/src/lib.rslines 55 to 65;file_system_contract/src/dir.rslines 84 to 94. Change: use the contract's constants where they exist, and one sentence inerrno's doc saying whose numbering the rest follow. Door: two-way. Effort: XS. -
admittakes threeu64words in a row. DONE (requestedis aHandle;badgeandownerdiffer in type, so no pair swaps silently; the server wraps at its one call).Badgeis not a type:Bindingstakes bare badges. Finding:admit(binding, badge, requested, owner); swappingbadgeandrequestedcompiles, and the one call site is the only thing that keeps them straight. Evidence:crates/subtree_scope/src/lib.rslines 183 to 188;redoxfs_server/src/server.rsline 698. Change: two newtypes,Badge(u64)andHandle(u64), or aminted_by: Option<Badge>name for the last parameter. The server'su32handles widen at the call as they do now. Door: two-way before the tag. Effort: S. -
#![cfg_attr(not(test), no_std)]where#![no_std]would do. DONE (#![no_std]; the tests pass under it). Finding: the tests use onlycoremacros as far as reading shows; a plain#![no_std]would say the same thing without the branch. Unverified: that the test module compiles under it. Evidence:crates/subtree_scope/src/lib.rsline 22. Change: try#![no_std]; keep the attribute if a test needsstd. Door: two-way. Effort: XS. -
The doc says nothing about how the requested rights mask. DONE (
undefined_bits_of_requested_rights_change_nothing;walk's doc says so). Finding:walkcomparesrights.attenuate(DESCEND | requested_rights)withRights::root(DESCEND | requested_rights), so the comparison silently drops bits ofrequested_rightsoutsidedir::ALL, and the contract'sPARENT_RIGHTSsentinel, if it reachedwalkunresolved, would ask forDESCENDalone. The directory verb resolves the sentinel first (open_dir, line 127); the file verb passes its word through (open_file_path, line 97). Whether a client can put the sentinel inOPEN's second word is the server's matter and unverified; the crate should say what it does with undefined bits. Evidence:crates/subtree_scope/src/lib.rslines 126 to 130;redoxfs_server/src/server.rslines 97 and 127;file_system_contract/src/dir.rslines 49 to 61. Change: one sentence inwalk's doc, and a unit test with a hop word that has a high bit set. Door: two-way. Effort: XS. -
The README should say where this crate is stricter than Linux. LEFT: the README is move work. Finding:
..meets a refusal everywhere, whereopenat2withRESOLVE_BENEATHaccepts a..that stays beneath; a symbolic link is never followed, wherecap-stdfollows one whose target stays beneath. A reader coming from either will file these as bugs unless the README names them as the rule. Evidence:crates/subtree_scope/src/lib.rslines 81 to 85, 141. Change: a short## How it differs from openat2 and cap-stdsection, after## BUGSin the scaffold's order. Door: two-way. Effort: XS.