roadmap

P2: later

An appendix to the milestone.

P2

  1. find_file trusts its caller's name length. DONE (a name longer than the field is None; the_directory_lookup_is_total). :412-413 reads entry + name.len() when name.len() != NAME_LEN, so a name longer than nifefs::NAME_LEN would read the next entry's bytes. Both callers pass four- and seven-byte literals. The fix: debug_assert!(name.len() <= nifefs::NAME_LEN), or a &[u8; N] parameter. Effort: S. Two-way.

  2. disk_size_bytes multiplies without a bound and ignores the configuration generation. DONE (the size saturates, and the driver reads the capacity inside one generation; the kernel's mediated PCI transport answers 0 for the generation, a BUGS entry at CONFIGURATION_GENERATION). (sectors * 512) as i64 (:1165) overflows past 2^55 sectors and goes negative past 2^54, which the FS server would read as an error code. The code reads the two 32-bit halves of the 64-bit capacity without the ConfigGeneration register (virtio-mmio 0x0fc, virtio 1.2 table 4.1), and that register makes a multi-word configuration read consistent. No QEMU disk reaches either. The fix: checked_mul with a saturating fallback, and a generation-bracketed read when the direct grant lands. Effort: S. Two-way.

  3. One request in flight, one interrupt per request, on the production path. DONE (the doc of submit in components/src/block_driver_roles.rs records the shape and the block figure). Every submit reuses descriptor head 0 (:441, :1122) and the block server waits on the interrupt for each request (:986-1008). notes/virtual-io.md records that the mount's read count stays in the low hundreds, so this fits the watchdog. It is still the slowest shape a virtio-blk driver can take, and the first thing a reader from Linux or Redox asks about. This review proposes no change; the figure belongs beside the storage benchmarks, so the shape becomes a recorded choice. Effort: S. Two-way. Inferred from reading.

  4. run_attack keeps a parameter it does not use. DONE. :341 discards direct_memory_access_phys with let _ = after never using it; run_attack_indirect (:386) does the same after using it at :370. The first should take _direct_memory_access_phys; the second should drop the line. Effort: S. Two-way.

  5. wait_receive has a bound and complete_block has none. DONE (a test role gives up after 64 wakeups and reports 0xEB; the block server waits without a bound, and its doc says why). The net loop gives up after 64 wakeups (:803) and reports 0xE9; the disk loops forever (:488). A one-shot test role on a device that never completes hangs the suite past the watchdog instead of reporting. The fix, with item 7's single complete, is one bound for both. Effort: S. Two-way.

  6. The register map has no check against a second driver. Open (read against virtio-drivers 0.13 and the virtio 1.2 tables: the MMIO and PCI common-configuration offsets, status bits, feature bits, descriptor flags, device IDs, block request types and GPU commands all agree; the recording-transport test is not built). Before anyone cuts the library that holds the name virtio, check nife's virtio register offsets, feature bits and device configuration layouts against rcore-os/virtio-drivers 0.13 (MIT). The constants live in moho_abi::virtual_io, components/src/block_driver_roles.rs, components/src/virtual_io_net_transport.rs and kernel/src/virtual_io. Its fake transport (src/transport/fake.rs) is the model: a host test drives each nife constant through a transport that records every read and write, and compares the offset and width with the specification's table. Each disagreement is a finding. virtio-drivers is not a dependency candidate. It places its own rings, and nife's validator proves one fixed layout. Its begin_init sets FEATURES_OK and never reads the status back, which the specification requires (virtio 1.2 section 3.1.1 step 6). Effort: S to M. Two-way.