P1: before the tag
An appendix to the milestone.
P1: before the first tag
-
cntfrq_checkedon aarch64 cannot returnNone, and a zero register divides by zero. Finding: the aarch64cntfrqreturnsCNTFRQ_EL0raw andcntfrq_checkedwraps it inSomeunconditionally, with the doc "aarch64: never, the machine states it". Firmware may leave the register at zero (unverified that such firmware is in use here; the Linux device-tree binding for the architected timer carries aclock-frequencyproperty for the case where firmware did not program it). Thenmonotonic_nanosecondsdivides by zero, which panics, which traps, with no message. The other two architectures treat an unknown rate asNone; aarch64 should too. Evidence:src/clock.rslines 44 to 59 and 304 to 311. Change:cntfrq_checkedreturnsNonewhen the register reads zero; aarch64'scntfrqgains the sameexpectas its twins. One sentence in the doc. Door: two-way. Effort: XS. -
The aarch64 child stub hard-codes two
abiconstants the other two architectures derive. Finding:SEND_THEN_EXITon aarch64 encodesmovz x1, #0forrendezvous::SENDandmovz x8, #0forSYSTEM_CALL_EXITas literal words, while the riscv64 andx86_64arrays shiftabi::rendezvous::SENDandabi::SYSTEM_CALL_EXITinto their immediates. A renumbering of either constant breaks one architecture silently. No test decodes any of the three arrays. Evidence:src/child_stub.rslines 22, 26 and 28 against lines 38, 44 and 56 to 58. Change:0xD280_0001 | ((abi::rendezvous::SEND as u32) << 5)and0xD280_0008 | ((abi::SYSTEM_CALL_EXIT as u32) << 5), and the decoding test of item 4. Door: two-way. Effort: XS. -
The text speaks to a reader inside nife. Finding: the sources carry 38
ยงcitations, 78 mentions of a milestone, 30 paths undernotes/, 18DECISIONScitations, and paths intokernel/,fixtures/,components/,script/lint,helpers/andpatches/. The standalone check counts 35 milestone citation lines, 32 section citation lines, 33 lines with a path into the tree and one line naming the architect outside aName:block (src/virtio.rsline 72). TheName:blocks, which carry the quotations and the dates, go at the move (the dry run strips all of them); the rest stays. A stranger following "see notes/user-mode-runtime.md" finds nothing. The two notes that explain the crate (337 lines) are the best documentation it has and are not in it. Evidence: every source file;src/virtio.rsline 72;notes/user-mode-runtime.mdandnotes/user-mode-runtime/time.md. Change: rewrite each doc comment to state the rule rather than cite the ruling: "the sixth word goes in as zero soreceive_messagereads 0 unless the kernel stamped a label" needs no section number. Move the two notes into the repository'sdocs/, trimmed of tree paths, and point the crate root at them. Keep the kernel-side facts a reader needs (which register the kernel writes, what maps the timebase page) as statements, not as paths. Delete the one line naming the architect. The externalized-crates lint is at its ceiling of five, so this lane also lowers that ceiling to zero. Door: two-way. Effort: M. -
Twenty-four acronyms are not expanded at first use. Finding: the template's acronym gate (ceiling zero, judged once per crate) reports
ABIs,EL0,EL1,EL2,CSR,MHz,TCG,HVF,TSC,TCB,GIC,TSS,ISA,COM1,PAL,SIGPIPE,UART,IPC,DMA,ELF,UDP,TSO,REXandSEND. The last is a method name in prose and wants a code span, not an expansion. Evidence: the gate's output. First uses are atsrc/lib.rsline 8,src/child_stub.rsline 2,src/clock.rslines 25, 39, 102, 175 and 271, andsrc/devices.rslines 25, 52, 56 and 69. They are also atsrc/entropy.rsline 14,src/inter_process_communication.rslines 80, 122 and 136,src/mapped_window.rsline 36, andsrc/process.rsline 176. The rest are atsrc/socket_frame.rsline 68,src/virtio.rsline 68, andsrc/child_stub.rslines 18 and 53. Change: expand each at its first use in the crate root or the README (the gate counts those for every file), or list the ones every reader knows in the repository'shelpers/prose_acronyms.toml. WrapSENDin backticks. Door: two-way. Effort: S. -
Frame::payload_readtrusts a reply length against the page, andFramecannot read the length field it can write. Finding:payload_read(n, out)clampsntoout.len()and then copies fromPAYLOAD_OFFSET_BYTES; annaboveDATA_MAXIMUMwith a buffer that large panics at the window's bounds check. The doc says "a peer's idea of a length is data", and the clamp is "the bounds check's first line", but it does not clamp to what the frame can hold. After #3517,RECEIVEis the only writer ofLENGTH_OFFSET_BYTESand its doc says a client "clears it before aRECEIVEto watch for the reply";Framehasset_lenand nolen, so the client it describes cannot watch. Evidence:src/socket_frame.rslines 92 to 110; #3517's change to theset_lendoc. Change:let n = n.min(out.len()).min(DATA_MAXIMUM);andpub fn len(&self) -> u16readingLENGTH_OFFSET_BYTES.lenis the standard library's spelling for a length, which the naming rules prefer. The peer-word ruling (ACCEPT's second reply word carries the peer's address and port) rides in the reply word, not the frame, soFramegains no field for it. A decoder for that word belongs insocket_contract, where the host tests are. The doc ofdst_ip/dst_port("the sender's after a UDPRECEIVE") stays true. Door: two-way (additions). Effort: XS. -
INITIAL_RAMDISK_VIRTUAL_ADDRESSis a literal here and a derived value in the kernel, and nothing checks they agree. Finding: this crate says0x2000_0000; the kernel saysaddress_space_layout::runtime_window(0x2000_0000). The doc says "must match" and no test asserts it (none found by search; unverified beyond that). After the move the two live in different repositories. Evidence:src/initial_ramdisk.rsline 34;kernel/src/user/loader.rsline 297. Change:address_space_layoutleaves before this crate (milestone 1017 (the contract crates leave in this order), step 3), so depend on it and define the constant as the kernel does, from one source; or have the kernel import this crate's constant. One of the two, not both. Door: two-way (both sides are nife's). Effort: XS.