423. A checked direct-map reader for the x86 ACPI walk
The decision is
§192 (does the ACPI walk's direct-map read take a bound, and is the bound per-read or a region it holds?).
The architect ruled on 2026-10-27 (UTC): shape 2. The walk holds one region, an extent the boot path gives it once, and checks every read
against that extent. The accessor is a new item at a trust boundary. Its name ships provisional and
goes through script/names.
Premise re-checked 2026-09-19 and still true, and this block subsumes milestone 431 (acpi).
kernel/src/arch/x86_64/machine.rs is 847 lines with no bounded accessor: read_acpi still takes a
firmware-supplied hint and each table body is still a raw pointer plus a length the table itself
supplied. crates/machine_discovery is proved (21 harnesses, its own script/verify row), so the
narrowing this block is built on holds.
Milestone 431 is SUPERSEDED by this block and by milestone 319 (the crate that parses firmware had no), because its surviving claim is
this block's.
In brief
Milestone 304's lane named kernel/src/arch/x86_64/machine.rs's ACPI walk as its strongest
remaining target and declined to take it. 836 lines over firmware-supplied lengths, checksums and
counts. Its volatile half reads raw pointers into the direct map. It called finding that seam a
design question rather than a mechanical one, and was right.
Milestone 319 changed the size of the question rather than answering it. §192 says what milestone 319's proof moved out of the kernel. What is left on the kernel side is one operation repeated. Read N bytes at a physical address through the direct map and hand them to a parser. The 836 lines are mostly the walk's sequencing, and the part that is a trust boundary is a single accessor.
The question
Does that accessor take a bound, and what does it do when the bound is exceeded?
Today each read is a raw pointer plus a length the table itself supplied. An RSDT whose length
field says 64 KiB is a 64 KiB read at whatever physical address the RSDP pointed at. §192 states the gap.
The analogous question is answered on the other two architectures. dtb::Dtb::from_ptr takes the
blob's own length, validates the header before anything else is read. Every reader below it is
proved total (be32_is_total, be64_is_total, milestone 18 (verify the capability core)). The x86
walk has no equivalent,
because ACPI is not one blob. It is a linked structure of independent tables, each reached from a
physical address inside another one.
What is in scope
- A bounded read against the direct map's own extent, so a firmware length cannot name memory outside it.
- Whether the bound is per-read or a region capability the walk holds, which is the part that could go either way and is why this is a decision.
- The accessor's name, which is an architect's and which this proposal deliberately does not guess at.
What is out of scope
The parsers. They are proved (milestone 319, fifteen harnesses), and three defects came out of that; nothing here should re-litigate what a table means.
What is blocked until it is answered
Nothing is blocked. This is the last unproved reach of the x86 discovery path, and it is the one place left where a firmware number reaches a dereference with no proved step between.
Follow-on
- None.
Index row
Milestone 304 (cargo kani -p kernel only ever compiled) named the ACPI walk in kernel/src/arch/x86_64/machine.rs as its strongest remaining
target and declined it: 836 lines over firmware-supplied lengths, checksums and counts, whose
volatile half reads raw pointers into the direct map. Milestone 319 shrank the question by proving
crates/machine_discovery, so what is left on the kernel side is one operation repeated: read N
bytes at a physical address through the direct map and hand them to a parser. An RSDT whose length
field says 64 KiB is a 64 KiB read at whatever the RSDP pointed at. The other two architectures
answer it: dtb::Dtb::from_ptr takes the blob's own length and validates the header first. The
ruling is shape 2, a region the walk holds, and the accessor's name is an architect's.