Repository navigation
Commit a97ff80
authored
Carries what closed pull requests #601 and #556 left worth keeping.
## Sources
- #601, `wt/toyos-s0` at 44eb3c2: the T14's and the TCG model's Linux
captures, in `toyos-t14linux/s0/{t14,tcg}/`.
- #556, `wt/toyos-release` at d30dfff: the three issue files the triage
named.
## What changed, per decision
**Only the Linux readings `toyos-cpuvuln` must agree with are committed,
and a test reads each one.**
- `toyos-cpuvuln/fixtures/t14/cpuid.txt`, `msr.txt` and `cpuinfo.txt`
are read by `the_t14s_facts_are_linuxs_reading_of_it`. It reads them the
way `Facts`' docs say Linux does:
- a leaf past its range's highest reads as 0;
- `ARCH_CAPABILITIES` counts only where CPUID.(7,0):EDX[29] enumerates
it;
- `MCU_OPT_CTRL` counts only where `GDS_CTRL` does.
- It also holds:
- `Ident::new` to cpuinfo's family, model and stepping;
- the microcode revision to both cpuinfo and MSR 0x8B;
- `decide(&T14)`'s `vmx` to cpuinfo's `vmx` flag;
- its `spec_ctrl` to MSR 0x48.
- Every MSR and cpuinfo field the test reads must hold one value on
every CPU.
- `toyos-cpuvuln/fixtures/tcg/console.txt` is read by
`the_tcg_models_signature_gives_its_lines`. It takes its lines from the
console's vulnerabilities lines. `fixtures/tcg.txt` was a second copy of
those lines, so it goes.
- The comparison found no disagreement.
- Deleted: `t14/`'s `cmdline`, `config-hardening`, `config-sha256`,
`dmi`, `kernel-log`, `mmap_rnd_bits`, `packages`, `uname` and `version`,
and `tcg/qemu-version`. No test reads them, and none is a reading the
classification must agree with. #601's head keeps them at 44eb3c2.
- The four kept files are #601's blobs at 44eb3c2: `git hash-object`
against `git rev-parse 44eb3c2:toyos-t14linux/s0/<path>` finds 0
mismatches. None holds a NUL, so `src/sourcegate.rs` declares none.
**The TCG fixture is held to the CPU its console names, not to the
gate.** The capture records the `-cpu` only in `tcg/SOURCE`'s command
line, and `qemu-version.txt` was QEMU's reading, not Linux's. So the
test holds the fixture to neither a QEMU pin nor `src/arch.rs`'s model,
and the renamed issue no longer calls it the PR gate's model. If the
`-cpu` or the QEMU version moves, the fixture stays Linux's verdict on
the CPU it names.
**Each `SOURCE` keeps the provenance beside its bytes.** The capture's
QEMU version and times are in 3854054's commit message.
**The Linux-readings issue is renamed** to
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-lack-reads-owed-before-the-t14s-wipe.md`,
and its heading changes to match. Its four path citations move, and `git
grep HEAD` finds the old slug nowhere.
- The body names the fixtures and the two tests that hold `T14` and
`TCG` to them.
- The exit wants each owed reading committed with the test that reads
it, and `T14`'s `feat_ctl` held to 0x3A.
- No test reads a config hash any more, so the mutation is now a one-bit
change to an added reading.
- The owner is the orchestrator, which holds the T14.
`issues/filesystem/a-cached-read-from-a-file-server-is-measured-only-under-tcg.md`
names its owner the same way.
**#556's loader defect is deleted.** Stage 2 of
`issues/boot-media/the-loader-does-only-what-must-precede-the-handover.md`
already owns its fix (the bullet at :86) and its exit (:100-101). Stage
2 takes the one fact it lacked: every stick written from one image
carries the same unique GUIDs, because `src/image.rs`'s
`create_boot_image` draws them once per image (:240-241).
**`issues/build/the-toolchain-install-unpacks-an-asset-no-digest-vouches-for.md`
is carried, and still true at the merged head.**
- `release::install` (`src/release.rs:107`) checks nothing of the
tarball's bytes.
- The tag hashes `trees()`.
- The `toyos-sysroot-witness` that `check_installed_toolchain` holds an
install to is a file inside the tarball.
- `nightly.yml`'s `build` job (:54) has `contents: write` (:58) and runs
`--ci toolchain` with `GH_TOKEN` (:73-74). The bootstrap it starts
inherits the token.
- #667's `nightly.yml` change moves only the `host` job, and adds one
step to `portability-macos`.
- The repository's default workflow token is read-only: `gh api
repos/ToyOSOrg/ToyOS/actions/permissions/workflow` gives
`"default_workflow_permissions":"read"`.
**`issues/kernel/the-kernel-dies-at-boot-on-the-edk2-firmware-qemu-ships.md`
is dropped, because it is no longer true.**
- #563 (51fe14c) made the kernel boot on Homebrew QEMU 11.1.1's edk2,
and its merge message names this panic as what it fixed.
- Since dfe61e5, every harness boot takes its firmware from
`src/firmware.rs`.
- The issue's exit rests on `release_command_boots` and
`src/redlist.rs`, and both are gone from main.
#556's release-badge issue is not carried, as the triage said.
## Negative controls
For each mutation:
1. `sed` applied it, and a check confirmed the expected lines changed.
2. The tree built, and `cargo test -p toyos-cpuvuln` ran.
3. The file was restored from HEAD.
Every applied mutation built and ran red. `git status --porcelain` was
empty afterwards.
| mutation | red at | exit |
|---|---|---|
| `t14/msr.txt:17` `0a005c6b`→`0a005c6a` |
`the_t14s_facts_are_linuxs_reading_of_it`: `MSR 0x10a differs between
CPUs` | 101 |
| `t14/cpuid.txt:4` leaf 7.0 EDX `fc100710`→`fc100711` | the same test,
`cpuid_7_0_edx` | 101 |
| `t14/cpuinfo.txt` `siblings: 8`→`4` on every CPU | the same test,
`smt` | 101 |
| `t14/cpuinfo.txt` `vmx` removed from every `flags` line | the same
test, `decide`'s `vmx` | 101 |
| `t14/msr.txt` 0x48 `1`→`0` on every CPU | the same test, `spec_ctrl` |
101 |
| `t14/cpuinfo.txt` `microcode: 0xbe`→`0xbf` on every CPU | the same
test, microcode | 101 |
| `tcg/console.txt` `model: 0x6b`→`0x6c` |
`the_tcg_models_signature_gives_its_lines`, the identity | 101 |
| `tcg/console.txt` spectre_v2 `STIBP: disabled`→`conditional` | the
same test, `assert_capture`'s `spectre_v2` | 101 |
The oracle is Linux at `Ubuntu-6.8.0-142.142` on the T14 and on the TCG
model, as #601's capture read it.
## Gates at 10e2b39
This head is the branch with `origin/main` merged at 0edf266.
- `cargo run -- --ci host`: EXIT=0, `Host: 56 step(s), all green`.
- `toyos-cpuvuln`'s 53 tests ran in the host-workspace step, both
readers among them.
- Clippy, with warnings denied, is clean.
- The licence step says `6 exception(s) stand, and nothing else is
refused`.
- Net (`git diff --shortstat origin/main...HEAD`): 16 files, +880 −61.
- Production: 0.
- Tests: +125 −15.
- Captured data: +665 −17.
- SOURCE files: +27.
- Issues: +63 −29.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016t9wjdQkB8SH7bmfUoiy6L
16 files changed
Lines changed: 880 additions & 61 deletions
File tree
- issues
- boot-media
- build
- hardware
- kernel
- toyos-cpuvuln
- fixtures
- t14
- tcg
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments