P1: before the move, and one before the next bench evening
An appendix to the milestone.
-
The crate answers half of the kernel's question, and
card_checksays SEALED for a card that DONE (stale_malformed_and_missing_loader_words_are_refused;card_checkreads the third file). halts. Finding: since the kernel began taking two digest words from the loader (nife.progenitor,nife.base),kernel::trust::requireholds the progenitor to the loader's word before the trust root.require_program_measurementsholds the table to the second word. A missing or disagreeing word halts atMEASURED BOOT REFUSEDlike a digest mismatch. On a card the words travel as a third file,nife-initial-ramdisk.img.loader-digests, and asusr_bootargsin the boot environmentscript/board-imagewrites.inspectreads two inputs and never the words;card_checkreads onlynife-vf2.imgandnife-initial-ramdisk.img, and its fix text says to copy "the set" of two. A card whose kernel and archive are one build and whose words are another's reads as SEALED and halts after the power cycle, which is the walk to the board the crate exists to save. The stick has cover, becauseuefi_loader/build.rschecks the words against the archive before embedding them, and the QEMU paths write the words beside the archive they pack. The crate'sBUGSnames boot scripts andextlinux.confand not this. Evidence:kernel/src/trust.rslines 1 to 9, 39 to 42, 83 to 87 andrequire_from_loader;script/board-imagelines 256 and 293;crates/sealed_pair/src/lib.rslines 8 to 13 and 276 to 310;xtask/src/card_check.rslines 23 to 24 and 213 to 262. Change: a third question beside the two:inspect_words(words: &str, archive: &[u8]) -> WordsSeal(or anOption<&str>third argument toinspect, which the two existing callers pass asNonefor the stick andSomefor a card). Parse the words withmeasured_boot::loader_digests::parse, so this crate refuses a word the kernel would refuse and gives the kernel's reason. Compare the result to the archive'sprogenitorand table digests.Sealgains the verdict,is_sealedincludes it,explainsays which word disagrees, andcard_checkreads the third file when it is there and says the set is three files. Add the gap toBUGSuntil the change lands. Door: two-way (an API addition before any release). Effort: S. -
A table line the parser rejects makes the tool report the whole table unreadable, and the words say DONE (
a_bad_table_line_is_reported_and_does_not_condemn_the_console,a_table_that_is_not_utf8_is_still_unreadable). the progenitor will read an empty table. It will not. Finding:inspect_tablereturnsTableSeal::Unreadableon the first bad line, andexplainprints "the progenitor measures against an empty table and refuses the console". The progenitor reads the table throughmeasured_boot::verdict, which reachesexpected_in_manifest, which flattens the parse and skips a bad line; only the program that line named gets refused, and the console boots when its own line is good.TableSeal::Unreadableis accurate for bytes that are not UTF-8 (boot_steps.rsmakes those the empty table) and inaccurate for a bad line. The host check is stricter than the board, which is the safe direction, and the report sends a person to fix the wrong thing. Such a table reaches a card only by hand, becausekernel/build.rspanics on the same line at build time. Evidence:crates/sealed_pair/src/lib.rslines 110 to 112, 200 to 207 and 321 to 329;crates/measured_boot/src/lib.rslines 426 to 432;crates/system_initializer/src/boot_steps.rslines 183 to 188 andmeasurement.rsline 16. Change: keepUnreadablefor the UTF-8 case. AddTableDisagreement::BadLine { line: String }for each bad line.progenitor_refusescounts it (the program on that line is gone), andexplainprints it with the line and the parser's reason, in the wordsBadLinealready carries. One test with one bad line beside a good console line, asserting that the console is not named. Door: two-way. Effort: S. -
The crate does not stand alone, in the ten ways the template's checker lists. LEFT: move preparation waits for the move, which Decision A orders after
nifefs,measured_bootanduefi_loader. Finding:standalone.pyreports no README, noLICENSE-MIT, noLICENSE-APACHE, a license field inherited from the workspace, and norust-version. It also reportspublish = falsewith a comment that points atcrates/publish-allowlist.txt,lints.workspace = true, five lines that cite a path into this tree, one provenance block and six milestone citations. TheCargo.tomlhas nodescription,repository,keywordsorcategories. These are the move lane's ordinary items; they size the move. Evidence:crates/sealed_pair/Cargo.tomllines 1 to 10;src/lib.rslines 6, 13, 15 to 16, 24 to 27, 31, 238 to 239, 247 to 248, 312, 362 to 363. Change: at the move, add the scaffold's files, measurerust-versionby a build, and inline the lints. Rewrite the citations as the crate's own words (the kernel's behavior stated, not a milestone named). Strip theName:block as the move rule says. A README with## EXAMPLES(the two doctests, which already exist) and## BUGS(the four entries plus item 2). Door: two-way until the tag. Effort: S. -
BOOT_PROGRAMSrestates a stringmeasured_bootalready owns. DONE (the_boot_programs_are_the_measured_boot_names). Finding:BOOT_PROGRAMSis["progenitor"], a literal, whilemeasured_boot::PROGENITORis the constant the kernel (PROGENITOR_ENTRY) and the loader read.notes/sealed-pair.mdargues for one list so a kernel cannot measure a name the checkers do not know; the list's one member is a second copy of that name. A rename of the entry would change the kernel and leave this crate reading a name no archive carries, and every archive would then beNoProgenitor. Evidence:crates/sealed_pair/src/lib.rsline 28 and line 278;crates/measured_boot/src/lib.rsline 381;kernel/src/user/progenitor_boot.rsline 16. Change:pub const BOOT_PROGRAMS: [&str; 1] = [measured_boot::PROGENITOR];andinspectreadsmeasured_boot::PROGENITORwhere it means the progenitor. No behavior changes today. Door: two-way. Effort: XS. -
The notice constant is a sentence, and it names a board in a crate that also judges QEMU images. DONE (
AUTHORITY_NOTICE, provisional; the text says "the kernel"). Finding:THE_BOARD_IS_THE_AUTHORITYis a&strholding two sentences. A constant's name says what it holds. This one is the opening of its own text. It has a leadingTHE_the naming page refuses for assertion constants, and it says "board" where the crate's documentation says "kernel" (its own doc comment on the same item says the kernel is the authority).card_checkprints it after every refusal. Evidence:crates/sealed_pair/src/lib.rslines 238 to 242;xtask/src/card_check.rsline 79. Change: a name for what it is,AUTHORITY_NOTICE, with the text saying "the kernel" where it says "the board", as decision B decides, provisionally. Door: two-way until a release; a published name after. Effort: XS. -
EntrySealcan say "refused" with no digest, and the report then prints an empty hash. DONE (Vouchcarries the digest; the impossible pair no longer compiles). Finding:digest: Option<Digest>andvouch: Vouchare independent public fields.inspectnever buildsvouch: Vouch::Nowithdigest: None, but the type allows it, a test builds it, andexplainprints "hashes to , which is not in the kernel image's trust root" for it. Evidence:crates/sealed_pair/src/lib.rslines 80 to 87, 182 to 189 and 484 to 489. Change: carry the digest in the variants that have one:Vouch::Yes(Digest),Vouch::No(Digest),Vouch::Absent, and drop thedigestfield. The test that builds the impossible pair then fails to compile, which is the point. Door: two-way. Effort: XS. -
The refusal text asserts a cause. DONE (
a_kernel_from_another_build_is_refused_and_the_refusal_names_the_entryreads the new text). Finding:explainsays "They are from different builds" for everyVouch::No. One flipped byte on a card produces the same verdict, and the crate's own testone_stale_half_is_named_on_its_ownbuilds that case. Milestone 563 (A seal check that reads bytes cannot see a check that was dropped) recorded the same sentence as false for a diverted build, and itsBUGSentry stands. Evidence:crates/sealed_pair/src/lib.rslines 177 to 181;design/roadmap/0563-a-seal-check-that-reads-bytes-cannot-see-a-check-that-was-dropped.md, "Why the tool then says the wrong thing". Change: say what the tool knows: "the kernel image does not carry the digest of this archive'sprogenitor", then the two usual causes (a kernel and an archive from different builds; a copy that changed one of them) as causes, and the halt as the consequence. Door: two-way. Effort: XS. -
One British spelling in a public parameter. DONE (
build, provisional). Finding: the one parameter oftest_support::pair, a&str, is spelled the British way. The naming page spells every name the American way and the template'sbritish_spelling.pyrefuses it at a ceiling of zero, so the template'scheckjob would be red on the first push. The parameter is public because the module is. Evidence:crates/sealed_pair/src/lib.rslines 406 and 410. Change:build: &str, which is what the argument names (one build's pair against another's), as decision B decides, provisionally. Door: two-way until a release. Effort: XS. -
Unreadableis not astd::error::Error, and itsDisplayprints aDebugform. DONE (an_unreadable_error_is_a_std_error_in_words). Finding: the crate is astdcrate (String,Vec,std::fmt::Write) whose one error type implementsDisplayand notstd::error::Error, so a caller cannot put it in aBox<dyn Error>or behind?in amainthat returns one.NotAnArchivewrites{e:?}becausenifefs::Errorhas noDisplay, so the text reads "not a nifefs archive (Truncated)". Evidence:crates/sealed_pair/src/lib.rslines 45 to 63. Change:impl std::error::Error for Unreadable {}; amatchovernifefs::Error's six variants with one phrase each ("the image is shorter than the directory", and so on), or aDisplayonnifefs::Erroritself, which is that crate's call. Door: two-way. Effort: XS.