roadmap BUILT

1085. device_tree_blob: what an outside maintainer would fix before it leaves

Raised by a read-only review of device_tree_blob as a stranger to this tree would meet it, on the assumption that the crate leaves for its own repository under the shared template (milestone 857 (crates released on their own), item 4). It changes nothing; it lists what the lanes that move the crate change, and what the kernel should take from the list whether or not the crate moves.

The crate has no review package under notes/crate-reviews/, so the baseline this review takes is the names already ratified at the item (device_tree_blob, DeviceTreeBlob, initial_ramdisk), the provisional name recorded there (boot_arguments), and the bounds notes/device-tree.md records. nife keeps this crate as its device-tree parser and does not switch to Google's dtoolkit (ruled). The crate boots every nife machine and is a release candidate of its own, so the correctness items below (P1-1 to P1-4) sit in the kernel's path and in what the release publishes.

Reuse: the template partsfoundry/crate-workflows and its scaffold, its naming and standalone helpers, cargo-mutants, Kani, cargo-fuzz and the crate's own Blob builder in tests/hostile.rs. No new tool.

Finding status

One line per finding, in the review's order. The P0 and P1 ids are in the appendix, the P2 ids in the later items, and D1 to D6 under Ruled decisions. The crate lives in partsfoundry/device_tree_blob.

Ruled decisions

Spell prop out as property (D1)

Ruled 2026-11-19 (UTC): option A. The lookups spell property out, with no alias for the old prop spelling: node_property, node_properties, node_property_compatible, parent_property_compatible, node_property_inherited and pointer_handle_property (below). The six names stand as built. The naming rules spell out a word that needs a decoder, and the Devicetree Specification says "property"; prop is libfdt's C spelling (fdt_getprop).

Door: one-way at publish. Prior art: the fdt crate and dtoolkit spell property() and properties(); libfdt abbreviates. nife differs from libfdt only where C's short names were a constraint. Example: tree.node_property(b"chosen", b"stdout-path").

Spell phandle out as the pointer handle

Ruled 2026-11-19 (UTC): the specification's expansion of phandle is "pointer handle", and the lookup spells it out as pointer_handle_property(pointer_handle, name). It carries #[doc(alias = "phandle")], a search aid for the specification's term and not an old nife spelling. Its doc comment opens with the expansion and cites the Devicetree Specification. The ratification is the same as D1's, as built.

Spell reg out as the register regions (D3)

Ruled 2026-11-19 (UTC): option B. The two lookups that decode a node's reg spell the term out as node_register_regions and node_register_regions_compatible. Each carries #[doc(alias = "reg")], a search aid for the specification's term and not an old nife spelling, and its doc comment opens with the expansion ("register regions") and cites the Devicetree Specification. The old node_reg spellings have no alias. The rule matches pointer_handle_property.

Door: one-way at publish. Prior art: the fdt crate's NodeProperty::reg() keeps the specification's spelling. nife spells the term out and carries the specification's term as a doc alias. Example: a search for "reg" lands on node_register_regions, and tree.node_register_regions_compatible(b"arm,pl031", &mut regions) reads the register regions of a PL031.

Add the unit to the total size limit (D4)

Ruled 2026-11-19 (UTC): option A as amended. The limit is MAXIMUM_TOTAL_SIZE_BYTES, with the words separated and the unit last, which matches the existing total_size() method. It carries #[doc(alias = "MAX_FDT_SIZE")] and #[doc(alias = "totalsize")]. The header field's own spelling, totalsize, stays in doc comments, in backticks. A limit ends with its unit.

Door: one-way at publish. Prior art: Linux's MAX_FDT_SIZE, which lends its value; dtoolkit has no ceiling. Example: if total > MAXIMUM_TOTAL_SIZE_BYTES { return Err(Error::TooLarge(total)) }.

Name the reservation block memory_reservations (D5)

Ruled 2026-11-19 (UTC): option A. memory_reservations, the specification's term for the memory reservation block, stands as built. reserved_memory_regions keeps its name for the /reserved-memory node's children, and the old reserved_regions has no alias. Two lookups read two sources, and the kernel calls both, so the names say which is which.

Door: one-way at publish. Prior art: the fdt crate's memory_reservations(), libfdt's fdt_get_mem_rsv, and dtoolkit's reserved_memory() for the node. Example: tree.memory_reservations(&mut out) beside tree.reserved_memory_regions(&mut out).

Keep from_pointer as the crate's one unsafe function (D6)

Ruled 2026-11-19 (UTC): option A. DeviceTreeBlob::from_pointer stays the crate's one unsafe function, and the weekly public fuzz opt-in stays off. The tree's own fuzz host keeps the target. The constructor spells ptr out and carries #[doc(alias = "from_ptr")], a search aid for the standard library's spelling and not an old nife spelling. It reads the header through a raw pointer, checks the magic, caps the size at 2 MiB and builds the slice. Sixteen call sites outside the crate use it: nine in kernel/, four in uefi_loader/, two in machine_discovery and one in a board-check tool. Because of it, the template refuses the public fuzz opt-in (P1-5). The one place that knows how to trust a firmware pointer is the parser.

