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#218 (code only)

closed derived fa93469f23f77066 #218

Imported from GitHub aien-dev/aienux#218 (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 d92a8399af2e83ae8330fac6a242029789114bb1

Apply it

git checkout -b patch-fa93469f23f77066 4a116e50581e36e8b90c9f4a3f04f7863798492b
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/fa93469f23f77066.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
218
d92a8399af2e83ae8330fac6a242029789114bb1
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":218,"url":"https://github.com/aien-dev/aienux/pull/218","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:35:58Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/native/kernel/Makefile b/native/kernel/Makefile
index f0cf3eb1..2918a137 100644
--- a/native/kernel/Makefile
+++ b/native/kernel/Makefile
@@ -271,7 +271,7 @@ endef
 # TEST store uuid, TEST Store print lines or TEST key symbols.
 define owner_check
 	@if [ "$(strip $(CK_HARDWARE_STAGING))" = 1 ]; then \
-	  s=$$(grep -aoE "AIENOS-LANE18-TEST-KVOL-NOT-SECRET|AIEN-TEST-BOOT01|TEST identity, TEST keys|formatted TEST store" $(1) | sort -u | tr "\n" " "); \
+	  s=$$(grep -aoE "AIENOS-LANE18-TEST-KVOL-NOT-SECRET|AIEN-TEST-BOOT01|TEST identity, TEST keys|formatted TEST store|TEST machine id 0xA1" $(1) | sort -u | tr "\n" " "); \
 	  y=$$($(KNM) $(1) | grep -E " (ck_store_test_keys|ck_store_test_uuid)$$" | tr "\n" " "); \
 	  if [ -n "$$s$$y" ]; then echo "hardware staging image carries the TEST Store identity: $$s$$y"; rm -f $(1); exit 1; fi; \
 	  echo "no TEST Store label, uuid or key code in $(1)"; \
diff --git a/native/kernel/README.md b/native/kernel/README.md
index 59637321..385e9f76 100644
--- a/native/kernel/README.md
+++ b/native/kernel/README.md
@@ -35,7 +35,7 @@ Output lands in `<repo>/target/native-kernel` (ignored by git).
 
 The default and QEMU images use the labelled TEST Store keys
 (`ck_store_test_keys`, public label, `M5_ID_TEST`), the TEST store uuid and
-the TEST ARGUS machine id (0xA1). The hardware staging image never embeds any
+the TEST ARGUS machine id (0xA1; the default image prints `argus: TEST machine id 0xA1 ...` on the serial console). The hardware staging image never embeds any
 of them:
 
     make -C native/kernel full CK_HARDWARE_STAGING=1 \
diff --git a/native/kernel/svc/security.c b/native/kernel/svc/security.c
index e9837bee..6592ee0a 100644
--- a/native/kernel/svc/security.c
+++ b/native/kernel/svc/security.c
@@ -280,6 +280,9 @@ int ck_stage_security(void)
     ck_sec_report r;
     int rc = ck_security_run(&r);
     int ent = ck_compat_entropy_source();
+#ifndef CK_HARDWARE_STAGING
+    ck_printf("argus: TEST machine id 0xA1 (fixed label, not a real machine identity, not production)\n");
+#endif
     ck_printf("caps: %s granted=%s attenuated=%s amplify=%s forged=%s revoked=%s office_token=%s\n",
               pick(r.caps_ok, "ok", "failed"), pick(r.caps_granted, "yes", "no"), pick(r.caps_attenuated, "yes", "no"),
               pick(r.caps_amplify_denied, "denied", "ALLOWED"), pick(r.caps_forged_denied, "denied", "ALLOWED"),
diff --git a/scripts/ck_owner_keys_check.sh b/scripts/ck_owner_keys_check.sh
index ebc6696e..e1f73770 100755
--- a/scripts/ck_owner_keys_check.sh
+++ b/scripts/ck_owner_keys_check.sh
@@ -20,6 +20,8 @@
 #      and the BLOCKED_OPERATOR Store refusal line.
 #   4. Control: the default full image still carries the labelled TEST Store
 #      label (the grep is not vacuous).
+#   5. The default image carries the "argus: TEST machine id 0xA1" banner (control); the
+#      Makefile owner_check pattern matches a blob holding it (counterexample).
 # Build-only: nothing is booted. Takes the Spark quiet flag like the qemu_ck_*
 # scripts (NOT_RUN, exit 3, if another run holds it). No Python.
 set -euo pipefail
@@ -126,7 +128,7 @@ if mk full CK_HARDWARE_STAGING=1 CK_OWNER_PUBKEYS="${own}" CK_MACHINE_ID="${mach
 else
     bad "hardware staging image with fixture owner files did not build: $(tail -c 400 "${tmp}/hw.log")"
 fi
-banned='AIENOS-LANE18-TEST-KVOL-NOT-SECRET|AIEN-TEST-BOOT01|TEST identity, TEST keys|formatted TEST store|TEST-FIXTURE|TEST FIXTURE'
+banned='AIENOS-LANE18-TEST-KVOL-NOT-SECRET|AIEN-TEST-BOOT01|TEST identity, TEST keys|formatted TEST store|TEST machine id 0xA1|TEST-FIXTURE|TEST FIXTURE'
 for f in "${hw}/aienos-ck.elf" "${hw}/BOOTAA64.EFI"; do
     [[ -s "${f}" ]] || { bad "missing ${f}"; continue; }
     s="$(grep -aoE "${banned}" "${f}" | sort -u | tr '\n' ' ' || true)"
@@ -156,6 +158,32 @@ else
     bad "control: default full image lacks the TEST Store label or did not build"
 fi
 
+# ---- 5. TEST machine id banner: control + counterexample ------------------
+if grep -aqF 'argus: TEST machine id 0xA1' "${out}/full/aienos-ck.elf" 2>/dev/null; then
+    ok "control: default full image carries the 'argus: TEST machine id 0xA1' banner"
+else
+    bad "control: default full image lacks the 'argus: TEST machine id 0xA1' banner"
+fi
+# Counterexample: the Makefile owner_check pattern must catch a blob that holds
+# the banner. The pattern is read from the Makefile itself, not copied here.
+oc_pat="$(grep -oE 'grep -aoE "[^"]*TEST machine id 0xA1[^"]*"' "${kdir}/Makefile" | head -1 | sed -e 's/^grep -aoE "//' -e 's/"$//' || true)"
+if [[ -z "${oc_pat}" ]]; then
+    bad "Makefile owner_check pattern for the TEST machine id banner not found"
+else
+    printf 'padding\0argus: TEST machine id 0xA1 (fixed label)\n\0padding' > "${tmp}/bad-blob.bin"
+    printf 'padding\0argus: ok narrow_revoke=1\n\0padding' > "${tmp}/clean-blob.bin"
+    if [[ -n "$(grep -aoE "${oc_pat}" "${tmp}/bad-blob.bin" || true)" ]]; then
+        ok "counterexample: owner_check pattern refuses a blob carrying the TEST machine id banner"
+    else
+        bad "counterexample: owner_check pattern did NOT match a blob carrying the TEST machine id banner"
+    fi
+    if [[ -z "$(grep -aoE "${oc_pat}" "${tmp}/clean-blob.bin" || true)" ]]; then
+        ok "owner_check pattern passes a clean blob"
+    else
+        bad "owner_check pattern matched a clean blob"
+    fi
+fi
+
 if [[ "${fails}" == 0 ]]; then
     echo "CK_OWNER_KEYS_CHECK: PASS"
 else