1088. static_elf: what an outside maintainer would fix before it leaves this repository
Raised by a read-only review lane, when the crate was still named elf. A reviewer with no prior
exposure to this crate read crates/static_elf at the head of main (cf1328af6) in a fresh clone.
The reviewer read it the way a stranger meeting it in its own repository would. The review changed nothing; every item below is work for a later lane.
The crate has no review package. notes/crate-reviews/ holds no elf.md and
the index has no row for it, so there is no settled baseline of
names and decisions to leave closed. The one ratified name is the crate's own, static_elf,
recorded in src/lib.rs and ruled below; this block does not reopen it. The architect ratified the public names on 2026-11-21 (UTC), the three MACHINE_* constants and NATIVE_MACHINE included, and renamed Error::SegmentTruncated to Error::MemorySmallerThanFile and Error::BadProgramHeaders to Error::ProgramHeadersOutOfBounds; the source records each. The baseline the review
did take is milestone 784 (reuse what the tree wrote: which first-party code an existing library should replace)'s comparison of the crate against three readers.
That comparison measured fit, hostile input, proofs, cost and upkeep. It ended in the ruling that the crate
stays ours. The baseline also takes the order in which milestone 857 (crates released on their own) moves it.
Reuse: the template partsfoundry/crate-workflows and its scaffold, script/crate-review-packet,
script/crate-standalone, Kani, cargo-mutants, cargo-fuzz, the crate's falsification patches,
and milestone 784's probe script. No new tool.
Does it leave?
The rule: a crate leaves this repository only if it is publishable or used by more than one repository. Judged against both halves:
- Shared: yes, and on the kernel's critical path. Eleven packages link it
(
kernel,uefi_loader,components,jig,fixtures,system_tests,measured_boot,system_initializer,program_asks,process_builder,fuzz), all inside this repository. But milestone 1039 (the kernel leaves nife) requires every crate the kernel links to have left first, and the kernel's loader (kernel/src/user/loader.rs) is the main user. The progenitor, the shell,jigand the UEFI loader are not kernel code and link it too. So once the kernel moves, at least two repositories linkstatic_elf, and the kernel cannot move untilstatic_elfhas. The order the split already ruled meets the shared test. - Publishable: not yet. The crates.io name
elfbelongs to a different crate (0.8.0, 14.1 million downloads, 3.98 million in the last 90 days, measured from the crates.io API during this review), which is why the crate is namedstatic_elf. The review found the machine fixed to the build, the page size of the overlap check fixed at 4 KiB, 29 citations of this tree in shipped text, and no README, license file or manifest metadata. All of those are now fixed (Finding status); what remains for a release is the move's own items.
Verdict: a candidate to leave, on the shared ground, as a publish = false repository first, the
way the other extracted crates left. Publication is a separate later question, and the publishing
hold stands; nothing here lifts it. The P0 items are what the move needs. The P1 items are what a
first tag needs. The decisions section holds the three one-way doors a release would close.
Finding status
One line per finding, in the review's order. Items 1 to 4 are in the before-the-move appendix, items 5 to 11 in the before-the-tag appendix, and items 12 to 16 in the later-items appendix. The decisions and the release steps follow.
- Item 1 (P0), shipped text cites this tree: Done, #3642
and #3957, which moved the last provenance out of
prose into
Name:blocks. The move commit strips the blocks. - Item 2 (P0), fuzz seeds and target: At the move. The seeds live in
tests/fixtures/and the target looks up aGNUnote; theelf_parsetarget and itsfuzz/Cargo.tomlentry move to the new repository'sfuzz/, opted in since the crate has nounsafe. - Item 3 (P0), manifest and repository files: At the move. The manifest states every key as a
literal with
rust-version1.88, and the license files are in the crate (#3642); the scaffold'sCHANGELOG.md,SECURITY.md,CONTRIBUTING.md,deny.toml,_typos.tomland caller workflows come with the move. - Item 4 (P0), a public name says nife and the machine list is public: Done,
#3642. The guard is the test-only
unknown_machine. - Item 5 (P1),
page_rangepanics on a bad page size: Done, #3642.PageBytesholds only a power of two, and a harness quantifies over every one. - Item 6 (P1), the overlap check hard-codes 4 KiB: Done,
#3642.
Elf::parse_withtakes the loader's page size, and the kernel passes its frame size. - Item 7 (P1), four truncating casts: Done, #3565.
- Item 8 (P1),
Display,core::error::Errorand derives: Done, #3565. The consumers keep their own wording by design. - Item 9 (P1), the public vocabulary: Done, #3642, with the names ratified in #3877.
- Item 10 (P1), README, example, shared forge and stranger run: At the move. The README and
examples/parse_static_executable.rsare in #3642, and the sharedcfg(test)forge insrc/forge.rsis in #3957. The stranger run indocs/stranger-test.mdcomes with the move. - Item 11 (P1), the program-header index has no proof: Done, #3642. Nine harnesses, each with a falsification patch.
- Item 12 (P2), an entry in the zero-filled tail: Done,
#3642. Refused as
EntryNotExecutable. - Item 13 (P2), what the parser ignores is unwritten: Done, #3642. The README's "What it does not check", congruence included.
- Item 14 (P2),
segments()discards an unreachable error: Done, #3565. A comment states the invariant, andexactly_the_maximum_header_count_is_acceptedcounts. - Item 15 (P2), four mutation timeouts: Waiting on the first weekly mutation run in
nifeos/static_elf, which names the four for triage. - Item 16 (P2), the note padding rule differs from LLVM: Done,
#3957. LLVM's
ELFFile::notes_beginacceptsp_align0, 1, 4 and 8 and pads to the larger ofp_alignand 4, the crate's own rule, so the BUGS line goes and the docs state the rule. - D1, the machine as an input: Done, #3642, with
NATIVE_MACHINEratified as public in #3877. - D2, the policy stays inside the parser: Done, #3642.
- D3, the public names: Done, #3642.
- The crate name: Done, #3595.
- Review package: Done, #3877.
notes/crate-reviews/static-elf.mdlists the identity, the dependents, the checks and every public name. - Review clearance and name ratification: Done, #3877. The architect cleared the review on 2026-11-20 (UTC) and ratified the public names on 2026-11-21 (UTC).
Open decisions
None. Decisions for the architect below records the clearance and the names.
Goal
A stranger who finds the repository can tell in one screen that this is a validating front half of a loader for static ELF64 executables, not a general ELF reader. The same stranger can see which refusals are the ELF format's and which are this loader's policy. They can build it, run its tests, verify its proofs and replay one falsification from the README alone. The crate reads nothing outside its own repository, names no project but itself, and compiles for every target it claims without a width assumption it does not state. The public vocabulary follows the organization's naming rules before anyone outside depends on it.
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.
Findings
What each finding became is under Finding status above.
P0: before the move
The P0 items are in the appendix.
P2: later
The P2 items are in the appendix.
P1: before the tag
The P1 items are in the appendix.
Decisions for the architect
Each decision's background, options and prior art are in the appendix. The rules in force:
- The clearance of the review of
static_elfand its repository. Ruled 2026-11-20 (UTC), option A: the architect cleared the review package (notes/crate-reviews/static-elf.md) and gave the go fornifeos/static_elfas apublish = falserepository, with no tag and no publish. The architect ratified the package's public names on 2026-11-21 (UTC). The crate move runbook gives the steps after the move. The clearance gates milestone 1039. - D1, which machine the parser accepts. Decided by the maintainer on 2026-11-14 (UTC),
provisional, a two-way door before the first tag: option A.
Elf::parsekeeps the build's machine, a second constructor takes the machine, and three public machine constants carry theEM_spelling as#[doc(alias)].KNOWN_MACHINES,FOREIGN_MACHINES,NATIVE_MACHINEand the machine guard leave the public surface.NATIVE_MACHINEstays public, ratified so on 2026-11-21 (UTC): nine files outside the crate forge a header with it. - D2, whether the loader's policy stays inside the parser. Decided by the maintainer on 2026-11-14 (UTC), provisional, a two-way door before the first tag: option A. All five refusals stay, with no knobs, the overlap check's page size is an input, and the README lists the five as this loader's policy.
- D3, the public names. Decided by the maintainer on 2026-11-14 (UTC), provisional, a two-way door
before the first tag: option A, the appendix's table, with the ELF specification's spelling as
#[doc(alias)]and no alias of this tree's earlier spelling. - The crate name. Ruled 2026-11-14 (UTC), option A: the crate is
static_elf, in code and in package name, with nopackage =rename and nodoc(alias)of the old spelling. The repository, when the crate leaves, isnifeos/static_elf. The typeElfand every other public name keep their spelling, and the notes about the file format keep theirs. static_elfstays this project's own code, with no switch to theelforobjectcrates. Ruled 2026-11-19 (UTC), option A, on the measurements innotes/crate-reviews/static-elf-vs-dependencies.md. The ruling is open to revisit on either of two triggers:elfpublishes a release with the fixes and accepts our harnesses, orobjectoffers a build that needs no allocator. Either would come back as a new ruling under rule 6.- The crate keeps
static_elf, notstatic_elf64. Ruled 2026-11-19 (UTC): no 32-bit target exists, and the crate refuses ELFCLASS32 the way it refuses any other unsupported file. A future 32-bit crate would take the namestatic_elf32.
Done when
The checks are in the appendix.
BUGS
- Items 5 and 7 come from reading. The review installed no 32-bit target and wrote no failing test, so each is a hole in a claim rather than a defect shown.
- The prior-art rows for Linux and OpenBSD come from recall, not a re-read. A lane that cites them in the README reads the source first.
- The review did not run
script/crate-standalone, so the list of citations in item 1 is the packet's count (29 lines) and the lane doing the sweep will find the exact set. - The verdict that
static_elfleaves rests on milestone 1039's order (every crate the kernel links leaves first). If that order changes, the shared ground changes with it, and the publishable ground alone does not carry the move until D1, item 1 and the name all have rulings. - The P2 order is the reviewer's guess at what a user asks for first; nobody outside has asked.
Follow-on
- Outstanding. Every finding that Finding status above marks At the move or Waiting, each with what remains.
Index row
An outside reading of static_elf (then named elf) before it leaves. The crate leaves on the
shared ground: the kernel links it and must follow it out. What remains is the move's fuzz target,
scaffold and stranger run, and the triage of four mutation timeouts in the new repository's first
weekly run. The architect cleared the review (2026-11-20 UTC), gave the go for the repository and
ratified the public names (2026-11-21 UTC).