Skip to content

Commit a97ff80

Browse files
authored
toyos-cpuvuln holds T14 and TCG to Linux's readings of them; #556's toolchain-digest issue carried (#672)
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
2 parents 0edf266 + 10e2b39 commit a97ff80

16 files changed

Lines changed: 880 additions & 61 deletions

‎issues/boot-media/the-loader-does-only-what-must-precede-the-handover.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ Each stage lands on its own, in this order.
8686
- Every volume the loader opens (the slot's FAT partition, the log
8787
partition and the attempts file on it) is found on the boot disk, where
8888
exactly one match is taken. `loaderlog::volume_handle`'s machine-wide
89-
first match goes.
89+
first match goes. Every stick written from one image carries the same
90+
unique GUIDs: `src/image.rs`'s `create_boot_image` draws them once per
91+
image.
9092
- A pass asks firmware once: one `LoadedImage` open, one device-path walk,
9193
one `Disk::open` and slot-table read, and one file reader.
9294
`load_file_bytes`, `MAX_ESP_FILE` and the unsound `alloc_uninit` go.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
status: open
3+
kind: tooling
4+
opened: 2026-09-28
5+
---
6+
7+
# The toolchain install unpacks an asset no digest vouches for
8+
9+
`release::install` (`src/release.rs`) downloads the `toyos-toolchain.tar.zst`
10+
asset of the release its tree's tag names, unpacks it into `rust/build` and
11+
links it as rustup's `toyos`, and checks nothing about its bytes: the tag is
12+
the hash of the tarball's inputs (`trees`), not of the tarball, and the
13+
`toyos-sysroot-witness` an installed toolchain is held to comes inside it.
14+
Every guest job compiles and boots with what it installs.
15+
16+
A job holding this repository's `contents: write` token can replace a
17+
release asset, so any code such a job runs can replace the toolchain every
18+
later job installs. The nightly's `build` job holds that token while it
19+
bootstraps the toolchain.
20+
21+
Owner: the release module (`src/release.rs`).
22+
23+
**Exit condition.** `install` unpacks only an asset whose SHA-256 is one that
24+
no job holding a write token can rewrite — committed to the tree it installs
25+
for — and refuses any other by name.

‎issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-are-not-committed.md‎

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
status: open
3+
kind: tooling
4+
opened: 2026-09-29
5+
---
6+
7+
# Linux's readings of the T14 and the TCG model lack reads owed before the T14's wipe
8+
9+
The floor of
10+
`issues/kernel/the-kernel-is-at-least-as-secure-as-linux-on-every-machine-toyos-supports.md`
11+
is tag `Ubuntu-6.8.0-142.142` (53e5d07aac028a1523ab0b115f079d6d1bc831ef) of
12+
`https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble`,
13+
config sha256 3b8533dd9d235ca634ac58f82c5ce1ee35f12ef620693e17033184d2c9ca5890,
14+
and what it reads on the T14 and on the TCG model are the fixtures
15+
of `issues/kernel/a-pure-function-decides-a-cpus-speculation-mitigations-as-linux-does.md`,
16+
`toyos-cpuvuln/fixtures/`'s `t14.txt`, `t14/` and `tcg/`;
17+
`the_t14s_facts_are_linuxs_reading_of_it` and
18+
`the_tcg_models_signature_gives_its_lines` hold `T14` and `TCG` to them.
19+
Ubuntu leaves the T14 only after this issue and
20+
`issues/hardware/no-program-measures-toyos-against-linux-on-one-machine.md`
21+
close.
22+
23+
**Exit**: before the wipe the T14's readings add CPUID 5, 0x19 and
24+
0x80000001, MSR 0xCF, MSR 0x3A (`rdmsr -a 0x3a`, IA32_FEAT_CTL), the
25+
split-lock line, and the config's `X86_KERNEL_IBT` and
26+
`X86_INTEL_MEMORY_PROTECTION_KEYS`, each committed with the test that reads
27+
it, and `the_t14s_facts_are_linuxs_reading_of_it` holds `T14`'s `feat_ctl`
28+
to 0x3A's. **Mutation**: an added reading off by one bit reds the test that
29+
reads it. **Oracle**: that Linux.
30+
31+
Owner: the orchestrator, which holds the T14 the exit runs on.

‎issues/kernel/a-pure-function-decides-a-cpus-speculation-mitigations-as-linux-does.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ selects, built by the kernel and by a host test. Pull request #602 holds it.
1212

1313
**Exit**: each committed fixture's facts give its lines: the T14's and the TCG
1414
model's from
15-
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-are-not-committed.md`,
15+
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-lack-reads-owed-before-the-t14s-wipe.md`,
1616
and each nightly EPYC guest's once its runner is captured. **Mutation**: `GDS`
1717
deleted from `cpu_vuln_blacklist`'s TIGERLAKE_L row reds the T14's fixture,
1818
and `SRSO` deleted from its family 0x19 row reds a family-0x19 EPYC guest's.

‎issues/kernel/each-boot-prints-the-vulnerabilities-lines-linux-prints.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ opened: 2026-09-29
99
**Exit**: each proving machine's ToyOS boot prints, for each vulnerabilities
1010
file, the line Linux at `Ubuntu-6.8.0-142.142` printed on that machine: the
1111
T14's from
12-
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-are-not-committed.md`,
12+
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-lack-reads-owed-before-the-t14s-wipe.md`,
1313
each EPYC guest's from its runner's capture. It omits only clauses about what
1414
ToyOS does not run: `spectre_v1`'s swapgs barriers while it runs no `swapgs`,
1515
the KVM and VM-exit clauses since it runs no guest, and `IBRS_FW` since the

‎issues/kernel/the-kernel-is-at-least-as-secure-as-linux-on-every-machine-toyos-supports.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ probe is a `boot-actuators` arm or a `test-actuators` `SYS_DEBUG` action.
1414

1515
**Exit**: every issue below is closed, in the order listed.
1616

17-
- `issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-are-not-committed.md`
17+
- `issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-lack-reads-owed-before-the-t14s-wipe.md`
1818
- `issues/kernel/a-pure-function-decides-a-cpus-speculation-mitigations-as-linux-does.md`
1919
- `issues/kernel/spec-ctrl-and-gds-stay-as-firmware-left-them.md`
2020
- `issues/kernel/no-program-runs-with-speculative-store-bypass-disabled.md`

‎issues/kernel/tsx-stays-as-firmware-left-it.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ T14's `CONFIG_X86_INTEL_TSX_MODE_OFF=y`, runs `tsx_init`
2121
`issues/kernel/a-pure-function-decides-a-cpus-speculation-mitigations-as-linux-does.md`
2222
carries `tsx_init`'s decision and every CPU applies it; on the T14, ToyOS's
2323
reads of 0x122, 0x10F and 0x123 equal the Linux reads of
24-
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-are-not-committed.md`
24+
`issues/hardware/linuxs-readings-of-the-t14-and-the-tcg-model-lack-reads-owed-before-the-t14s-wipe.md`
2525
where each exists, and dropping the write leaves 0x122 or 0x10F at firmware's
2626
value and reds it.

‎toyos-cpuvuln/fixtures/t14/SOURCE‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Linux's readings of the ThinkPad T14 this repository is tested on, under that
2+
machine's Ubuntu, read as root on the T14 by `toyos-t14linux/capture.sh` at
3+
commit 44eb3c2e (pull request #601), and it read
4+
CPUID and the MSRs through the running kernel's /dev/cpu/*/cpuid and
5+
/dev/cpu/*/msr, so an MSR holds what that kernel left in it.
6+
7+
vulnerabilities.txt the run's `grep .` over the vulnerabilities directory,
8+
committed as ../t14.txt
9+
cpuid.txt CPU 0's leaves, one per line:
10+
leaf subleaf eax ebx ecx edx
11+
msr.txt one per line: msr cpu value; 0x122 and 0x10F are absent
12+
because ARCH_CAPABILITIES bit 7 and CPUID.(7,0):EDX
13+
bits 11 and 13 do not enumerate them
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
00000000 00000000 0000001b 756e6547 6c65746e 49656e69
2+
00000001 00000000 000806c1 00100800 7ffafbbf bfebfbff
3+
00000006 00000000 0017eff7 00000002 00000009 00000000
4+
00000007 00000000 00000002 f3bfa7eb 18c05fde fc100710
5+
00000007 00000001 00000000 00000000 00000000 00040000
6+
00000007 00000002 00000000 00000000 00000000 00000001
7+
0000000d 00000000 000002e7 00000a88 00000a88 00000000
8+
0000000d 00000001 0000000f 00000998 00003900 00000000
9+
00000014 00000000 00000001 0000004f 00000007 00000000
10+
80000000 00000000 80000008 00000000 00000000 00000000
11+
80000008 00000000 00003027 00000000 00000000 00000000
12+
80000021 00000000 00000000 00000000 00000000 00000000

0 commit comments

Comments
 (0)