roadmap NOT-STARTED

200. A virtual address and a physical address stop being the same type

The question "what is wrong with the tree-wide refactor" has no answer on merit, so the refactor is a milestone.

Nothing needs deciding. The names are ratified below and the sequencing constraint is practical rather than a fork.

In brief. Physical and virtual addresses are bare u64 everywhere in this tree: paging, memory_regions, kernel/src/arch/*/mmu.rs, kernel/src/user.rs, system_call.rs. Nothing stops one being passed where the other is meant, and the mistake compiles, runs, and passes tests wherever the two happen to be equal.

The motivating defect, which is recorded rather than hypothetical

notes/higher-half.md has it. A test dereferenced the device tree's physical address, and the identity map made it work by accident:

That's a test dereferencing the device tree's physical address. Before, the identity map made it work by accident. Now, a low address does not exist, and the mistake faults on the spot with the offending address printed.

-- notes/higher-half.md

The same note names the general shape and its consequence: "an identity map that lingers is an identity map that hides physical/virtual confusion, right up until userspace shows up and the confusion becomes a security hole."

That is the whole case. The mistake compiled, ran, passed, and was caught by an accident of the address space going away rather than by anything asking. A type asks.

This is also the shape DECISIONS §134 (a harness carries a machine-replayable falsification record) and milestone 191 (did the proofs catch the bugs?) have been circling all week: a defect no proof was positioned to see, in code no harness reaches, prevented instead by making it unsayable. AGENTS.md's ladder puts that at rung one, above a gate and far above a comment.

The names, ratified 2026-08-31

type what it is
VirtualCpuAddress virtual, as the CPU sees it
VirtualDeviceAddress virtual, as a device sees it: the IOVA the IOMMU translates
PhysicalMemoryAddress the one physical reality both translate into

Two virtual views, one physical fact. The asymmetry says something rather than being untidy: physical takes no view qualifier because there is only one physical address space, shared by the CPU and by devices after translation. notes/iommu.md's identity-mapped domain is that statement made concrete, since IOVA == PA there.

Refusals, kept because they are the half a future proposer needs:

Where the types stop, and this is the design work

System call arguments are u64 by ABI, so the wrappers cannot cross the system call boundary. That edge has to be designed rather than discovered: the conversion belongs at the entry point, once, where a reader can see the untyped word becoming a typed address and check the claim being made about it. Everything above that line should be typed; nothing below it can be.

VirtualDeviceAddress has no consumer today, because IOVA == PA under the identity map. Introduce it anyway or leave it for milestone 143 (silicon IOMMU): this block does not decide, and the case for introducing it now is that the type is what makes the identity mapping's assumption visible instead of implied.

Sequencing, which is the only real constraint

The blast radius is paging, memory_regions, three arch/*/mmu.rs, kernel/src/user.rs and system_call.rs, and kernel/src/user/tests.rs is the merge hotspot AGENTS.md already names. Do this when kernel/src is quiet, not while lanes are open in it.

Kani was checked first, and it is clear. Milestone 193 (put kernel/src within reach of the prover) landed harnesses proving run arithmetic over system_call.rs in u64, so a newtype that confused CBMC would cost this milestone those proofs. Measured 2026-08-31 rather than assumed: a probe crate stated milestone 193's own run_end_virtual_address property twice, once on bare u64 and once through a repr(transparent) VirtualCpuAddress, both in u128 so neither harness could repeat its implementation back at itself.

VERIFICATION:- SUCCESSFUL, 2 of 2, 0.068s for both. The wrapper adds no measurable solver cost, which is the number that mattered against script/verify's ~650 seconds.

Two things the probe settles for whoever builds this:

BUGS

Index row

"What is wrong with the tree-wide refactor" has no answer on merit. Physical and virtual addresses are bare u64 across paging, memory_regions, three arch/*/mmu.rs, user.rs and system_call.rs. The confusion is recorded rather than hypothetical: notes/higher-half.md has a test dereferencing a physical address that the identity map made work by accident, and names the consequence as a security hole once userspace exists. Names ratified: VirtualCpuAddress, VirtualDeviceAddress, PhysicalMemoryAddress. Two virtual views, one physical fact. Do it when kernel/src is quiet, and check Kani first.