Door: one-way at publish, since an unsafe constructor is a published contract. Prior art: fdt::Fdt::from_ptr and dtoolkit::Fdt::from_raw are unsafe constructors in the parser crate. nife differs in nothing here. Example: unsafe { DeviceTreeBlob::from_pointer(pointer) }? stays one line in the kernel.

Keep device_tree_blob and release it

Ruled 2026-11-25 (UTC): nife stops working toward Google's dtoolkit as its device-tree dependency and keeps its own device_tree_blob, which lives at partsfoundry/device_tree_blob. The crate is a release candidate of its own, under the standing publishing hold. This replaces the ruling of 2026-11-11 (UTC) to contribute five gaps to dtoolkit and switch once a release ships them, and the wait for that release ruled 2026-11-19 (UTC).

dtoolkit set a high quality bar, and contributing to it went well. Two things decide against it. Upstream moves too slowly, and it has not shown that it wants the features nife needs: lenient reading of firmware trees that do not conform to the specification, and adding a child while editing a tree in place. And taking it would add zerocopy, zerocopy-derive and thiserror (two proc macros, ten crates in all) to a kernel graph that holds four crates and no proc macro. The issue nife opened upstream, google/dtoolkit #103, stays as it is.

Door: two-way, since a later ruling under ยง46 (thin primitives, whole subsystems and everything in between) can still take dtoolkit; the release that publishes the crate is the one-way step. Prior art: Linux, U-Boot and FreeBSD each vendor libfdt (scripts/dtc/libfdt, sys/contrib/libfdt; recalled, unverified) rather than keep their own parser. nife differs by keeping a parser held to its own bar of proofs, a bounded walk and three architectures, which no upstream it measured meets with a graph this small. Example: the kernel keeps unsafe { DeviceTreeBlob::from_pointer(pointer) }?, and P0-1, P1-5 and the P2-9 README stand as the release's own.

Write the review package now; the move is not held for dtoolkit

Ruled 2026-11-19 (UTC): option A. A lane writes the device_tree_blob review package under notes/crate-reviews/ now. The move does not wait on dtoolkit. The architect gives the clearance, the go to create the repository, once the package exists.

Door: two-way until the repository exists. Prior art: file_allocation_table and e1000e cleared from a written package. Example: F-package and P0-1 each get a lane.

Clear the device_tree_blob package for the move

Ruled 2026-11-20 (UTC): option A. The review package is cleared. The repository, now partsfoundry/device_tree_blob, is a go, with publish = false, no tag and no publish. The crate move runbook gives the steps after the move.

Door: two-way until the repository exists. Example: the move lane creates the repository and lands P0-1, P1-5 and the renames there, as the package lists them.

Property is spelled out across the crate

The crate spells property out in every public item, parameter and doc comment. The one prop left is the private Blob::prop test builder in tests/hostile.rs, which is not public.

Door: one-way at publish. Prior art: libfdt's fdt_node_offset_by_phandle and the fdt crate's find_phandle keep the abbreviation; neither spells the specification's expansion. nife differs because its naming rules spell out a word that needs a decoder, and the alias keeps the term searchable. Example: tree.pointer_handle_property(pointer_handle, b"#interrupt-cells").

Name the needle parameter compatible (D2)

Ruled 2026-11-19 (UTC): option A. The three lookups that take a needle name the parameter compatible: &[u8], the property's own name in the Devicetree Specification, ratified as built. Rustdoc shows parameters, and compat needs a decoder.

Door: two-way, since a parameter name is not part of the call. Prior art: fdt::Fdt::find_compatible(with: ...) and dtoolkit's is_compatible(&self, compatible: &str). Example: tree.node_reg_compatible(b"arm,pl031", &mut regions).

Open decisions

There are none.

Goal

A stranger who finds device_tree_blob can tell in one screen what it reads and what it refuses. The same stranger can build, test, prove and falsify it from the README alone, meets the same answer from every lookup for the same shape of tree, and finds no sentence that only a nife contributor can follow. The new repository's required checks are red only for the crate's own reasons.

What was checked, and how

The tools run, the sources read and what was not run are in the appendix.

Prior art

The comparison with nearby work is in the appendix.

The items

Each item states what is wrong, where, why it matters, the fix, effort (S/M/L), and the door. A name, layout or dependency that the move publishes is a one-way door; everything else is two-way. P0 and P1 are in the appendix, and P2 is in the later items.

Done when

The checks are in the appendix.

Follow-on

BUGS

Index row

An outside review of device_tree_blob before it leaves. Three day-one gate failures come first (the manifest, the nife-only prose, 29 refused names). Five items come before the tag. They are a prefix lookup that contradicts its siblings, a reserved-memory match at any depth, unchecked cursor arithmetic on 32-bit targets, a walk that is not confined to the structure block, and a fuzz target that does not move. Fourteen smaller items follow, and the architect ruled all eight decisions.