interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

GitHub aien-dev/aienux#220 (code only)

closed derived a506b4a23fdf1301 #220

Imported from GitHub aien-dev/aienux#220 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 4a116e50581e36e8b90c9f4a3f04f7863798492b · Head cb21d3c298dfb7c442b5fccf77d994140aab8945

Apply it

git checkout -b patch-a506b4a23fdf1301 4a116e50581e36e8b90c9f4a3f04f7863798492b
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/a506b4a23fdf1301.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aienux
220
cb21d3c298dfb7c442b5fccf77d994140aab8945
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":220,"url":"https://github.com/aien-dev/aienux/pull/220","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:35:59Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/docs/TRUST-1-OPERATOR-STEPS.md b/docs/TRUST-1-OPERATOR-STEPS.md
index 91619a80..e94bc445 100644
--- a/docs/TRUST-1-OPERATOR-STEPS.md
+++ b/docs/TRUST-1-OPERATOR-STEPS.md
@@ -294,6 +294,35 @@ live):
    manifest, the record) goes back to the Spark. The `private` folder stays
    on the ceremony machine and the two backups.
 
+## Known hardware risk: do not boot the C kernel on a disk that holds data
+
+**Do not boot the C kernel on a disk holding data until CK gate `DISK_LAYOUT`
+is PASS on a forge receipt.** Today that gate is **NOT_RUN
+(MISSING_IMPLEMENTATION, fix in progress)**. Nothing in this document's steps
+boots the C kernel, and none of them may be extended to do so before the gate
+passes.
+
+Why: the C kernel treats the whole NVMe disk as its own and knows nothing about
+partitions. On a real GPT disk such as Machine 1's, that overlaps the disk's
+own partition table:
+
+- It writes the last 4 KiB of the whole disk at every boot (a write, read-back
+  and restore probe), `native/kernel/dev/nvme_bind.c:93-127` (called at line
+  224), sized by `native/kernel/dev/disk_layout.h:6-7`. The last sectors of a GPT
+  disk hold the backup partition table. A power cut during the probe leaves
+  that area with probe data.
+- It uses the first 16 KiB (4 units) as the anti-rollback anchor,
+  `native/kernel/dev/disk_layout.h:3,12` and
+  `native/kernel/svc/store_boot.c:164-170` (`anchor_lba = 0`). Sector 0 is the
+  protective MBR and the next sectors hold the primary GPT.
+- The Store region is everything between those two ends
+  (`native/kernel/dev/disk_layout.h:4`, `store_boot.c:169-170`), so a format
+  of the Store would cover every partition on the disk.
+
+Source: `~/handoffs/2026-10-01-review/track4-aienos-trust.md`, row R2.
+This entry is documentation only. It was not tested, and no hardware result is
+claimed. Host, QEMU and hardware status of the fix: all NOT_RUN.
+
 ## Later gates (no action from you yet)
 
 - **Gate 4** (agents): sign the loader with your Boot Signer in the emulator
diff --git a/native/kernel/README.md b/native/kernel/README.md
index 59637321..df28f3f6 100644
--- a/native/kernel/README.md
+++ b/native/kernel/README.md
@@ -81,6 +81,19 @@ of them:
   host tools) are still present as data in every image, including hardware
   staging; the ordinary loader trusts no anchor.
 
+## Known hardware risk: disk footprint (CK gate DISK_LAYOUT: NOT_RUN)
+
+**Do not boot the C kernel on a disk holding data until CK gate `DISK_LAYOUT`
+is PASS on a forge receipt.** That gate is NOT_RUN (MISSING_IMPLEMENTATION, fix
+in progress).
+
+The kernel is partition-unaware. At every boot it writes and restores the last
+4 KiB unit of the whole NVMe namespace (`dev/nvme_bind.c:93-127`, called at
+`:224`) and uses the first 16 KiB as the anti-rollback anchor
+(`dev/disk_layout.h:3,12`; `svc/store_boot.c:164-170`). On a GPT disk those
+areas hold the protective MBR, the primary GPT and the backup GPT. Details and
+the operator-facing warning: `docs/TRUST-1-OPERATOR-STEPS.md`.
+
 ## Boot sequence
 
 1. UEFI stub: pre-exit report on ConOut, memory map, `ExitBootServices`.