roadmap BUILT

763. A destroyed region cannot take a live space's page tables with it

Approved by calef on 2026-10-05 (UTC) as a follow-on of milestone 762 (a mapping cannot outlive its frame's revoke), whose revoke::revoke_region BUGS recorded the hole. Built in #1665. (Title and slug are drafts.)

Why

PageFrame::MAP and MemoryRegion::MAP build the intermediate page tables a mapping needs out of a region the caller names, which need not be the space's own, and nothing recorded them. MemoryRegion::DESTROY unmapped every leaf the mapping log held in the region and handed every page back, tables included, while the space still linked them. The next owner of such a page writes that space's translations: fatal risk 7's confinement claim, one level up the page table from 762.

Reuse

This is kernel code on the confinement path, where §46 (thin primitives or whole subsystems) says write it. Inside the tree, the mapping log, 762's hold and flush_asid were reused rather than given a second registry, lock or flush; the cut is the one new walk, in crates/page_tables beside unmap.

What was built

Falsification

system_tests/falsifications/user.page_table_region_tests.a_destroyed_region_takes_no_live_spaces_page_tables_with_it.patch leaves the records and cuts nothing. Replayed red on aarch64 at the predicted assertion. 762's MemoryRegion::MAP patch no longer applied to the new memory_region_map and was re-cut; it replayed red on aarch64 at its own headline.

Cost

aarch64 icount (script/bench), against 762's tip: spawn_el0 1,426,806 to 1,425,693 ticks (-0.1%), map_el0 353,554 to 354,085 (+0.15%, about one tick a map), every other row within a few hundred ticks of noise or lower. riscv64 and x86_64 pass script/bench --check. One scan finds both kinds: a second scan of every log after the leaf pass costs spawn_el0 3,072 ticks a spawn (+21.5%) and fails CI's tripwire.

Gates

BUGS

Follow-on

Index row

A region's DESTROY no longer hands back page tables a live space still walks. Tables that PageFrame::MAP and MemoryRegion::MAP build from a caller-named region are recorded in the space's mapping log, and the destroy cuts each one out of the walk before the page goes back. Driven red on aarch64 first; the root of a space is milestone 765.