roadmap

P2: later

An appendix to the milestone.

P2: later

  1. Refusal::errno restates numbers the contract defines. DONE (errno reads dir::EINVAL, ENOTDIR, EISDIR, EPERM and file_grant::EBADF; ENOENT, ELOOP and EXDEV stay literal and the doc says whose numbering they are). Finding: EPERM, ENOTDIR and EINVAL exist in file_system_contract::dir (and EISDIR, which item 4 needs); the crate writes 1, 20 and 22 again. ENOENT, ELOOP, EXDEV and EBADF have no constant in the contract. The numbers are Linux's generic values (ELOOP is 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.rs lines 55 to 65; file_system_contract/src/dir.rs lines 84 to 94. Change: use the contract's constants where they exist, and one sentence in errno's doc saying whose numbering the rest follow. Door: two-way. Effort: XS.

  2. admit takes three u64 words in a row. DONE (requested is a Handle; badge and owner differ in type, so no pair swaps silently; the server wraps at its one call). Badge is not a type: Bindings takes bare badges. Finding: admit(binding, badge, requested, owner); swapping badge and requested compiles, and the one call site is the only thing that keeps them straight. Evidence: crates/subtree_scope/src/lib.rs lines 183 to 188; redoxfs_server/src/server.rs line 698. Change: two newtypes, Badge(u64) and Handle(u64), or a minted_by: Option<Badge> name for the last parameter. The server's u32 handles widen at the call as they do now. Door: two-way before the tag. Effort: S.

  3. #![cfg_attr(not(test), no_std)] where #![no_std] would do. DONE (#![no_std]; the tests pass under it). Finding: the tests use only core macros 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.rs line 22. Change: try #![no_std]; keep the attribute if a test needs std. Door: two-way. Effort: XS.

  4. The doc says nothing about how the requested rights mask. DONE (undefined_bits_of_requested_rights_change_nothing; walk's doc says so). Finding: walk compares rights.attenuate(DESCEND | requested_rights) with Rights::root(DESCEND | requested_rights), so the comparison silently drops bits of requested_rights outside dir::ALL, and the contract's PARENT_RIGHTS sentinel, if it reached walk unresolved, would ask for DESCEND alone. 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 in OPEN'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.rs lines 126 to 130; redoxfs_server/src/server.rs lines 97 and 127; file_system_contract/src/dir.rs lines 49 to 61. Change: one sentence in walk's doc, and a unit test with a hop word that has a high bit set. Door: two-way. Effort: XS.

  5. The README should say where this crate is stricter than Linux. LEFT: the README is move work. Finding: .. meets a refusal everywhere, where openat2 with RESOLVE_BENEATH accepts a .. that stays beneath; a symbolic link is never followed, where cap-std follows 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.rs lines 81 to 85, 141. Change: a short ## How it differs from openat2 and cap-std section, after ## BUGS in the scaffold's order. Door: two-way. Effort: XS.