Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/patches/b2f4c89f30a3e5f3 # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## desk block: 9 PRs (#391, #395, #412, #416, #423, #426, #433, #434...) closed `b2f4c89f30a3e5f3` #440 · opened 2026-10-20 20:52 UTC · closed 2026-10-30 03:02 UTC Imported from GitHub aien-dev/aienux#440, by drakestapleton Base `18e276590424593647cd7c39c6d16c2f9f8d6027` · Head `77e346e636b875ff02957a51a11fb22c5a1a2ade` drakestapleton wrote on 2026-10-20 20:52 UTC Desk block built by renda-harness: one judge run for 9 pull requests instead of 9 (Drake 2026-10-20: do the shared work once, in blocks). When this merges, each carried PR is closed with a link here. If the judge fails, the block is split and retried in halves; nothing is waived. Carries #391 (test/osc-launch-rehash-383@`8bee122c`): test(osc): verify changed executable bytes are refused at launch Carries #395 (pipeline/gate-inputs@`3efa1f71`): tests/gates: inputs cover every file each gate reads Carries #412 (fix/410-imac-report-opt-in@`f46e218e`): iMac: network report is opt-in lab-only, allowlisted, labelled unauthenticated (fixes #410) Carries #416 (docs/readme-refresh-2026-10-18@`e9ba0e1c`): docs: ADR index lists ADR 0017; links and dashes (2026-10-18) Carries #423 (feat/85-audio-output@`03f33e84`): C kernel can recognise a USB speaker and prepare sound for it (audio.output step 1, #85) Carries #426 (fix/409-x86-wx@`7aa0a37a`): iMac kernel refuses to run data or rewrite its own code Carries #433 (feat/native-pipe-1@`f8700d4c`): feat(kernel): native bounded byte pipe primitive (AIENOS-NATIVE-PIPE-1, #428) Carries #434 (crumb/on-demand-migration@`49e6f6a3`): crumb: stop committing generated crumb data (RFC-0003 amendment 1 migration) Carries #438 (fix/timer-window-starvation@`54fe5b96`): ck: timer window no longer fails M1 on a starved QEMU vCPU (AIENOS-CK-QEMU-GATES flake on #434) Not carried (left for their own path): - #392: conflicts with main or another PR in the block: .crumb, .github/workflows/ck-kernel.yml, native/.crumb, native/kernel/.crumb, native/kernel/core/.crumb, scripts/.crumb - #397: conflicts with main or another PR in the block: .crumb, .github/workflows/aien-verification.yml - #439: conflicts with main or another PR in the block: .crumb, crates/.crumb, crates/aienos-artifact-tool/.crumb, docs/.crumb, docs/adr/.crumb, docs/adr/README.md drakestapleton wrote on 2026-10-24 06:42 UTC Merge-desk dependency audit: #416 is already merged as `a9055204ca55336e3937f2952d0ebbb3ad067c6c`; this aggregate still names it and carries older component heads. Rebuild the existing #440 integration against current main `f45d00ade01c64a532e8ef6b8e38fabeed95ebe0` using the current #391/#395/#412/#423/#426/#433/#434/#438 scope, preserving original acceptance requirements and unresolved source-review findings. For the iMac chain, #413 closed without merging. #426 is the current W^X replacement; reconcile that prerequisite before #414 -> #415 -> #418 -> #421 -> #424, with #420 as a sibling on #418. A closed PR is not evidence that its dependency landed. Existing implementation owners retain their work. ChatGPT now coordinates integration order under aien-dev/aien-architecture-mv#190. This is routing, not aggregate merge approval or hardware qualification. ### Fetch it A git bundle of the pull request's head, 156804 bytes. ``` curl -fsSL https://interplane.io/drakestapleton/aienux/patches/b2f4c89f30a3e5f3.bundle -o b2f4c89f30a3e5f3.bundle git fetch b2f4c89f30a3e5f3.bundle refs/pull/440/head ``` Raw bundle · 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 440 77e346e636b875ff02957a51a11fb22c5a1a2ade ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"aienux","number":440,"url":"https://github.com/aien-dev/aienux/pull/440","export_sha256":"222ed873664c8b6770fec92487a3521a4b5f81629ee6399038e519facf854bee","imported_utc":"2026-11-18T16:35:38Z"} ``` ### Changes ``` diff --git a/.crumb b/.crumb index b35a3b6e..fcc6e0c2 100644 --- a/.crumb +++ b/.crumb @@ -18,43 +18,7 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "b5ced6fea583b485206b73ec08b91de68a5cfd2672ac448191831754c9e0907d", - "last_commit": "7db773a", - "name": "crates", - "purpose": "Directory crates. Purpose not yet described by a human." - }, - { - "digest": "2f740ef54106c2b6419bfd2df1266762cd444f439c7e12ae2a7c5c3877de926c", - "last_commit": "4bd49ca", - "name": "docs", - "purpose": "Directory docs. Purpose not yet described by a human." - }, - { - "digest": "64cc87f8507bb580e1788d335c5a76039f3e3a016552595526718448ab5aa098", - "last_commit": "3037967", - "name": "native", - "purpose": "Directory native. Purpose not yet described by a human." - }, - { - "digest": "28cf2363c4d527a9d7ecc2974f3dcda3e065959cbddaed7863d9c9354f166967", - "last_commit": "00d7759", - "name": "scripts", - "purpose": "Directory scripts. Purpose not yet described by a human." - } - ], - "children_root": "sha256:9dce6ec60d33531c951ea265c84962b9a7e5ca0199cd76e63ba01585a7c01928", - "compiled_at": "2026-10-19T15:08:12Z", - "compiler": "crumb-compile/1", - "digest": "sha256:ea1028946ad65a777ed93ea1a58dee8a194f58035dbf961f631a313b044ee868", - "evidence_files": 211, - "evidence_root": "sha256:3a8f56415109a697e4beb6048c85805c50c9c6c4089629057f4e8b3e76863981", - "files": 3491, - "generated_at_commit": "00d77597386501631f08ac78ea5c0c3a0795348f", - "source_tree": "sha256:68db139dcb9eaed72ca1bd7795960ebd933df55d7f3f5b9d3495639071aba901" - }, + "generated_policy": "on-demand", "owner_lane": "", "provenance": { "entries": [ diff --git a/.github/workflows/aien-verification.yml b/.github/workflows/aien-verification.yml index 54770fcc..6d6b4eb9 100644 --- a/.github/workflows/aien-verification.yml +++ b/.github/workflows/aien-verification.yml @@ -83,11 +83,11 @@ jobs: echo "blocked=false" >> "$GITHUB_OUTPUT" fi - - name: Checkout the pinned crumb tool source (aien-architecture @ d0f0b95d344b4c6628c3d868346932fd247ce168) + - name: Checkout the pinned crumb tool source (aien-architecture @ 12ad0141b41ec67ef5aa51cb4e1815894c1083bb) uses: actions/checkout@v4 with: repository: aien-spark/aien-architecture - ref: d0f0b95d344b4c6628c3d868346932fd247ce168 + ref: 12ad0141b41ec67ef5aa51cb4e1815894c1083bb path: .crumb-tool-src - name: Build the crumb tool, then remove its source from this tree diff --git a/crates/.crumb b/crates/.crumb index 6f56e027..9f358a9c 100644 --- a/crates/.crumb +++ b/crates/.crumb @@ -62,103 +62,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "0a8510e7fedafbf6b5d1ea15307da3a1eb6e8d6bd6ffa7caabf193fabaa464b5", - "last_commit": "3e71759", - "name": "aienos-accel", - "purpose": "Directory crates/aienos-accel. Purpose not yet described by a human." - }, - { - "digest": "68682a56017aef2e95b4101731a5bc023e0d297127e6b07af7d3be9f3d8afaeb", - "last_commit": "15d5f3d", - "name": "aienos-aegis", - "purpose": "Directory crates/aienos-aegis. Purpose not yet described by a human." - }, - { - "digest": "d5ad195a8f38c6bd0e1cc00feb8c5040f0fc8eabe47a9a69d961c73d6901d61e", - "last_commit": "39e246a", - "name": "aienos-agent-state", - "purpose": "Directory crates/aienos-agent-state. Purpose not yet described by a human." - }, - { - "digest": "ffb6a9a637e1eca1408280c4522ea52b283d740a90b8efad30350082900cbcdc", - "last_commit": "e12e6f6", - "name": "aienos-artifact", - "purpose": "Directory crates/aienos-artifact. Purpose not yet described by a human." - }, - { - "digest": "ff4260f8fede1182f834d89589eb4d5a6c6160032dfc570003d506411fe93aa4", - "last_commit": "e9d39a9", - "name": "aienos-artifact-tool", - "purpose": "Directory crates/aienos-artifact-tool. Purpose not yet described by a human." - }, - { - "digest": "223e3399133c766986b1044a16c8367b51b78158d3070c0ec63c7ed3e639d644", - "last_commit": "49ff776", - "name": "aienos-boot", - "purpose": "Directory crates/aienos-boot. Purpose not yet described by a human." - }, - { - "digest": "01d4fe4a0bd556f338ac4615b7ed1c9141e4f8035c07e0082f2894a57fa071d0", - "last_commit": "bc25e73", - "name": "aienos-c1-tree", - "purpose": "Directory crates/aienos-c1-tree. Purpose not yet described by a human." - }, - { - "digest": "ca15c2b9ae570b0aa2c7859672de2c976d6ce046188c09b7c74b5ccbee350136", - "last_commit": "51c05da", - "name": "aienos-capability", - "purpose": "Directory crates/aienos-capability. Purpose not yet described by a human." - }, - { - "digest": "c63ab3d5643ac3c0974eee276273a0ab80584c54926cbb62c637294b5b857718", - "last_commit": "51c05da", - "name": "aienos-capability-ffi", - "purpose": "Directory crates/aienos-capability-ffi. Purpose not yet described by a human." - }, - { - "digest": "f062e2e58faa2950ce8adeb2e4c16234dacce6672d560ed4fdeb7224c5093a77", - "last_commit": "bc25e73", - "name": "aienos-cortex", - "purpose": "Directory crates/aienos-cortex. Purpose not yet described by a human." - }, - { - "digest": "feccaaf349b9e88bc116db18951ffbd0145176b40ce702bc6320338c35b2e85e", - "last_commit": "f0facc7", - "name": "aienos-crypto", - "purpose": "Directory crates/aienos-crypto. Purpose not yet described by a human." - }, - { - "digest": "e88324eb9a32d23d8358413c7404038ee4095fcf8c4889ac9c221b97aef80b8e", - "last_commit": "e960272", - "name": "aienos-evidence", - "purpose": "Directory crates/aienos-evidence. Purpose not yet described by a human." - }, - { - "digest": "a0d0036c90e3d64d6e1caa67b77bf2b8deb898c597e9f0b797df4a144468e061", - "last_commit": "2951ea1", - "name": "aienos-kernel", - "purpose": "Directory crates/aienos-kernel. Purpose not yet described by a human." - }, - { - "digest": "716d679da128e7aab8efb6e9cf836ee22a62fe9fe6993e2d0a20c3016d78b3a0", - "last_commit": "761e63d", - "name": "aienos-store-tool", - "purpose": "Directory crates/aienos-store-tool. Purpose not yet described by a human." - } - ], - "children_root": "sha256:ca16d018c0c02840ba1f87e2a7b64ed259a36253ed29230f274ebcabb43c8a7e", - "compiled_at": "2026-10-14T14:58:51Z", - "compiler": "crumb-compile/1", - "digest": "sha256:b5ced6fea583b485206b73ec08b91de68a5cfd2672ac448191831754c9e0907d", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 268, - "generated_at_commit": "596870d6ef47c5238cc2c7fa1c08f5e5486e5d84", - "source_tree": "sha256:cc0bfe148dc436da2bb46428408257fbc55e5643cf516241a3e9021656c5fc2c" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-accel/.crumb b/crates/aienos-accel/.crumb index 7d1daf82..6f67bcf0 100644 --- a/crates/aienos-accel/.crumb +++ b/crates/aienos-accel/.crumb @@ -14,31 +14,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "6b70f66e4d236c180f8cd0dc9d5cd6c5d541938032b782c8f8525e809ec317a3", - "last_commit": "3e71759", - "name": "src", - "purpose": "Directory crates/aienos-accel/src. Purpose not yet described by a human." - }, - { - "digest": "f3d113cfcfbdea76e735ccb0543a6007b9e079c4eabc34dcc2bf64c6d9e550a6", - "last_commit": "3e71759", - "name": "tests", - "purpose": "Directory crates/aienos-accel/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:f4367a3dee18b6a295d8e251a7f087e15038dd61899025c62b614c2f0303cebe", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:0a8510e7fedafbf6b5d1ea15307da3a1eb6e8d6bd6ffa7caabf193fabaa464b5", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:448f9760aea980ca3e70325123b5475c23b25e2424a772c6173653153850e95d" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-accel/src/.crumb b/crates/aienos-accel/src/.crumb index 4f85cda3..080ef08d 100644 --- a/crates/aienos-accel/src/.crumb +++ b/crates/aienos-accel/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:6b70f66e4d236c180f8cd0dc9d5cd6c5d541938032b782c8f8525e809ec317a3", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:0d2c946ed95261cbf0accb56bb2a7d378a41ffbcef9834998a79b11eb55e7411" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-accel/tests/.crumb b/crates/aienos-accel/tests/.crumb index ee6f5f0a..0169a077 100644 --- a/crates/aienos-accel/tests/.crumb +++ b/crates/aienos-accel/tests/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:f3d113cfcfbdea76e735ccb0543a6007b9e079c4eabc34dcc2bf64c6d9e550a6", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:caaeed577657c655780a497e0206dc7a5e4fb7828123e0e8156a07615d4ac924" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-aegis/.crumb b/crates/aienos-aegis/.crumb index 1cd5803e..af851d3b 100644 --- a/crates/aienos-aegis/.crumb +++ b/crates/aienos-aegis/.crumb @@ -14,31 +14,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "81c04634d08cd2e965d3a6a66fbb586bcb221ca33c71d60049257da9271059d0", - "last_commit": "15d5f3d", - "name": "src", - "purpose": "Directory crates/aienos-aegis/src. Purpose not yet described by a human." - }, - { - "digest": "116b4a84f2a0b3f537433c1187e35f911f0c0dedea3b489607ac0132fdde9542", - "last_commit": "15d5f3d", - "name": "tests", - "purpose": "Directory crates/aienos-aegis/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:5a5cd518112edc332b4816792d79b64de08bf002b02784b720a6076c467fa974", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:68682a56017aef2e95b4101731a5bc023e0d297127e6b07af7d3be9f3d8afaeb", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 8, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:477b338366a9f9335fbc3da1b9469fcd79fc01ad53c023595e025fcb5c508cc2" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-aegis/src/.crumb b/crates/aienos-aegis/src/.crumb index 98016e37..c903f67e 100644 --- a/crates/aienos-aegis/src/.crumb +++ b/crates/aienos-aegis/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:81c04634d08cd2e965d3a6a66fbb586bcb221ca33c71d60049257da9271059d0", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:19de1b67205d779ab95e2daadf92756d98c234bf57962078922574a1b0ab3d10" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-aegis/tests/.crumb b/crates/aienos-aegis/tests/.crumb index a9cef321..031c2fde 100644 --- a/crates/aienos-aegis/tests/.crumb +++ b/crates/aienos-aegis/tests/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:116b4a84f2a0b3f537433c1187e35f911f0c0dedea3b489607ac0132fdde9542", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:0934c6689e8111e99bd3072e461d5c14ddc96b1153f266fa7ca8ee6cebd64a4c" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-agent-state/.crumb b/crates/aienos-agent-state/.crumb index 98a8389b..39db5643 100644 --- a/crates/aienos-agent-state/.crumb +++ b/crates/aienos-agent-state/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "65a8c460540b0190c0d00418ba79639832abd8764dc0ea59a1ddec40cc1747bb", - "last_commit": "39e246a", - "name": "src", - "purpose": "Directory crates/aienos-agent-state/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:141b42405835f497b7769439b232fa33c45b093c4022ed8df2d70cfcc7bedba0", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:d5ad195a8f38c6bd0e1cc00feb8c5040f0fc8eabe47a9a69d961c73d6901d61e", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 8, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:15f902241a2f247dfeec1b22c4f35fd957718fc9d76ecf7256fac0603f11f0c1" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-agent-state/src/.crumb b/crates/aienos-agent-state/src/.crumb index 20bbe098..817e2ae8 100644 --- a/crates/aienos-agent-state/src/.crumb +++ b/crates/aienos-agent-state/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:65a8c460540b0190c0d00418ba79639832abd8764dc0ea59a1ddec40cc1747bb", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 7, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:ff373815f562e46d5dbf89c4879e35d4abafb3e4c8bfab7c0dfc77c47019f3b1" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/.crumb b/crates/aienos-artifact-tool/.crumb index a79f1dda..7d46c873 100644 --- a/crates/aienos-artifact-tool/.crumb +++ b/crates/aienos-artifact-tool/.crumb @@ -14,25 +14,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "2e9b452905c551e57f1e70075f5bac994cefa497181800f3bf145a9c6ceb36df", - "last_commit": "2276906", - "name": "src", - "purpose": "Directory crates/aienos-artifact-tool/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:9e74efbe992bdf8537913d0945f0b28487e757732babf47a95707d1203682e7b", - "compiled_at": "2026-10-14T13:28:10Z", - "compiler": "crumb-compile/1", - "digest": "sha256:ff4260f8fede1182f834d89589eb4d5a6c6160032dfc570003d506411fe93aa4", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 39, - "generated_at_commit": "a0fa796235409ce465c467e8c72fbd977485d8f7", - "source_tree": "sha256:89eb7ba0259498354bbb1f270b83b0a487ff86996ecb068df73ea51e473a92e2" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/fixtures/p2_5/.crumb b/crates/aienos-artifact-tool/fixtures/p2_5/.crumb index 7c9624bf..f8a87375 100644 --- a/crates/aienos-artifact-tool/fixtures/p2_5/.crumb +++ b/crates/aienos-artifact-tool/fixtures/p2_5/.crumb @@ -18,37 +18,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "12ec8e2c7352d6526bad902bc37434ba39b42bf3b35f0ea96f6fed4e566e5013", - "last_commit": "3a6174a", - "name": "p25exec", - "purpose": "Directory crates/aienos-artifact-tool/fixtures/p2_5/p25exec. Purpose not yet described by a huma" - }, - { - "digest": "e49ae76bea4102e68c5fb6241d8aa2a2eb70e7b9469608d2903c04069d37638b", - "last_commit": "3a6174a", - "name": "p25spin", - "purpose": "Directory crates/aienos-artifact-tool/fixtures/p2_5/p25spin. Purpose not yet described by a huma" - }, - { - "digest": "86ac75b1138c0be9f16ffca1e4f4e6d35ca206fd7bcdd65a272573f98cf9d180", - "last_commit": "3a6174a", - "name": "p25wx", - "purpose": "Directory crates/aienos-artifact-tool/fixtures/p2_5/p25wx. Purpose not yet described by a human." - } - ], - "children_root": "sha256:6082777c4ccc20cae47f6fcac9a1198acc351d38d1aaed3d1839fc45d7577afc", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:31145588e22426c6766a2386e5616395ed12f603f12e9c84c23ba703cf374bf6", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 14, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:d9139352311dfefa51c34ca2553ff646cf58db6785f877efa5fbecaf40eb69cc" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/fixtures/p2_5/p25exec/.crumb b/crates/aienos-artifact-tool/fixtures/p2_5/p25exec/.crumb index aa9404b0..dc590454 100644 --- a/crates/aienos-artifact-tool/fixtures/p2_5/p25exec/.crumb +++ b/crates/aienos-artifact-tool/fixtures/p2_5/p25exec/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:12ec8e2c7352d6526bad902bc37434ba39b42bf3b35f0ea96f6fed4e566e5013", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:828948c76413f3bf1958b30b7bfd0c148b0f333f13f832cd4b33b1c7e75d920d" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/fixtures/p2_5/p25spin/.crumb b/crates/aienos-artifact-tool/fixtures/p2_5/p25spin/.crumb index 16cd76be..40c126b7 100644 --- a/crates/aienos-artifact-tool/fixtures/p2_5/p25spin/.crumb +++ b/crates/aienos-artifact-tool/fixtures/p2_5/p25spin/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:e49ae76bea4102e68c5fb6241d8aa2a2eb70e7b9469608d2903c04069d37638b", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:d7efff00bb51fb0b08989bf6f450e0c0f48739516e2766a12198b3cee011e9b4" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/fixtures/p2_5/p25wx/.crumb b/crates/aienos-artifact-tool/fixtures/p2_5/p25wx/.crumb index 19d0926b..efe7e651 100644 --- a/crates/aienos-artifact-tool/fixtures/p2_5/p25wx/.crumb +++ b/crates/aienos-artifact-tool/fixtures/p2_5/p25wx/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:86ac75b1138c0be9f16ffca1e4f4e6d35ca206fd7bcdd65a272573f98cf9d180", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:6ae037a567fbdac6ea366495cffd5cbc846f42130f400a4761170acadaef2fa8" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/fixtures/p2_6/.crumb b/crates/aienos-artifact-tool/fixtures/p2_6/.crumb index bb7b9608..f9dd4662 100644 --- a/crates/aienos-artifact-tool/fixtures/p2_6/.crumb +++ b/crates/aienos-artifact-tool/fixtures/p2_6/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "840aed89b746a4a7ce182a9c0451e9b214b661542a794f553d062b4bfb432ed6", - "last_commit": "5ad82b3", - "name": "p26seed", - "purpose": "Directory crates/aienos-artifact-tool/fixtures/p2_6/p26seed. Purpose not yet described by a huma" - } - ], - "children_root": "sha256:b71def74f45a5689a4e18998806238c664fd678eaded10a7933b8fb0a21da02c", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:2811606d395a9d99516bd97b845fd673bfed3f04b5f592c795868c3f8abe5727", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:55cfddf35a6d8695b3cf45be65b914e4c96d1f053e48f4c81de1e16243595d67" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/fixtures/p2_6/p26seed/.crumb b/crates/aienos-artifact-tool/fixtures/p2_6/p26seed/.crumb index 42156e21..f64147f7 100644 --- a/crates/aienos-artifact-tool/fixtures/p2_6/p26seed/.crumb +++ b/crates/aienos-artifact-tool/fixtures/p2_6/p26seed/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:840aed89b746a4a7ce182a9c0451e9b214b661542a794f553d062b4bfb432ed6", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:1e8d6325e9abc0a69563558608e0645a0dbad2f059f9ed5684539b334ed43f2c" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact-tool/src/.crumb b/crates/aienos-artifact-tool/src/.crumb index 2226bf9f..39d2993e 100644 --- a/crates/aienos-artifact-tool/src/.crumb +++ b/crates/aienos-artifact-tool/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:2e9b452905c551e57f1e70075f5bac994cefa497181800f3bf145a9c6ceb36df", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 3, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:45786c050f91edf80cdec22f2cd1f859c4210a1274370d276eefc6b74fcc70ad" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact/.crumb b/crates/aienos-artifact/.crumb index 6e095876..6d6cf0e6 100644 --- a/crates/aienos-artifact/.crumb +++ b/crates/aienos-artifact/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "72839a0b74ae80e6e1a4c702fd619096974eb051aff136506d974522ac6c5651", - "last_commit": "8307a68", - "name": "src", - "purpose": "Directory crates/aienos-artifact/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:13e8558a828816f21f57e02ca246057abb20a456f1bb257cc4c0392203981f3a", - "compiled_at": "2026-10-14T01:54:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:ffb6a9a637e1eca1408280c4522ea52b283d740a90b8efad30350082900cbcdc", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 13, - "generated_at_commit": "8307a68a2eedcc5c8d6c2a6ffbf7c12f398c094b", - "source_tree": "sha256:1d331b83e3479a7cb19bd437c3402f13ed2d89917dc90a623af90eb4cc93d649" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-artifact/src/.crumb b/crates/aienos-artifact/src/.crumb index f9f2afc8..911e2064 100644 --- a/crates/aienos-artifact/src/.crumb +++ b/crates/aienos-artifact/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-14T01:54:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:72839a0b74ae80e6e1a4c702fd619096974eb051aff136506d974522ac6c5651", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 12, - "generated_at_commit": "8307a68a2eedcc5c8d6c2a6ffbf7c12f398c094b", - "source_tree": "sha256:3dc9736a359478ce0c6cc8d522b63556fe5a62b4de2ef1fe16016a9c17cdfb2f" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-boot/.crumb b/crates/aienos-boot/.crumb index 427ee2a3..803dfaf3 100644 --- a/crates/aienos-boot/.crumb +++ b/crates/aienos-boot/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "a293e29bdbd2290940857d026086a68804efd1b345d7eacc5b16cd542656ab0d", - "last_commit": "3761935", - "name": "src", - "purpose": "Directory crates/aienos-boot/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:021ca31625bb390fc4fa28820082502f108d3826b7c69936d0f448f981488ce2", - "compiled_at": "2026-10-13T02:27:54Z", - "compiler": "crumb-compile/1", - "digest": "sha256:223e3399133c766986b1044a16c8367b51b78158d3070c0ec63c7ed3e639d644", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 9, - "generated_at_commit": "74f638c298bc04543b03d6851a83dac815d36645", - "source_tree": "sha256:6f188aa85aafc6b582fa0b6ecdde7ff91d0e7a6714a769d684313d15e3e013c8" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-boot/src/.crumb b/crates/aienos-boot/src/.crumb index 3ef75509..35181c87 100644 --- a/crates/aienos-boot/src/.crumb +++ b/crates/aienos-boot/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-13T02:27:54Z", - "compiler": "crumb-compile/1", - "digest": "sha256:a293e29bdbd2290940857d026086a68804efd1b345d7eacc5b16cd542656ab0d", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 8, - "generated_at_commit": "74f638c298bc04543b03d6851a83dac815d36645", - "source_tree": "sha256:63ca92587d96a5f5803d68284e9ffbf32b960df2959a95482aa0d90d0f3b9f00" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-c1-tree/.crumb b/crates/aienos-c1-tree/.crumb index 73b12697..76b5a0b9 100644 --- a/crates/aienos-c1-tree/.crumb +++ b/crates/aienos-c1-tree/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "c4e73e6c433a48fb64a5245f2013976b042e08e61547fed29f63a81eb83ae4a9", - "last_commit": "bc25e73", - "name": "src", - "purpose": "Directory crates/aienos-c1-tree/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:b8d86bd2ff955746678ddf4f8fab9182bb3c0a3648bb24eece36bece39743278", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:01d4fe4a0bd556f338ac4615b7ed1c9141e4f8035c07e0082f2894a57fa071d0", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:1e157d25c5dc194c76b5962990147c5735dfb314d1ed11bbe5976b48534f211e" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-c1-tree/src/.crumb b/crates/aienos-c1-tree/src/.crumb index 006e0b8c..fe899b6f 100644 --- a/crates/aienos-c1-tree/src/.crumb +++ b/crates/aienos-c1-tree/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:c4e73e6c433a48fb64a5245f2013976b042e08e61547fed29f63a81eb83ae4a9", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:f4d9fd2df72f5219d4397bde29a2f2c7c175bd238ca247586addb2577803a52b" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-capability-ffi/.crumb b/crates/aienos-capability-ffi/.crumb index ebbd11c1..2dcc11ca 100644 --- a/crates/aienos-capability-ffi/.crumb +++ b/crates/aienos-capability-ffi/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "1cb093121e30c7650490bef5f1b0d9d7daeba6b02576ceb70c063924375e8458", - "last_commit": "6d17b22", - "name": "src", - "purpose": "Directory crates/aienos-capability-ffi/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:951f011130547622847c6176f56210f3d984788efdbbfecc80a553721dfef1bb", - "compiled_at": "2026-10-11T21:20:24Z", - "compiler": "crumb-compile/1", - "digest": "sha256:c63ab3d5643ac3c0974eee276273a0ab80584c54926cbb62c637294b5b857718", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "362cba9653c8021996a21b17ead00d5d1140b371", - "source_tree": "sha256:96faad31a59d21e328ed818589933b387d5487b69b7e046ee5c40ed8a9574e4e" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-capability-ffi/src/.crumb b/crates/aienos-capability-ffi/src/.crumb index 69258cfd..f0ac035e 100644 --- a/crates/aienos-capability-ffi/src/.crumb +++ b/crates/aienos-capability-ffi/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-11T21:20:24Z", - "compiler": "crumb-compile/1", - "digest": "sha256:1cb093121e30c7650490bef5f1b0d9d7daeba6b02576ceb70c063924375e8458", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "362cba9653c8021996a21b17ead00d5d1140b371", - "source_tree": "sha256:334a2324f5258126e7f4e8b4fbc53f9a051c8dc53b7f9c25a9b7343292dd7c84" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-capability/.crumb b/crates/aienos-capability/.crumb index c46fd152..a59fb48f 100644 --- a/crates/aienos-capability/.crumb +++ b/crates/aienos-capability/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "9c1c32b183b9272d26de382e1327aac1da7373f79096fb3e421f795b36d17c8b", - "last_commit": "362cba9", - "name": "src", - "purpose": "Directory crates/aienos-capability/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:ec5b8bc5ec1d665dcfbecf32ea2408e5d3c84ec78e9d4623554ffc9a32d6970d", - "compiled_at": "2026-10-11T21:20:24Z", - "compiler": "crumb-compile/1", - "digest": "sha256:ca15c2b9ae570b0aa2c7859672de2c976d6ce046188c09b7c74b5ccbee350136", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "362cba9653c8021996a21b17ead00d5d1140b371", - "source_tree": "sha256:a435f6cea762e4c709af5e49797c27aeedc468b7003993e72cf5f429dcf5e5b0" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-capability/src/.crumb b/crates/aienos-capability/src/.crumb index c4140490..0050f5ba 100644 --- a/crates/aienos-capability/src/.crumb +++ b/crates/aienos-capability/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-11T21:20:24Z", - "compiler": "crumb-compile/1", - "digest": "sha256:9c1c32b183b9272d26de382e1327aac1da7373f79096fb3e421f795b36d17c8b", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "362cba9653c8021996a21b17ead00d5d1140b371", - "source_tree": "sha256:fe35483a6d43ccd7a9450e95bde44a95ec22e67a282447450ca4c70d1a8b32b8" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-cortex/.crumb b/crates/aienos-cortex/.crumb index 8b8bd508..d71d22b3 100644 --- a/crates/aienos-cortex/.crumb +++ b/crates/aienos-cortex/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "1ea60299f5c468e6713aff04a2588ae50d1d9667270d629368f6bcf3a6837ef0", - "last_commit": "bc25e73", - "name": "src", - "purpose": "Directory crates/aienos-cortex/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:92d1cbf580400ebb38fb86483abce93e4ec128765daa059f5d84d27f9ef52eee", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:f062e2e58faa2950ce8adeb2e4c16234dacce6672d560ed4fdeb7224c5093a77", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:8d85c1d3b93b28be2a5bada5c383d51b4d1bf11af78751aef5f628465b43a93d" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-cortex/src/.crumb b/crates/aienos-cortex/src/.crumb index 7eb740e3..86b49134 100644 --- a/crates/aienos-cortex/src/.crumb +++ b/crates/aienos-cortex/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:1ea60299f5c468e6713aff04a2588ae50d1d9667270d629368f6bcf3a6837ef0", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:8909001899839398417d11d829dedf944384cf2dfb2b9e732120ed8fef024565" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-crypto/.crumb b/crates/aienos-crypto/.crumb index 0c47d8c2..0ec820fa 100644 --- a/crates/aienos-crypto/.crumb +++ b/crates/aienos-crypto/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "df22f43d422699a0008974d22f67f8be01d22d0d654b47b70fe18f4528fb9daa", - "last_commit": "f0facc7", - "name": "src", - "purpose": "Directory crates/aienos-crypto/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:ef6e4823cebb32eaffb834d1c1e26e12b4ae6b026ccdddb6ba707032d40550e5", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:feccaaf349b9e88bc116db18951ffbd0145176b40ce702bc6320338c35b2e85e", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:2f0bb7150a70335c17ca5809b37982f1788f0e212a8ab9719de5a1f0a4a503a7" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-crypto/src/.crumb b/crates/aienos-crypto/src/.crumb index 3403854b..9de22e4e 100644 --- a/crates/aienos-crypto/src/.crumb +++ b/crates/aienos-crypto/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:df22f43d422699a0008974d22f67f8be01d22d0d654b47b70fe18f4528fb9daa", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:4796887182256b3bb93023aac24d014cd096e6f6aa139d72b1c96d69371df6f3" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-evidence/.crumb b/crates/aienos-evidence/.crumb index 7cf1a74e..7c099ec7 100644 --- a/crates/aienos-evidence/.crumb +++ b/crates/aienos-evidence/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "3a2a8524efb5a0ba6ee9470537d862bad5b69a58ca6328e49e48715f8de36c09", - "last_commit": "e960272", - "name": "src", - "purpose": "Directory crates/aienos-evidence/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:77c1f566be80f025bdb191e29a47eb07fe3ed2832535f5df4f29ff60aec4b4b3", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:e88324eb9a32d23d8358413c7404038ee4095fcf8c4889ac9c221b97aef80b8e", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 10, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:f0c5766c2a965888b6e893213d2b31052c9e7c52f22c6a02be4b39cf80f6b36d" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-evidence/src/.crumb b/crates/aienos-evidence/src/.crumb index 741b0455..b1ca3da8 100644 --- a/crates/aienos-evidence/src/.crumb +++ b/crates/aienos-evidence/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:3a2a8524efb5a0ba6ee9470537d862bad5b69a58ca6328e49e48715f8de36c09", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 9, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:b7dec6edff310b7a8af19c5fd59dee61f43b885bad3d2a2a5417e405f8a92319" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/.crumb b/crates/aienos-kernel/.crumb index 8601194a..173466c1 100644 --- a/crates/aienos-kernel/.crumb +++ b/crates/aienos-kernel/.crumb @@ -14,31 +14,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "734b26e98d61b37aac677c0414839f40a617df3d632281dcdb103300def3fb33", - "last_commit": "c9e49a1", - "name": "src", - "purpose": "Directory crates/aienos-kernel/src. Purpose not yet described by a human." - }, - { - "digest": "4a5f74d8e889ecb0089082469852f1e4b1c034af70dfeab3df2902cd35662ddb", - "last_commit": "09e59a8", - "name": "tests", - "purpose": "Directory crates/aienos-kernel/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:77d394e8ab2668a7a8970995479282d55313a816627a71d753dd0dcc2ad63a12", - "compiled_at": "2026-10-14T05:42:42Z", - "compiler": "crumb-compile/1", - "digest": "sha256:a0d0036c90e3d64d6e1caa67b77bf2b8deb898c597e9f0b797df4a144468e061", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 85, - "generated_at_commit": "02f8eab6a95907159c13e8b83fc0aaf2c100db11", - "source_tree": "sha256:c86f23913fbd167149dbe254e7369e586f9d6011adab1d612e70c6a3ed2f9ec7" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/.crumb b/crates/aienos-kernel/src/.crumb index 9a056ef4..398b7639 100644 --- a/crates/aienos-kernel/src/.crumb +++ b/crates/aienos-kernel/src/.crumb @@ -42,73 +42,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "ad829eca65ef7878ec3f262d4ba17592c984c4f25e29b2012ea00fd6d3909260", - "last_commit": "49ff776", - "name": "arch", - "purpose": "Directory crates/aienos-kernel/src/arch. Purpose not yet described by a human." - }, - { - "digest": "b7d0aa65cc5d5530c8946550c0c917d2f5b413fd7fd26c951a927061e88c42ac", - "last_commit": "f0facc7", - "name": "crypto", - "purpose": "Directory crates/aienos-kernel/src/crypto. Purpose not yet described by a human." - }, - { - "digest": "fa2848da5714e9ff05bc46ce48d916c1c257295dd384fb690564773344006884", - "last_commit": "a22b1d8", - "name": "display", - "purpose": "Directory crates/aienos-kernel/src/display. Purpose not yet described by a human." - }, - { - "digest": "aeb814fd7cfb0fdd7f62ddb86ecaea68bbb7c6a36baac72b3037db4db01de7d0", - "last_commit": "fbbfc9c", - "name": "infer", - "purpose": "Directory crates/aienos-kernel/src/infer. Purpose not yet described by a human." - }, - { - "digest": "fedb9de89144afbd947950265a8abd584f23af9188889330b1efb7ac600b6655", - "last_commit": "3a6174a", - "name": "mem", - "purpose": "Directory crates/aienos-kernel/src/mem. Purpose not yet described by a human." - }, - { - "digest": "ec1328a2fc6f55a1a0a66efe3322f9eaa4fe3dd495c458b2fb64ceabf69951f4", - "last_commit": "c851d01", - "name": "nvme", - "purpose": "Directory crates/aienos-kernel/src/nvme. Purpose not yet described by a human." - }, - { - "digest": "65eae3c74fff17cf4adf6f795c72ce3a65a32bb8d90a735fa8674a9a7bbe5a4e", - "last_commit": "a2a0382", - "name": "store", - "purpose": "Directory crates/aienos-kernel/src/store. Purpose not yet described by a human." - }, - { - "digest": "2d69db3de4cc825da15f576da8375d3994c484741be4dafd356a1b469afce7f1", - "last_commit": "bc25e73", - "name": "sync", - "purpose": "Directory crates/aienos-kernel/src/sync. Purpose not yet described by a human." - }, - { - "digest": "f51233705a5c33d1c72abca84575d077a80fd907e73c14ee95d9939a02c06eb0", - "last_commit": "49ff776", - "name": "usb", - "purpose": "Directory crates/aienos-kernel/src/usb. Purpose not yet described by a human." - } - ], - "children_root": "sha256:e84717f6b7c3368dbb75c1fe5496c2b6b70a63404a35a96dc89e2aa5dec251b2", - "compiled_at": "2026-10-14T05:42:42Z", - "compiler": "crumb-compile/1", - "digest": "sha256:734b26e98d61b37aac677c0414839f40a617df3d632281dcdb103300def3fb33", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 75, - "generated_at_commit": "02f8eab6a95907159c13e8b83fc0aaf2c100db11", - "source_tree": "sha256:6922d3c9969a87d4fa673b02e20dba31cec91d56266fdc7ff3a57454fcef3de0" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/arch/.crumb b/crates/aienos-kernel/src/arch/.crumb index 8112643e..7f916aee 100644 --- a/crates/aienos-kernel/src/arch/.crumb +++ b/crates/aienos-kernel/src/arch/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-13T02:27:54Z", - "compiler": "crumb-compile/1", - "digest": "sha256:ad829eca65ef7878ec3f262d4ba17592c984c4f25e29b2012ea00fd6d3909260", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "74f638c298bc04543b03d6851a83dac815d36645", - "source_tree": "sha256:8ca36aa449d5b268a7e8b8e233aeef95f4f6a282492d45763bfe62f780a03e32" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/crypto/.crumb b/crates/aienos-kernel/src/crypto/.crumb index 5216ee65..c76ae2f2 100644 --- a/crates/aienos-kernel/src/crypto/.crumb +++ b/crates/aienos-kernel/src/crypto/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:b7d0aa65cc5d5530c8946550c0c917d2f5b413fd7fd26c951a927061e88c42ac", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:99da0e4c88bda0206dc3eea2b04209579ba60975dc625d3044ec6a31ee62ddf3" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/display/.crumb b/crates/aienos-kernel/src/display/.crumb index e6ec9c74..2c26a11b 100644 --- a/crates/aienos-kernel/src/display/.crumb +++ b/crates/aienos-kernel/src/display/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:fa2848da5714e9ff05bc46ce48d916c1c257295dd384fb690564773344006884", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:aef57a83d373447720cb87d8ad9c14429ea3c813d55c17972b9a7f8772d82ea1" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/infer/.crumb b/crates/aienos-kernel/src/infer/.crumb index 4d6c7e7b..58f2450b 100644 --- a/crates/aienos-kernel/src/infer/.crumb +++ b/crates/aienos-kernel/src/infer/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T20:01:05Z", - "compiler": "crumb-compile/1", - "digest": "sha256:aeb814fd7cfb0fdd7f62ddb86ecaea68bbb7c6a36baac72b3037db4db01de7d0", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "79456d09c1e2aaf0c84f853f0e3d76b864475bb7", - "source_tree": "sha256:10bca0cfb9f161ce82da5e2f09ac664f09c70dadfafda71d89f1ee2766c4c23a" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/mem/.crumb b/crates/aienos-kernel/src/mem/.crumb index 91c79fca..66d97d16 100644 --- a/crates/aienos-kernel/src/mem/.crumb +++ b/crates/aienos-kernel/src/mem/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:fedb9de89144afbd947950265a8abd584f23af9188889330b1efb7ac600b6655", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:f52d292558dfe1f43a5a2400f0b0c83f5409953dc075683391c42c41e2025404" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/nvme/.crumb b/crates/aienos-kernel/src/nvme/.crumb index 9f7b67bd..40adeab3 100644 --- a/crates/aienos-kernel/src/nvme/.crumb +++ b/crates/aienos-kernel/src/nvme/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:ec1328a2fc6f55a1a0a66efe3322f9eaa4fe3dd495c458b2fb64ceabf69951f4", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:514dde2f4c77d89d342397ff2d893685cfc619147cbfcf46477426da3db22a49" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/store/.crumb b/crates/aienos-kernel/src/store/.crumb index 6b146ac9..f6082e02 100644 --- a/crates/aienos-kernel/src/store/.crumb +++ b/crates/aienos-kernel/src/store/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:65eae3c74fff17cf4adf6f795c72ce3a65a32bb8d90a735fa8674a9a7bbe5a4e", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:7f1e21a5ca6cbc472d4498884beaaf3edee4780ca9a3969f68e031a1c185eac3" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/sync/.crumb b/crates/aienos-kernel/src/sync/.crumb index 513952e7..4205a020 100644 --- a/crates/aienos-kernel/src/sync/.crumb +++ b/crates/aienos-kernel/src/sync/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:2d69db3de4cc825da15f576da8375d3994c484741be4dafd356a1b469afce7f1", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:78893ae665ae14dbb92a18c10850eb08ebdcf04f21d2f15ed652709b13c16f99" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/usb/.crumb b/crates/aienos-kernel/src/usb/.crumb index 96749bf7..e4565659 100644 --- a/crates/aienos-kernel/src/usb/.crumb +++ b/crates/aienos-kernel/src/usb/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "451d20161f6df66f91a25be8a7257306238f81ce0afb80c7f22b5994d05f1350", - "last_commit": "35b3086", - "name": "xhci", - "purpose": "Directory crates/aienos-kernel/src/usb/xhci. Purpose not yet described by a human." - } - ], - "children_root": "sha256:84fa272544e7bafacd247ab2c9371317f746bd408f0bdb5e0918007370dfe5c3", - "compiled_at": "2026-10-13T02:27:54Z", - "compiler": "crumb-compile/1", - "digest": "sha256:f51233705a5c33d1c72abca84575d077a80fd907e73c14ee95d9939a02c06eb0", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 9, - "generated_at_commit": "74f638c298bc04543b03d6851a83dac815d36645", - "source_tree": "sha256:cb2d7930d8dbaad0d76d7e5d5903ae3a810e34e6558192ecc4554d8fb6e89675" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/src/usb/xhci/.crumb b/crates/aienos-kernel/src/usb/xhci/.crumb index 6bcf602d..5f7f445e 100644 --- a/crates/aienos-kernel/src/usb/xhci/.crumb +++ b/crates/aienos-kernel/src/usb/xhci/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-13T02:27:54Z", - "compiler": "crumb-compile/1", - "digest": "sha256:451d20161f6df66f91a25be8a7257306238f81ce0afb80c7f22b5994d05f1350", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "74f638c298bc04543b03d6851a83dac815d36645", - "source_tree": "sha256:c939574330b003b590ddc42d63608e3ba2363fe2d368d1fd015029770f71787e" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-kernel/tests/.crumb b/crates/aienos-kernel/tests/.crumb index 8926caa0..b472dcd6 100644 --- a/crates/aienos-kernel/tests/.crumb +++ b/crates/aienos-kernel/tests/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-14T01:16:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:4a5f74d8e889ecb0089082469852f1e4b1c034af70dfeab3df2902cd35662ddb", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 9, - "generated_at_commit": "f78977a6ce33ea89a5b3b1952c0a0e403d4504fa", - "source_tree": "sha256:a09dde2f26dcf3d7bbc7d2f7e8e511d5ebfff434dcd9a2f010963413d795756a" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-store-tool/.crumb b/crates/aienos-store-tool/.crumb index fc99a21e..e52e452f 100644 --- a/crates/aienos-store-tool/.crumb +++ b/crates/aienos-store-tool/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "37a250c16fcf1ee0351e5ef165ee010fd987c23958b5582b4fd86b212e966573", - "last_commit": "761e63d", - "name": "src", - "purpose": "Directory crates/aienos-store-tool/src. Purpose not yet described by a human." - } - ], - "children_root": "sha256:0213c8f331c9520c68ce679b8e1104c04aa862cfa3dedbad3f88410b2a11b380", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:716d679da128e7aab8efb6e9cf836ee22a62fe9fe6993e2d0a20c3016d78b3a0", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:b7c2b35b4232b998b5a2ba1ef98ce05fc4e6353d0c3a45bc5abb56baa9137100" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crates/aienos-store-tool/src/.crumb b/crates/aienos-store-tool/src/.crumb index 824cf9ee..58785146 100644 --- a/crates/aienos-store-tool/src/.crumb +++ b/crates/aienos-store-tool/src/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:37a250c16fcf1ee0351e5ef165ee010fd987c23958b5582b4fd86b212e966573", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:0f2ae2a0d9e6f9d7a098fc76b6f75a79b8321fee1da94e1756dba13fac47984b" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/crumb.lock b/crumb.lock index 3dea07e0..dede5d05 100644 --- a/crumb.lock +++ b/crumb.lock @@ -1 +1 @@ -d0f0b95d344b4c6628c3d868346932fd247ce168 +12ad0141b41ec67ef5aa51cb4e1815894c1083bb diff --git a/docs/.crumb b/docs/.crumb index 51b2754a..7d529c81 100644 --- a/docs/.crumb +++ b/docs/.crumb @@ -14,31 +14,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "e84f072935b7d6d9f5a7bcaedb3fc366b4f73f8f609abcc2ea450e65665c64fa", - "last_commit": "09e59a8", - "name": "adr", - "purpose": "Directory docs/adr. Purpose not yet described by a human." - }, - { - "digest": "5dc4f124f1c023aa4786f45336a671138fce9fa046478364cdc7454307d7b588", - "last_commit": "09e59a8", - "name": "crumbs", - "purpose": "Directory docs/crumbs. Purpose not yet described by a human." - } - ], - "children_root": "sha256:491e93c09b6185b662afda8b29d24bb3ee81bc2aed9009757fdf4674d197be31", - "compiled_at": "2026-10-16T10:58:02Z", - "compiler": "crumb-compile/1", - "digest": "sha256:2f740ef54106c2b6419bfd2df1266762cd444f439c7e12ae2a7c5c3877de926c", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 216, - "generated_at_commit": "4637b04d06f4e3cec4c79920bbed0efb46b93995", - "source_tree": "sha256:1abaa75a2a66a6ce77842c9439ad7a5cbb7dee680ef47a6c33d9b865e8f70417" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/docs/adr/.crumb b/docs/adr/.crumb index 16b9e5a4..0d4820b6 100644 --- a/docs/adr/.crumb +++ b/docs/adr/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-14T01:16:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:e84f072935b7d6d9f5a7bcaedb3fc366b4f73f8f609abcc2ea450e65665c64fa", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 23, - "generated_at_commit": "f78977a6ce33ea89a5b3b1952c0a0e403d4504fa", - "source_tree": "sha256:45ba8a61db7b8af23a680740d4ca9545ba9d53c36d42bf59802459d3555051b3" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/docs/adr/README.md b/docs/adr/README.md index ff904f80..33abeea9 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -12,16 +12,17 @@ This directory documents the key architectural decisions and formal technical sp | [ADR 0004](0004-reversibility-definition-and-network-effect-boundary.md) | Reversibility Definition and Network Effect Boundary | Accepted | 2026-09-23 | [`ARCHITECTURE.md` §5](../ARCHITECTURE.md); [`BLUEPRINT.md` §5, §12, §13](../BLUEPRINT.md); [`MILESTONES.md` Phase 4](../MILESTONES.md); [`PHASE_3_TO_5_SPECIFICATION.md` §3](../PHASE_3_TO_5_SPECIFICATION.md#3-phase-4-native-system-intelligence-aegis-worlds-capabilities) | | [ADR 0005](0005-unified-memory-c1-cow-and-reservation-accounting.md) | Unified Memory C1 Copy-On-Write and Reservation Accounting | Accepted | 2026-09-23 | [`ARCHITECTURE.md` §2, §7](../ARCHITECTURE.md); [`BLUEPRINT.md` §9, §10, §28](../BLUEPRINT.md); [`MILESTONES.md` Phase 4, 5](../MILESTONES.md); [`PHASE_3_TO_5_SPECIFICATION.md` §4](../PHASE_3_TO_5_SPECIFICATION.md#4-phase-5-native-hardware-acceleration--hardware-bound-c1-compute) | | [ADR 0006](0006-deterministic-recovery-core-and-offline-operator-authority.md) | Deterministic Recovery Core and Offline Operator Authority | Accepted | 2026-09-23 | [`ARCHITECTURE.md` §1, §4, §6](../ARCHITECTURE.md); [`BLUEPRINT.md` §5, §6, §33](../BLUEPRINT.md); [`MILESTONES.md` Phase 2, 6](../MILESTONES.md); [`SYSTEMS_INTEGRATION_SEQUENCE.md` §2.5](../SYSTEMS_INTEGRATION_SEQUENCE.md#step-5-prove-recovery-core-before-the-model-adr-0006) | -| [ADR 0007](0007-continuous-existence-provisioning-once.md) | Continuous Existence and Provisioning-Once | Accepted | 2026-09-23 | [`CONTINUOUS_EXISTENCE_AMENDMENT.md`](../CONTINUOUS_EXISTENCE_AMENDMENT.md); [`ARCHITECTURE.md` §1, §10](../ARCHITECTURE.md); [`SYSTEMS_INTEGRATION_SEQUENCE.md` Steps 1–10](../SYSTEMS_INTEGRATION_SEQUENCE.md); [`MILESTONES.md` Phase 3, 6, 8](../MILESTONES.md); [ADR 0005](0005-unified-memory-c1-cow-and-reservation-accounting.md); [ADR 0006](0006-deterministic-recovery-core-and-offline-operator-authority.md) | +| [ADR 0007](0007-continuous-existence-provisioning-once.md) | Continuous Existence and Provisioning-Once | Accepted | 2026-09-23 | [`CONTINUOUS_EXISTENCE_AMENDMENT.md`](../CONTINUOUS_EXISTENCE_AMENDMENT.md); [`ARCHITECTURE.md` §1, §10](../ARCHITECTURE.md); [`SYSTEMS_INTEGRATION_SEQUENCE.md` Steps 1 to 10](../SYSTEMS_INTEGRATION_SEQUENCE.md); [`MILESTONES.md` Phase 3, 6, 8](../MILESTONES.md); [ADR 0005](0005-unified-memory-c1-cow-and-reservation-accounting.md); [ADR 0006](0006-deterministic-recovery-core-and-offline-operator-authority.md) | | [ADR 0008](0008-temporary-bring-up-firmware-report-exception.md) | Temporary bring-up exception: post-handoff firmware report (trigger 11) | Accepted (temporary) | 2026-09-24 | [ADR 0003](0003-bootstrap-firmware-handoff-and-minimal-object-store.md); [`MILESTONES.md` section 0](../MILESTONES.md); [`NATIVE_BOOT_ONE_TIME.md`](../NATIVE_BOOT_ONE_TIME.md) | | [ADR 0009](0009-el2-bootstrap-to-el1h-kernel-transition.md) | Two-Stage Exception Level Architecture (EL2 Bootstrap to EL1h Kernel) | Accepted | 2026-09-24 | [`ARCHITECTURE.md` §3, §6](../ARCHITECTURE.md); [`BLUEPRINT.md` §8, §15](../BLUEPRINT.md); [`MILESTONES.md` Phase 2, 3](../MILESTONES.md) | -| [ADR 0010](0010-fabric-machine-identity-and-capability-advertisement.md) | Fabric Machine Identity and Capability Advertisement | Proposed (post-M6) | 2026-09-24 | [`ARCHITECTURE.md` §2](../ARCHITECTURE.md); [`BLUEPRINT.md` §21, §25, §26](../BLUEPRINT.md); [`MILESTONES.md` Phase 8](../MILESTONES.md); [ADR 0004](0004-reversibility-definition-and-network-effect-boundary.md); [ADR 0007](0007-continuous-existence-provisioning-once.md); [issue #37](https://github.com/aien-spark/aienos/issues/37) | +| [ADR 0010](0010-fabric-machine-identity-and-capability-advertisement.md) | Fabric Machine Identity and Capability Advertisement | Proposed (post-M6) | 2026-09-24 | [`ARCHITECTURE.md` §2](../ARCHITECTURE.md); [`BLUEPRINT.md` §21, §25, §26](../BLUEPRINT.md); [`MILESTONES.md` Phase 8](../MILESTONES.md); [ADR 0004](0004-reversibility-definition-and-network-effect-boundary.md); [ADR 0007](0007-continuous-existence-provisioning-once.md); [issue #37](https://github.com/aien-dev/aienos/issues/37) | | [ADR 0011](0011-machine-1-hardware-test-rig.md) | Machine 1 Hardware Test Rig (Power, Capture, Input) | Proposed | 2026-09-24 | [`MILESTONES.md` section 0, gate M2C](../MILESTONES.md); [`HARDWARE_TEST_RIG.md`](../HARDWARE_TEST_RIG.md); [`NATIVE_BOOT_ONE_TIME.md`](../NATIVE_BOOT_ONE_TIME.md) | | [ADR 0012](0012-self-construction-capability-growth-and-generations.md) | Self-Construction, Capability Growth, and Reversible System Generations | Accepted | 2026-09-24 | [ADR 0002](0002-incumbent-os-as-migration-environment.md); [ADR 0006](0006-deterministic-recovery-core-and-offline-operator-authority.md); [ADR 0007](0007-continuous-existence-provisioning-once.md); [`ROADMAP.md`](../../ROADMAP.md) (SEED-0A, SEED-0B) | -| [ADR 0013](0013-aienos-abi-v1.md) | AIENOS ABI v1 | Proposed | 2026-09-24 | [ADR 0012](0012-self-construction-capability-growth-and-generations.md); [ADR 0004](0004-reversibility-definition-and-network-effect-boundary.md); [issue #30](https://github.com/aien-spark/aienos/issues/30); [PR #106](https://github.com/aien-spark/aienos/pull/106); [`abi.rs`](../../crates/aienos-kernel/src/abi.rs) | +| [ADR 0013](0013-aienos-abi-v1.md) | AIENOS ABI v1 | Proposed | 2026-09-24 | [ADR 0012](0012-self-construction-capability-growth-and-generations.md); [ADR 0004](0004-reversibility-definition-and-network-effect-boundary.md); [issue #30](https://github.com/aien-dev/aienos/issues/30); [PR #106](https://github.com/aien-dev/aienos/pull/106); [`abi.rs`](../../crates/aienos-kernel/src/abi.rs) | | [ADR 0014](0014-binary-artifact-v0-and-native-admission.md) | Binary Artifact v0 and Native Admission | Proposed | 2026-09-25 | [ADR 0012](0012-self-construction-capability-growth-and-generations.md); [ADR 0013](0013-aienos-abi-v1.md); SEED-0B qualification | | [ADR 0015](0015-system-store-v1-format.md) | AIENOS System Store v1 Format | Accepted for P3-1 format freeze | 2026-09-25 | [ADR 0003](0003-bootstrap-firmware-handoff-and-minimal-object-store.md); P3 Native Persistence & Continuity | | [ADR 0016](0016-continuity-objects-over-store-v1.md) | Continuity objects over System Store v1 | Proposed (format freeze needs operator approval) | 2026-09-25 | [ADR 0007](0007-continuous-existence-provisioning-once.md), [ADR 0015](0015-system-store-v1-format.md); M4 continuity | +| [ADR 0017](0017-m5-key-hierarchy-and-encrypted-store.md) | M5 Key Hierarchy, Encrypted Envelopes, and Storage Security Roots | Proposed | 2026-09-25 | [ADR 0006](0006-deterministic-recovery-core-and-offline-operator-authority.md); [ADR 0015](0015-system-store-v1-format.md); [ADR 0016](0016-continuity-objects-over-store-v1.md); Milestone M5 (Encryption and Identity) | | [ADR 0018](0018-allen-subject-state-object.md) | ALLEN Subject State Object (continuity kind 24) | Proposed (companion to ARCH-0035; format freeze needs operator approval) | 2026-10-04 | [ADR 0016](0016-continuity-objects-over-store-v1.md); omega ARCH-0022 Cortex; R16 | | [ADR 0019](0019-per-resource-capability-generation.md) | Per-resource capability generation (OSC unit `required_generation`, domain 1) | Accepted (Option 3; counter tracked in aienos#285) | 2026-10-08 | [ADR 0013](0013-aienos-abi-v1.md); [ADR 0014](0014-binary-artifact-v0-and-native-admission.md) amendment point 5; aien-protocols `specs/osc-unit-artifact` section 15.3 C1 | | [ADR 0020](0020-pi5-software-only-dma-confinement.md) | Pi 5 software-only DMA confinement (Pi-only exception to ADR 0012 rule 5) | Accepted (operator D3, 2026-10-13) | 2026-10-13 | [ADR 0012](0012-self-construction-capability-growth-and-generations.md) rule 5; `native/kernel/core/smmu.c` (Spark) | @@ -34,24 +35,24 @@ In addition to discrete decision records, AIENOS maintains formal technical spec | Document | Scope | Status | Authority | Target Phases | |---|---|---|---|---| -| [AIENOS Technical Specification & Contracts (Phases 3 – 5)](../PHASE_3_TO_5_SPECIFICATION.md) | Agent State ABI, Model ABI, Cortex Epistemic Store, AEGIS Effect Intent Pipeline, J-Space Worlds, and C1 CoW Prefix Tree | Confirmed Specification | Blueprint §§ 9–14, 17–19, 28 | Phases 3, 4, 5 | -| [AIENOS Systems Integration Sequence & Epistemic Calibration](../SYSTEMS_INTEGRATION_SEQUENCE.md) | 10-step empirical hardware integration sequence, epistemic claim precision, and host-tested vs. native-qualified gates | Governing Framework | Operator Directive (2026-09-23) | Phases 1 – 8 | -| [AIENOS Continuous-Existence Amendment](../CONTINUOUS_EXISTENCE_AMENDMENT.md) | Provisioning-once lifecycle, power states, state classes A/B/C, continuous-existence acceptance criteria for Gates 1–10 | Operator-Approved Governing Amendment | Operator Directive (2026-09-23); ADR 0007 | All Phases | +| [AIENOS Technical Specification & Contracts (Phases 3 to 5)](../PHASE_3_TO_5_SPECIFICATION.md) | Agent State ABI, Model ABI, Cortex Epistemic Store, AEGIS Effect Intent Pipeline, J-Space Worlds, and C1 CoW Prefix Tree | Confirmed Specification | Blueprint §§ 9 to 14, 17 to 19, 28 | Phases 3, 4, 5 | +| [AIENOS Systems Integration Sequence & Epistemic Calibration](../SYSTEMS_INTEGRATION_SEQUENCE.md) | 10-step empirical hardware integration sequence, epistemic claim precision, and host-tested vs. native-qualified gates | Governing Framework | Operator Directive (2026-09-23) | Phases 1 to 8 | +| [AIENOS Continuous-Existence Amendment](../CONTINUOUS_EXISTENCE_AMENDMENT.md) | Provisioning-once lifecycle, power states, state classes A/B/C, continuous-existence acceptance criteria for Gates 1 to 10 | Operator-Approved Governing Amendment | Operator Directive (2026-09-23); ADR 0007 | All Phases | | [AIENOS Final Architectural Blueprint](../BLUEPRINT.md) | Complete 37-section architectural foundation, core principles, and final success definitions | Immutable Foundation | Operator Directive | All Phases | -| [AIENOS Architectural Milestones Matrix](../MILESTONES.md) | 8-phase execution roadmap, deliverables, invariant contracts, and escalation triggers | Confirmed Specification | Blueprint §36 | Phases 1 – 8 | +| [AIENOS Architectural Milestones Matrix](../MILESTONES.md) | 8-phase execution roadmap, deliverables, invariant contracts, and escalation triggers | Confirmed Specification | Blueprint §36 | Phases 1 to 8 | | [AIENOS Governing Architecture](../ARCHITECTURE.md) | High-level system overview, stack, trusted base, agent authority, security, and roadmap | Confirmed Architecture | Operator Directive | All Phases | --- ## 3. Operator Invariant Freeze Summary (2026-09-23) -The operator confirmed immutable architectural invariants in ADR 0003–0007: +The operator confirmed immutable architectural invariants in ADRs 0003 to 0007: 1. **ADR 0003 (Firmware Handoff & AIEN System Store)**: Firmware loads the immutable boot bundle only. Firmware services are bootstrap machinery, never a runtime dependency. Phase 3 introduces a minimal native AIEN System Store (immutable content-addressed extents `model/`, Cortex WAL + checkpoints, agent branches) rather than a general-purpose POSIX filesystem. 2. **ADR 0004 (Reversibility & AEGIS Egress Boundary)**: Reversibility requires that all observable state changes remain under AIENOS transactional control. Outbound network packets, telemetry, and external device state are external effects (`EffectIntent`) crossing into AEGIS even when read-only. Reversibility and authorization are decoupled via Standing Capabilities; network access never bypasses AEGIS under the guise of "reversible research." 3. **ADR 0005 (Unified Memory & C1 Block Accounting)**: Unified memory (NVLink-C2C) requires explicit block ownership across System, Model, KV Pool, Agent State, and Cortex budgets. C1 CoW prefix tree uses shared immutable blocks (`refcount > 1`) and private blocks (`refcount == 1`). Multi-branch divergence mandates transactional KV reservations prior to step admission to prevent mid-step OOM corruption. Logical identity survives; physical state is expendable. 4. **ADR 0006 (Recovery Core & Offline Authority)**: Recovery Core is an autonomous, deterministic subsystem operating completely outside the model, neural runtime, and network stack. Root authority and authentication are strictly local (offline physical credentials/passphrase). System updates use transactional A/B slot switching with deterministic kernel health milestone verification. Kernel panics write deterministic crash records to raw storage, and Cortex corruption is resolved via WAL truncation without semantic AI dependencies. -5. **ADR 0007 (Continuous Existence & Provisioning-Once)**: AIEN is provisioned once. Boot, reboot, sleep, model reload, kernel restart, hardware failure, and migration are execution-state transitions—not agent creation events. Cold boot initializes hardware and never silently mints a replacement `LogicalAgentId`. Uncertain identity fails toward Recovery Core and operator decision, never toward false continuity. Gate order (1–10) is unchanged; continuous-existence acceptance criteria bind every gate. +5. **ADR 0007 (Continuous Existence & Provisioning-Once)**: AIEN is provisioned once. Boot, reboot, sleep, model reload, kernel restart, hardware failure, and migration are execution-state transitions, not agent creation events. Cold boot initializes hardware and never silently mints a replacement `LogicalAgentId`. Uncertain identity fails toward Recovery Core and operator decision, never toward false continuity. Gate order (1 to 10) is unchanged; continuous-existence acceptance criteria bind every gate. --- diff --git a/docs/crumbs/.crumb b/docs/crumbs/.crumb index aca9512e..e48c31f7 100644 --- a/docs/crumbs/.crumb +++ b/docs/crumbs/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-14T01:16:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:5dc4f124f1c023aa4786f45336a671138fce9fa046478364cdc7454307d7b588", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "f78977a6ce33ea89a5b3b1952c0a0e403d4504fa", - "source_tree": "sha256:faea024f49787ed8180a590d705866486b71504ea61a285870ec3b8401eb5786" - }, "owner_lane": "", "seed": { "files": [ diff --git a/evidence/timer_window_starvation_2026-10-19/README.md b/evidence/timer_window_starvation_2026-10-19/README.md new file mode 100644 index 00000000..977cbedb --- /dev/null +++ b/evidence/timer_window_starvation_2026-10-19/README.md @@ -0,0 +1,31 @@ +# M1 timer window starvation (aienos#434 gate AIENOS-CK-QEMU-GATES, rc_nonzero), 2026-10-19 + +## Symptom +Judge run of aienos#434 head 49e6f6a: `AIENOS-CK-QEMU-GATES` FAIL rc_nonzero. The failing child was the +Allen gate (`[allen] exit 1`), whose M1 checks (`scripts/lib_ck_m1_checks.sh`) rejected the timer window: +"timer IRQ delivered fewer than five ticks" or "tick statistics out of range". The same head passes +when the Spark is quiet (5/5 `qemu_ck_allen_test.sh` runs PASS), so the code under test was not at fault. + +## Cause +`ck_timer_window` is wall-clock (200 ms). QEMU TCG shares the Spark with the whole hive (load 20 to 67). +A starved vCPU runs fewer than five 10 ms ticks inside the 200 ms window, and `ck_timer_tick` read the +counter a second time after re-arming, so a host stall between the two reads made one interval long and the +next one short (min_us as low as 9 against a 10000 us period). + +## Fix (native/kernel/arch/timer.c, scripts/ck_gates.sh) +1. An interval runs from IRQ entry to IRQ entry, the same counter value the next deadline is built from, so + it is never shorter than the period. +2. The window keeps counting, up to 5 s, until five ticks have arrived. A dead timer still reports 0 ticks. +3. A failing child's own FAIL lines are now copied into the gate's evidence blob (the child log lives in a + temp folder that is removed at exit, which is why the first failure could not be read afterwards). + +## Measurement (Spark, 20 boots of `scripts/qemu_ck_boot_test.sh` per arm, pinned to CPU 3 with 5 busy loops +on the same CPU at the same nice level; `pinned-stress.sh`) +| arm | pass | fail | +|---|---|---| +| before the fix (origin/main 18e2765) | 2 | 18 | +| after the fix (fix/timer-window-starvation) | 20 | 0 | + +Red: `red-before-fix-fails.txt`, `red-before-fix-stats.txt`. Green: `green-after-fix-stats.txt`. +Quiet machine, 5 runs of the Allen gate before the fix: 5/5 PASS (so the fix changes nothing when idle). +Also run after the fix: `scripts/ck_gates.sh --self-test` PASS, `make -C native/kernel test` PASS (CK_CORE_HOST). diff --git a/evidence/timer_window_starvation_2026-10-19/green-after-fix-stats.txt b/evidence/timer_window_starvation_2026-10-19/green-after-fix-stats.txt new file mode 100644 index 00000000..7b050800 --- /dev/null +++ b/evidence/timer_window_starvation_2026-10-19/green-after-fix-stats.txt @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/evidence/timer_window_starvation_2026-10-19/pinned-stress.sh b/evidence/timer_window_starvation_2026-10-19/pinned-stress.sh new file mode 100644 index 00000000..0dded3dd --- /dev/null +++ b/evidence/timer_window_starvation_2026-10-19/pinned-stress.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# usage: pinned-stress.sh WORKTREE N HOGS TAG : N boot tests pinned to CPU 3 with HOGS busy loops on CPU 3 (same nice), counts FAILs +cd "$1" || exit 1 +D=$HOME/workspace/hermes-desk/allen-logs/$4; mkdir -p "$D"; : > "$D/fails.txt" +for i in $(seq 1 "$3"); do timeout 1200 taskset -c 3 nice -n 19 sh -c 'while :; do :; done' & done +pass=0; fail=0 +for i in $(seq 1 "$2"); do + taskset -c 3 nice -n 19 bash scripts/qemu_ck_boot_test.sh > "$D/run-$i.txt" 2>&1 + rc=$? + if [ $rc = 0 ]; then pass=$((pass+1)); else fail=$((fail+1)); echo "run $i rc=$rc" >> "$D/fails.txt"; grep -h "^FAIL" "$D/run-$i.txt" >> "$D/fails.txt"; fi + grep -h "timer_irq\|timer_stats" "$D/run-$i.txt" | tr '\n' ' ' >> "$D/stats.txt"; echo >> "$D/stats.txt" +done +echo "$4 pass=$pass fail=$fail" >> $HOME/workspace/hermes-desk/allen-logs/summary.txt +kill $(jobs -p) 2>/dev/null diff --git a/evidence/timer_window_starvation_2026-10-19/red-before-fix-fails.txt b/evidence/timer_window_starvation_2026-10-19/red-before-fix-fails.txt new file mode 100644 index 00000000..e04b0407 --- /dev/null +++ b/evidence/timer_window_starvation_2026-10-19/red-before-fix-fails.txt @@ -0,0 +1,38 @@ +run 1 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 2 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 3 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 4 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 5 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 6 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 7 rc=1 +FAIL timer IRQ delivered fewer than five ticks +FAIL tick statistics out of range: timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=0 avg_us=0 max_us=0 +run 10 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 11 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 12 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 13 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 14 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 15 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 16 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 17 rc=1 +FAIL timer IRQ delivered fewer than five ticks +FAIL tick statistics out of range: timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=0 avg_us=0 max_us=0 +run 18 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 19 rc=1 +FAIL timer IRQ delivered fewer than five ticks +run 20 rc=1 +FAIL timer IRQ delivered fewer than five ticks diff --git a/evidence/timer_window_starvation_2026-10-19/red-before-fix-stats.txt b/evidence/timer_window_starvation_2026-10-19/red-before-fix-stats.txt new file mode 100644 index 00000000..8e1b3f15 --- /dev/null +++ b/evidence/timer_window_starvation_2026-10-19/red-before-fix-stats.txt @@ -0,0 +1,20 @@ +timer_irq: 3 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=22261 avg_us=63425 max_us=127049 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=22671 avg_us=99331 max_us=175990 +timer_irq: 1 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=189039 avg_us=189039 max_us=189039 +timer_irq: 1 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=251606 avg_us=251606 max_us=251606 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=28106 avg_us=127561 max_us=227016 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=18965 avg_us=65979 max_us=112993 +FAIL tick statistics out of range: timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=0 avg_us=0 max_us=0 timer_irq: 0 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=0 avg_us=0 max_us=0 + + +timer_irq: 1 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=64112 avg_us=64112 max_us=64112 +timer_irq: 1 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=234449 avg_us=234449 max_us=234449 +timer_irq: 1 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=128576 avg_us=128576 max_us=128576 +timer_irq: 3 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=18093 avg_us=67359 max_us=120038 +timer_irq: 3 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=61419 avg_us=83425 max_us=126006 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=63812 avg_us=125928 max_us=188044 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=120501 avg_us=124589 max_us=128677 +FAIL tick statistics out of range: timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=0 avg_us=0 max_us=0 timer_irq: 0 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=0 avg_us=0 max_us=0 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=62871 avg_us=125027 max_us=187183 +timer_irq: 2 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=63837 avg_us=125671 max_us=187505 +timer_irq: 1 ticks in 200 ms timer_stats: intid=30 freq_hz=62500000 period_us=10000 min_us=62338 avg_us=62338 max_us=62338 diff --git a/native/.crumb b/native/.crumb index dbbce44e..14e7ba1a 100644 --- a/native/.crumb +++ b/native/.crumb @@ -46,79 +46,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "50aa2fbd6ca356b7703517bc7ecf439f7b6e0a6b935d0ca6ca4c6f7caf23ce34", - "last_commit": "4bd49ca", - "name": "argus", - "purpose": "Directory native/argus. Purpose not yet described by a human." - }, - { - "digest": "7bd231b92b38492fbb936e28caa803047edd9250800eac92fe56e09d38bf98cd", - "last_commit": "bfea771", - "name": "boot", - "purpose": "Directory native/boot. Purpose not yet described by a human." - }, - { - "digest": "750c519c466783ed6330a6a2c8fcb2153efdaadb9d65b38a6a85e8463d78b68d", - "last_commit": "4bd49ca", - "name": "capability", - "purpose": "Directory native/capability. Purpose not yet described by a human." - }, - { - "digest": "0a3e98a5f36f528eb7ae6e1611d466343068780b9029621286b292ec1c796950", - "last_commit": "4bd49ca", - "name": "crypto", - "purpose": "Directory native/crypto. Purpose not yet described by a human." - }, - { - "digest": "99bc55e79695290b65ae08a38e5731e3ed976d79cdb3b6c9bc21c706b1ddab22", - "last_commit": "4bd49ca", - "name": "disk", - "purpose": "Directory native/disk. Purpose not yet described by a human." - }, - { - "digest": "7a81b1b4b47154e15b9682b72d7fa49f309454f093aeb019061b8148550920ae", - "last_commit": "3037967", - "name": "kernel", - "purpose": "Directory native/kernel. Purpose not yet described by a human." - }, - { - "digest": "a805df7e3af4b8a2ef345223523b54e7e47565204ec8f8e598f6dcaf53b07419", - "last_commit": "4bd49ca", - "name": "m5", - "purpose": "Directory native/m5. Purpose not yet described by a human." - }, - { - "digest": "ff5c88f5e9bf86e7ff836d24c048dd2d4efc94f6f19a21a0caf72ae9c402deaf", - "last_commit": "4bd49ca", - "name": "net", - "purpose": "Directory native/net. Purpose not yet described by a human." - }, - { - "digest": "135fd1edbe2388764de7dc755611b483b0c61adab858718c390b7745d141635c", - "last_commit": "4bd49ca", - "name": "sig", - "purpose": "Directory native/sig. Purpose not yet described by a human." - }, - { - "digest": "f75197d76b7daaeee8223cf25353251824cd4497400a439724a3a424e014a229", - "last_commit": "4bd49ca", - "name": "store", - "purpose": "Directory native/store. Purpose not yet described by a human." - } - ], - "children_root": "sha256:cec690f1b64aaba9f5f7ea41048a25c5b3cdf4834f672e977dc7eb47d34e4be2", - "compiled_at": "2026-10-17T01:49:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:64cc87f8507bb580e1788d335c5a76039f3e3a016552595526718448ab5aa098", - "evidence_files": 4, - "evidence_root": "sha256:e410b845507e00568e15b51a5797af32a97e0e4b8ab4e8487bb7c98e7e0cf335", - "files": 606, - "generated_at_commit": "30379678add587e388db4e11713d6bca8d159b08", - "source_tree": "sha256:1d9fe182bcaa94de3564ee02f9e8c63bddcea00fcea22feed112ffe6e01a1b78" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/argus/.crumb b/native/argus/.crumb index ac2f33a7..155e0b65 100644 --- a/native/argus/.crumb +++ b/native/argus/.crumb @@ -18,37 +18,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "8fa25040d5da98cfa76b5c39ed4b48f9f02252e42b00d0eaf84b99265813c0f1", - "last_commit": "1625f69", - "name": "bridge", - "purpose": "Directory native/argus/bridge. Purpose not yet described by a human." - }, - { - "digest": "c519b9b561e14e4c8017f79c86093d14b250c72e5c17258d77507130dd420a44", - "last_commit": "09e59a8", - "name": "docs", - "purpose": "Directory native/argus/docs. Purpose not yet described by a human." - }, - { - "digest": "9da71b144b276a79663b8240d09f6ee8ec187a336b45c48dc47adeca8012a11c", - "last_commit": "130aa20", - "name": "tests", - "purpose": "Directory native/argus/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:60f887eb1e514a9e647f622c81848e2accd452e38b157103e8a9f58a32bb1694", - "compiled_at": "2026-10-14T13:28:10Z", - "compiler": "crumb-compile/1", - "digest": "sha256:50aa2fbd6ca356b7703517bc7ecf439f7b6e0a6b935d0ca6ca4c6f7caf23ce34", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 47, - "generated_at_commit": "a0fa796235409ce465c467e8c72fbd977485d8f7", - "source_tree": "sha256:9511497343ad28d30fb7c58c0d11c87ab936d6e95ff561bf245ea2e5acbbb4f1" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/argus/bridge/.crumb b/native/argus/bridge/.crumb index 4b34c68b..9e93e9fd 100644 --- a/native/argus/bridge/.crumb +++ b/native/argus/bridge/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:8fa25040d5da98cfa76b5c39ed4b48f9f02252e42b00d0eaf84b99265813c0f1", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:f6e5004e675b332b7d7173fba4c502a341aec78a02e2e917f0092f83cf39b401" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/argus/docs/.crumb b/native/argus/docs/.crumb index 04dcec57..1aae1188 100644 --- a/native/argus/docs/.crumb +++ b/native/argus/docs/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-14T01:16:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:c519b9b561e14e4c8017f79c86093d14b250c72e5c17258d77507130dd420a44", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 5, - "generated_at_commit": "f78977a6ce33ea89a5b3b1952c0a0e403d4504fa", - "source_tree": "sha256:e107063b520edc71b65a5716f848d41682145c2f69d9acde5b291834208eea85" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/argus/tests/.crumb b/native/argus/tests/.crumb index 8bba1f25..c7c18abd 100644 --- a/native/argus/tests/.crumb +++ b/native/argus/tests/.crumb @@ -10,18 +10,6 @@ } ], "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-14T13:28:10Z", - "compiler": "crumb-compile/1", - "digest": "sha256:9da71b144b276a79663b8240d09f6ee8ec187a336b45c48dc47adeca8012a11c", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 24, - "generated_at_commit": "a0fa796235409ce465c467e8c72fbd977485d8f7", - "source_tree": "sha256:9b3b6e1d929d015275c4ed69028acc5b2ea489d66c53540908bb375803fa13f1" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/argus/tests/fixtures/argus1/.crumb b/native/argus/tests/fixtures/argus1/.crumb index d6e458ec..a11a4c20 100644 --- a/native/argus/tests/fixtures/argus1/.crumb +++ b/native/argus/tests/fixtures/argus1/.crumb @@ -4,18 +4,6 @@ "path": "../.." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:6015c201f5b44accd324bff7b333661ce3fec741c4df4cb97cff7dc88bbb6136", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 4, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:9981995798edce4b48ab377bc2702188e98e7c9d45456eb3e8584f99ba7c13c1" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/boot/.crumb b/native/boot/.crumb index cc53e7fd..a879ca1c 100644 --- a/native/boot/.crumb +++ b/native/boot/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-16T23:33:50Z", - "compiler": "crumb-compile/1", - "digest": "sha256:7bd231b92b38492fbb936e28caa803047edd9250800eac92fe56e09d38bf98cd", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 26, - "generated_at_commit": "4bd49ca164761fe66c6eb339acabdbcc84e8a33c", - "source_tree": "sha256:57b9a2e0d628acd6b2c2d1dab4fc1a4eafec507bc2601b54d92f96fc46393666" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/capability/.crumb b/native/capability/.crumb index 5c3d300d..9163c9f4 100644 --- a/native/capability/.crumb +++ b/native/capability/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "78115cdbda04ee0b7568424dbdba2833bd201f01118cf01464cb17653fc26aee", - "last_commit": "b84c0a6", - "name": "tests", - "purpose": "Directory native/capability/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:0c70cfa122966e11065bca94434dcb159c75a4557cf6322bbc5256e28d49f2e5", - "compiled_at": "2026-10-14T14:58:51Z", - "compiler": "crumb-compile/1", - "digest": "sha256:750c519c466783ed6330a6a2c8fcb2153efdaadb9d65b38a6a85e8463d78b68d", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 8, - "generated_at_commit": "596870d6ef47c5238cc2c7fa1c08f5e5486e5d84", - "source_tree": "sha256:bb4b4f4706f6b22f2cb4a92ec9ed82733cff2ef5c3a626843e3ee584785e8b9b" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/capability/tests/.crumb b/native/capability/tests/.crumb index aab86d5f..b55bf613 100644 --- a/native/capability/tests/.crumb +++ b/native/capability/tests/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-06T14:20:29Z", - "compiler": "crumb-compile/1", - "digest": "sha256:78115cdbda04ee0b7568424dbdba2833bd201f01118cf01464cb17653fc26aee", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 2, - "generated_at_commit": "2529de3fb99083fbf46e3b028806efd8b2789259", - "source_tree": "sha256:f9e15c7c882c1946001bb923ff71e3650d0bb777a187a228a21df8d21decb860" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/crypto/.crumb b/native/crypto/.crumb index bd1d3cb2..b261158d 100644 --- a/native/crypto/.crumb +++ b/native/crypto/.crumb @@ -10,25 +10,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "dac1583f9b7627f80272af9cf90ef4e62dccc25593f8c4ee1ffbc2471b8f3462", - "last_commit": "a4bba0c", - "name": "tests", - "purpose": "Directory native/crypto/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:db2c6d092f9d97c30dc5cc4531ae25cb558d206d66ca31f94ca14d0ff2cfacea", - "compiled_at": "2026-10-14T14:58:51Z", - "compiler": "crumb-compile/1", - "digest": "sha256:0a3e98a5f36f528eb7ae6e1611d466343068780b9029621286b292ec1c796950", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 10, - "generated_at_commit": "596870d6ef47c5238cc2c7fa1c08f5e5486e5d84", - "source_tree": "sha256:25932bcca4e7eea369babe75a4e82b72000bb1d1b2437272f2c2a73fb70ffd57" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/crypto/tests/.crumb b/native/crypto/tests/.crumb index 3e27d979..a266c206 100644 --- a/native/crypto/tests/.crumb +++ b/native/crypto/tests/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-04T13:47:18Z", - "compiler": "crumb-compile/1", - "digest": "sha256:dac1583f9b7627f80272af9cf90ef4e62dccc25593f8c4ee1ffbc2471b8f3462", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 1, - "generated_at_commit": "a863d5c1f5bd89c88c5f6671eecfd27b599ee512", - "source_tree": "sha256:8d8a1d7e007ce2f36bca8e9edb7c6e6849804b50612c56b412d739a2603ed907" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/disk/.crumb b/native/disk/.crumb index 0d481d00..9db8f080 100644 --- a/native/disk/.crumb +++ b/native/disk/.crumb @@ -14,31 +14,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "54a25a2ce38d5cde54cce87582dfdcd66b3f21ba3ae18d330c8c66a7004b386a", - "last_commit": "2563059", - "name": "qemu", - "purpose": "Directory native/disk/qemu. Purpose not yet described by a human." - }, - { - "digest": "28bc8b4021cec8ccd5b90c15d11db3fe7dd396db65e062f5e1046631fa2e4755", - "last_commit": "2563059", - "name": "tests", - "purpose": "Directory native/disk/tests. Purpose not yet described by a human." - } - ], - "children_root": "sha256:fb9a25a745be4f0d38936d5ff30f3fafdc68a80d6aaeff667fde54d196d6b132", - "compiled_at": "2026-10-14T14:58:51Z", - "compiler": "crumb-compile/1", - "digest": "sha256:99bc55e79695290b65ae08a38e5731e3ed976d79cdb3b6c9bc21c706b1ddab22", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 20, - "generated_at_commit": "596870d6ef47c5238cc2c7fa1c08f5e5486e5d84", - "source_tree": "sha256:667e44de55a53f223607fe87bd5ccd445c674f962fd5baa7570a467b3fedeb1a" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/disk/qemu/.crumb b/native/disk/qemu/.crumb index c6819a14..d49b9070 100644 --- a/native/disk/qemu/.crumb +++ b/native/disk/qemu/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-13T05:44:11Z", - "compiler": "crumb-compile/1", - "digest": "sha256:54a25a2ce38d5cde54cce87582dfdcd66b3f21ba3ae18d330c8c66a7004b386a", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 6, - "generated_at_commit": "1994c4f8c4e8521d7febed45306515aa5085f207", - "source_tree": "sha256:4d0fc11e9b44f17aac5aaf0d404e6a384fb933c953e68d948403f563f6a054d4" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/disk/tests/.crumb b/native/disk/tests/.crumb index 92672421..2e1d691f 100644 --- a/native/disk/tests/.crumb +++ b/native/disk/tests/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-13T05:44:11Z", - "compiler": "crumb-compile/1", - "digest": "sha256:28bc8b4021cec8ccd5b90c15d11db3fe7dd396db65e062f5e1046631fa2e4755", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 3, - "generated_at_commit": "1994c4f8c4e8521d7febed45306515aa5085f207", - "source_tree": "sha256:cccd4c2564da56cc8dfc304b792f4f7949c5fa157a28feb973042d2dd93d93cb" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/kernel/.crumb b/native/kernel/.crumb index 57d1b019..268d86f2 100644 --- a/native/kernel/.crumb +++ b/native/kernel/.crumb @@ -42,73 +42,6 @@ } ], "extensions": { - "generated": { - "children": [ - { - "digest": "8f63182b423b274a3fa6dcf0a17811343f93bd1539e33479102ffa87935da1ca", - "last_commit": "4bd49ca", - "name": "arch", - "purpose": "Directory native/kernel/arch. Purpose not yet described by a human." - }, - { - "digest": "cd3be26829bc7f947521b1e5df144df2504ef25a3763ec0356861b7d17d5d901", - "last_commit": "4bd49ca", - "name": "artifact", - "purpose": "Directory native/kernel/artifact. Purpose not yet described by a human." - }, - { - "digest": "c9035b8f32a9539fe8d1f93ed968b3b56dd3ba4c2630b32b6c286b1dbd19d908", - "last_commit": "4bd49ca", - "name": "core", - "purpose": "Directory native/kernel/core. Purpose not yet described by a human." - }, - { - "digest": "ebdd66c0966fba664f36dc167836b98d26ffae97f9502b4409e9c22da687b473", - "last_commit": "4bd49ca", - "name": "dev", - "purpose": "Directory native/kernel/dev. Purpose not yet described by a human." - }, - { - "digest": "8198bb9a0fbd634281a251b012eca8874c97e469a45eec8b5a6bf06a7e828f9a", - "last_commit": "4bd49ca", - "name": "include", - "purpose": "Directory native/kernel/include. Purpose not yet described by a human." - }, - { - "digest": "8252fab960e4a3bb686f2e864b0d9a0571f43381d5006de2ff6c134c132ef092", - "last_commit": "4bd49ca", - "name": "mm", - "purpose": "Directory native/kernel/mm. Purpose not yet described by a human." - }, - { - "digest": "2a98333d826d94a7131119aaeb5a15d8bc543baa5531fa930e6f0afc1fccb83d", - "last_commit": "4bd49ca", - "name": "svc", - "purpose": "Directory native/kernel/svc. Purpose not yet described by a human." - }, - { - "digest": "0f3d28a645346382567a7a279a3e02a095c8e7f298967db175944c0a58ca9c5d", - "last_commit": "3037967", - "name": "tests", - "purpose": "Directory native/kernel/tests. Purpose not yet described by a human." - }, - { - "digest": "412f0a290f187935193ec94f1817c46dbe0edc07a5eb427e39977b65c1d00f9f", - "last_commit": "3037967", - "name": "tools", - "purpose": "Hosted (Linux-built) checkers for the native kernel, run by `make -C native/kernel test`; nothin" - } - ], - "children_root": "sha256:658a040f493b6ff9dc4a775b2b73a0c89ded592a235231016dd8594094530e0f", - "compiled_at": "2026-10-17T01:49:45Z", - "compiler": "crumb-compile/1", - "digest": "sha256:7a81b1b4b47154e15b9682b72d7fa49f309454f093aeb019061b8148550920ae", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 421, - "generated_at_commit": "30379678add587e388db4e11713d6bca8d159b08", - "source_tree": "sha256:cfa9d56bd0bae125be856e13a57758e007e620d1fc9501643728e676f53eaabe" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/kernel/GATES.md b/native/kernel/GATES.md index b7e37370..cf9840d9 100644 --- a/native/kernel/GATES.md +++ b/native/kernel/GATES.md @@ -858,6 +858,33 @@ real asynchronous events. (4) Numeric resource-class and operation ids, the REVO are this adapter's choices (UNVERIFIED against a frozen contract). (5) The request digest covers the request cells and the OUT bytes; the contract's exact digest input is not defined (UNVERIFIED). (6) The "task" is the adapter's session; the EL0 shell units hold no capability (caps=0) and the check is made by the kernel-side adapter. +## PIPE: the native bounded byte pipe (AIENOS-NATIVE-PIPE-1, aienos-mv#428) -> CK `PIPE` (scripts/qemu_ck_pipe_test.sh) + +Label: **QEMU (aarch64 virt), TEST build, not physical.** Host and QEMU evidence qualify nothing physical; nothing here ran on +a Spark, a Pi or the iMac. Contract: OSH_PLATFORM_ABI sections 4.4, 8.1, 8.5, 8.6, 9 read at aien-protocols-mv `fb5fca98e667` +(v1 DRAFT, unfrozen). The image is `make CK_PIPE_TEST=1` (own OUT `target/native-kernel-test-pipe`, refused with +`CK_HARDWARE_STAGING` and `CK_SERVICE`; default images are checked to carry no trace of it). After `kernel: alive` it runs +`core/pipe_test.c`: a producer and a consumer task, step functions interleaved by `core/sched.c`, each holding one end of a +`core/pipe.c` pipe in its own capability table (`core/ipc.c`), through the same driver as the host test (`core/pipe_drive.h`); +then the boot goes on to its report and PSCI reset. Checks, one boot, every one with both tables and the pool empty afterwards: +160 KiB payload with every fifth byte NUL byte for byte; a slow consumer fills the 64 KiB pipe and the producer sees WOULD_BLOCK; +EOF after the last writer closes; never more than the capacity buffered; the blocking variant parks and wakes through the +scheduler; BROKEN_PIPE with no reader; a write after revoke refused with 0 bytes delivered after it; a revoke mid-transfer with no +read succeeding afterwards; a closed handle STALE after its slot is reused; an unknown op and another ABI version NOT_SUPPORTED; +cancel INTERRUPTED once with no byte moved. Host test `test_pipe` (the 20-case corpus in `tests/fixtures/pipe/` plus the +scheduler transfers, also under ASan+UBSan); a mutant that skips the write-right check must fail it (`make pipe-mutant`). +Limits: (1) the kernel's wait hook yields cooperatively to the scheduler inside one kernel thread; blocking a real M3 thread with +a context switch is not exercised. (2) Revoke, close and cancel "while waiting" are run by the peer task's step or the host test's +scripted wait hook, not by asynchronous interrupts. (3) The op ids, the call frame cell layout, the second return value of +PIPE_CREATE, the capability resource layout, the pool size (4 pipes) and STREAM_DUP's capability form (rights and a target table +instead of a descriptor number) are this kernel's choices, UNVERIFIED against a frozen contract. (4) A ck_cap_table has 8 slots, +below the draft's "3 standard streams plus 16 open streams" per session; a session with more streams needs a larger table. +(5) No QEMU negative control mutates the kernel image; the red-before-green control is the host mutant. + +| # | Check | CK gate | Status | +|---|---|---|---| +| 221 | `CK_PIPE_TEST=1` image: 11 `pipe_check` lines PASS with `tables_empty=1`, `pipe_test: done checks=11 failed=0 capacity=65536 pool_pipes=4`, payload detail `bytes=163840 ... mismatches=0 would_block>0`, revoked write `n=0 ... bytes_delivered=0`, boot report reached, no panic, QEMU exit 0 | PIPE | QEMU PASS (2026-10-18, base ee34c7d plus this change, QEMU 8.2.2, AIENOS_CK_PIPE PASS; hardware NOT_RUN) | + ## LIFECYCLE: resident production lifecycle (native v1 plan P03, P04 cuts 1-2b, P05 cut 1, P06 cuts 2-4; C-only) -> CK `LIFECYCLE` (scripts/qemu_ck_lifecycle_test.sh) diff --git a/native/kernel/Makefile b/native/kernel/Makefile index 20a92ad3..7dd30fb5 100644 --- a/native/kernel/Makefile +++ b/native/kernel/Makefile @@ -464,6 +464,21 @@ endif OUT ?= $(REPO)/target/native-kernel-test-rollback-$(strip $(CK_TEST_ROLLBACK)) SMP_TEST_FLAGS += -DCK_TEST_ROLLBACK_$(subst -,_,$(shell echo '$(strip $(CK_TEST_ROLLBACK))' | tr a-z A-Z))=1 endif +# AIENOS-NATIVE-PIPE-1 (aienos-mv#428): CK_PIPE_TEST=1 adds the TEST-ONLY pipe self-test (core/pipe_test.c, gate +# scripts/qemu_ck_pipe_test.sh): after "kernel: alive" it drives the pipe primitive (core/pipe.c) with a producer and a +# consumer task through the scheduler and prints pipe_check lines. Own OUT; announces itself; refused with +# CK_HARDWARE_STAGING and CK_SERVICE. Default images are checked to carry no trace of it (pipe_check). +CK_PIPE_TEST ?= +ifneq ($(strip $(CK_PIPE_TEST)),) +ifneq ($(strip $(CK_PIPE_TEST)),1) +$(error CK_PIPE_TEST must be empty or 1) +endif +ifneq ($(strip $(CK_HARDWARE_STAGING)),) +$(error CK_PIPE_TEST (TEST-only pipe self-test) cannot be combined with CK_HARDWARE_STAGING) +endif +OUT ?= $(REPO)/target/native-kernel-test-pipe +SMP_TEST_FLAGS += -DCK_PIPE_TEST=1 +endif # SLOTLDR.EFI trusted keys (native v1 plan P11 cut 2a; native/boot/slot_loader.c, # make slot-loader): # CK_SLOT_KEYS= owner public keys, "owner_root_ed25519 <64 hex>" lines @@ -644,7 +659,7 @@ endif ifneq ($(strip $(CK_CONSOLE_SESSION)),) $(error CK_SERVICE cannot be combined with CK_CONSOLE_SESSION) endif -ifneq ($(strip $(CK_TEST_XHCI_MUTATION)$(CK_TEST_STORE_CRASH)$(CK_TEST_CONTINUITY)$(CK_TEST_FWCFG_ARTIFACTS)$(CK_TEST_SMP_SKIP_CPU)$(CK_TEST_ROLLBACK)$(CK_TEST_STALE_HANDOFF)$(CK_TEST_DISK_XLATE_BYPASS)),) +ifneq ($(strip $(CK_TEST_XHCI_MUTATION)$(CK_TEST_STORE_CRASH)$(CK_TEST_CONTINUITY)$(CK_TEST_FWCFG_ARTIFACTS)$(CK_TEST_SMP_SKIP_CPU)$(CK_TEST_ROLLBACK)$(CK_TEST_STALE_HANDOFF)$(CK_TEST_DISK_XLATE_BYPASS)$(CK_PIPE_TEST)),) $(error CK_SERVICE cannot be combined with a CK_TEST_* flag) endif endif @@ -912,6 +927,9 @@ ART_C += $(KDIR)/core/artifact_card.c $(KDIR)/core/artifact_card_stage.c CORE_C += $(BOOT)/efi_artifact.c endif CORE_C += $(ART_C) +ifeq ($(strip $(CK_PIPE_TEST)),1) +CORE_C += $(KDIR)/core/pipe.c $(KDIR)/core/pipe_test.c +endif CORE_S := $(BOOT)/efi_entry.S $(KDIR)/arch/vectors.S $(KDIR)/arch/m3.S $(KDIR)/arch/smp_entry.S HDRS := $(wildcard $(KDIR)/include/*.h $(KDIR)/*/*.h $(BOOT)/*.h) @@ -1207,6 +1225,15 @@ define rollback_check fi endef +# pipe_check(elf): only a CK_PIPE_TEST image may carry the TEST-only pipe self-test, and it must announce itself. +define pipe_check + @if [ "$(strip $(CK_PIPE_TEST))" = 1 ]; then \ + grep -aqF "TEST-ONLY pipe self-test" $(1) || { echo "pipe test image lacks its TEST-ONLY announcement"; rm -f $(1); exit 1; }; \ + else \ + if grep -aqF "TEST-ONLY pipe self-test" $(1); then echo "default image carries the TEST-ONLY pipe self-test"; rm -f $(1); exit 1; fi; \ + fi +endef + # smp_check(elf): only a CK_TEST_SMP_SKIP_CPU image may carry the SMP mutation # announcement, and such an image must carry it. define smp_check @@ -1298,6 +1325,7 @@ $(ELF): $(CORE_OBJS) $(BOOT)/image.ld @if [ -z "$(strip $(CK_TEST_STALE_HANDOFF))" ] && grep -aqF "TEST-ONLY stale handoff" $@; then \ echo "default image carries the TEST-only stale handoff"; rm -f $@; exit 1; fi $(call rollback_check,$@) + $(call pipe_check,$@) @s=$$($(KNM) $@ | grep -E ' [TtDdBbWwVv] ck_stage_(devices|security|store|quiesce)$$' || true); \ if [ -n "$$s" ]; then echo "core image defines stage symbols: $$s"; rm -f $@; exit 1; fi $(call fwcfg_check,$@) @@ -1307,6 +1335,7 @@ $(ELF): $(CORE_OBJS) $(BOOT)/image.ld $(FULL_ELF): $(CORE_OBJS) $(STAGE_BUILT) $(BOOT)/image.ld $(call link_image,$@,$(CORE_OBJS) $(STAGE_LINK) $(CK_RUST_LIBS) $(CK_INFER_LIB)) $(call rollback_check,$@) + $(call pipe_check,$@) @for s in $(FULL_STAGE_SYMS); do \ $(KNM) $@ | grep -qE " [TW] $$s$$" || { echo "full image lacks $$s"; rm -f $@; exit 1; }; done $(call fwcfg_check,$@) @@ -1332,7 +1361,7 @@ HOST_SRCS := $(KDIR)/core/fmt.c $(KDIR)/core/acpi.c $(KDIR)/core/smmu.c $(KDIR)/ $(KDIR)/core/line_rx.c $(KDIR)/core/klog.c $(KDIR)/core/klog_slot.c $(KDIR)/core/cpufeat.c $(KDIR)/core/unlock_req.c $(KDIR)/core/agent_cmd.c $(KDIR)/core/artifact_card.c TESTS := test_fmt test_frames test_pt test_acpi test_acpi_dev test_heap test_smmu test_sched test_ipc test_artifact test_osc_unit test_osc_launch test_osc_admit test_osc_receipt test_entropy test_handoff test_fbcon test_osh_op \ test_continuity_codec test_continuity_resolve test_continuity_commit test_continuity_recovery test_continuity_geometry \ - test_continuity_subject test_continuity_subject_provision test_lifecycle test_console_rx test_klog test_klog_slot test_pi5 test_pi5_marker test_pi5_rng test_cpufeat test_dma_window test_pi5_pcie test_pi5_net test_pi5_gem test_unlock_req test_context test_agent_cmd test_artifact_card + test_continuity_subject test_continuity_subject_provision test_lifecycle test_console_rx test_klog test_klog_slot test_pi5 test_pi5_marker test_pi5_rng test_cpufeat test_dma_window test_pi5_pcie test_pi5_net test_pi5_gem test_unlock_req test_context test_agent_cmd test_artifact_card test_pipe HCFLAGS := -std=gnu11 -O1 -g -Wall -Wextra -Werror -I$(KDIR)/core -I$(KDIR)/mm -I$(KDIR)/tests -I$(BOOT) SANFLAGS := -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer @@ -1365,6 +1394,29 @@ osh-op-mutant: $(OUT)/host/test_osh_op_mutant @if $< > $<.log 2>&1; then cat $<.log; echo "test_osh_op mutant (permission check always OK): PASSED, test does not catch it"; exit 1; \ else grep -F "test_osh_op: FAIL" $<.log && echo "test_osh_op mutant (permission check always OK): FAILS as required"; fi +# Native pipe primitive (core/pipe.c, aienos-mv#428): pure logic over ipc.c capability tables, driven through sched.c by +# core/pipe_drive.h. Own rule: the test reads the fixture corpus in tests/fixtures/pipe/. +PIPE_SRCS := $(KDIR)/core/pipe.c $(KDIR)/core/ipc.c $(KDIR)/core/sched.c +PIPE_DEPS := $(KDIR)/tests/test_pipe.c $(PIPE_SRCS) $(KDIR)/tests/ck_test.h $(HDRS) $(wildcard $(KDIR)/tests/fixtures/pipe/*) +PIPE_DEF := -DPIPE_FIXTURE_DIR='"$(abspath $(KDIR)/tests/fixtures/pipe)"' +$(OUT)/host/test_pipe: $(PIPE_DEPS) + @mkdir -p $(dir $@) + $(HOSTCC) $(HCFLAGS) $(PIPE_DEF) -o $@ $< $(PIPE_SRCS) + +$(OUT)/host-san/test_pipe: $(PIPE_DEPS) + @mkdir -p $(dir $@) + $(HOSTCC) $(HCFLAGS) $(SANFLAGS) $(PIPE_DEF) -o $@ $< $(PIPE_SRCS) + +# TEST-ONLY mutant of core/pipe.c: a write does not check the WRITE right or the end. test_pipe must FAIL against it +# (red before green); "make test" fails if the test stops catching it. Host only. +$(OUT)/host/test_pipe_mutant: $(PIPE_DEPS) + @mkdir -p $(dir $@) + $(HOSTCC) $(HCFLAGS) $(PIPE_DEF) -DCK_PIPE_MUTANT_SKIP_RIGHTS -o $@ $< $(PIPE_SRCS) + +pipe-mutant: $(OUT)/host/test_pipe_mutant + @if $< > $<.log 2>&1; then cat $<.log; echo "test_pipe mutant (write right not checked): PASSED, test does not catch it"; exit 1; \ + else grep -F "test_pipe: FAIL" $<.log && echo "test_pipe mutant (write right not checked): FAILS as required"; fi + # N3 context assembly + approval binding (core/context.c, core/context_proposal.c, aienos#329): pure logic over # the argus SHA-256. Own rule (needs sha256.c). The mutant skips the foreign-binding check: test_context must # FAIL against it (red before green); "make test" fails if the test stops catching it. Host only (context.c @@ -1484,8 +1536,8 @@ smmu-l2-mutants: $(OUT)/host/test_smmu else echo "mutant flag refused under CK_HARDWARE_STAGING"; fi; \ if [ $$fail = 0 ]; then echo "CK_SMMU_L2_MUTANTS: PASS"; else echo "CK_SMMU_L2_MUTANTS: FAIL"; exit 1; fi -test: $(addprefix $(OUT)/host/,$(TESTS)) osc-receipt-mutants osc-receipt-release handoff-mutant acpi-dev-mutant iort-mutants smmu-l2-mutants osh-op-mutant context-mutant agent-cmd-mutant artifact-card-mutant artifact-tier-pi5 artifact-tier-mutant test-continuity-subject-restart gsp-fw-inspect-test gsp-cot-test gsp-bindata-test gsp-bootargs-test gsp-rpc-test slot-test slot-free package-test slot-loader-check - @fail=0; for t in $(filter-out osc-receipt-mutants osc-receipt-release handoff-mutant acpi-dev-mutant iort-mutants smmu-l2-mutants osh-op-mutant context-mutant agent-cmd-mutant artifact-card-mutant artifact-tier-pi5 artifact-tier-mutant test-continuity-subject-restart gsp-fw-inspect-test gsp-cot-test gsp-bindata-test gsp-bootargs-test gsp-rpc-test slot-test slot-free package-test slot-loader-check,$^); do $$t || fail=1; done; \ +test: $(addprefix $(OUT)/host/,$(TESTS)) osc-receipt-mutants osc-receipt-release handoff-mutant acpi-dev-mutant iort-mutants smmu-l2-mutants osh-op-mutant pipe-mutant context-mutant agent-cmd-mutant artifact-card-mutant artifact-tier-pi5 artifact-tier-mutant test-continuity-subject-restart gsp-fw-inspect-test gsp-cot-test gsp-bindata-test gsp-bootargs-test gsp-rpc-test slot-test slot-free package-test slot-loader-check + @fail=0; for t in $(filter-out osc-receipt-mutants osc-receipt-release handoff-mutant acpi-dev-mutant iort-mutants smmu-l2-mutants osh-op-mutant pipe-mutant context-mutant agent-cmd-mutant artifact-card-mutant artifact-tier-pi5 artifact-tier-mutant test-continuity-subject-restart gsp-fw-inspect-test gsp-cot-test gsp-bindata-test gsp-bootargs-test gsp-rpc-test slot-test slot-free package-test slot-loader-check,$^); do $$t || fail=1; done; \ if [ $$fail = 0 ]; then echo "CK_CORE_HOST: PASS"; else echo "CK_CORE_HOST: FAIL"; exit 1; fi sanitize: $(addprefix $(OUT)/host-san/,$(TESTS)) @@ -2241,17 +2293,32 @@ imac-diag: $(IMACDIAG_EFI) # (GDT/TSS/IDT, own page tables, guard page, HPET-timed TSC, local APIC timer, ACPI S5) # + x86/pci_x86.c (PCI walk; AHCI via x86/ahci_x86.c and NVMe via ../disk/disk_nvme.c, both # read-only, GPT checked by dev/disk_part.c; a look at the Ethernet chip) + x86/smp_x86.S -# (secondary cores started and parked) + x86/tg3_x86.c (BCM57766 Ethernet, transmit only) and -# x86/report_x86.c with ../../net/aienos_net.c (the screen sent as UDP broadcasts during the hold; -# host test scripts/ck_imac_report_test.sh, receiver tools/ck_imac_report_listen.c) +# (secondary cores started and parked) + x86/tg3_x86.c (BCM57766 Ethernet: link detection; no +# transmit in the default image) # + x86/trap.S + x86/console_x86.c (COM1 when present, GOP framebuffer), on the # arch-neutral core: fbcon, fmt, acpi, handoff_check, frames, heap. Same toolchain and PE # header as IMACDIAG. Copy to a FAT stick as EFI/BOOT/BOOTX64.EFI. # make imac-kernel -> $(OUT)/IMACKERN.EFI QEMU test: scripts/qemu_ck_imac_kernel_test.sh +# The network report is a LAB-ONLY diagnostic, opt-in and default off: +# make imac-kernel CK_X86_REPORT=1 -> $(OUT)/IMACKERN-LAB.EFI (own object dir) +# adds x86/report_x86.c + ../../net/aienos_net.c and tg3 transmit (-DCK_X86_REPORT=1): during the +# hold it broadcasts only allowlisted console lines (ck_x86_report_filter, never the raw console) +# as UDP to port 47031, header "AIENOS-IMAC-REPORT v=2 auth=none": UNAUTHENTICATED, never a +# receipt, evidence or a command. Host test scripts/ck_imac_report_test.sh, receiver +# tools/ck_imac_report_listen.c. The default image, and any resident or service (ALLEN) build, +# must not contain it: the link step below fails a default image that has a report symbol. +CK_X86_REPORT ?= 0 X86K := $(KDIR)/x86 +ifeq ($(CK_X86_REPORT),1) +IMACKERN_DIR := $(OUT)/imackern-lab +IMACKERN_EFI := $(OUT)/IMACKERN-LAB.EFI +else ifeq ($(CK_X86_REPORT),0) IMACKERN_DIR := $(OUT)/imackern -IMACKERN_ELF := $(IMACKERN_DIR)/imackern.elf IMACKERN_EFI := $(OUT)/IMACKERN.EFI +else +$(error CK_X86_REPORT must be 0 (default) or 1 (lab-only network report)) +endif +IMACKERN_ELF := $(IMACKERN_DIR)/imackern.elf IMACKERN_CFLAGS := $(X86CFLAGS) -I$(KDIR)/include -I$(KDIR)/mm -I$(KDIR)/dev -I$(NATIVE)/disk -I$(NATIVE)/net IMACKERN_OBJS := $(IMACKERN_DIR)/efi_entry_x86_64.o $(IMACKERN_DIR)/efi_x86.o $(IMACKERN_DIR)/efi_gop.o \ $(IMACKERN_DIR)/kmain_x86.o $(IMACKERN_DIR)/console_x86.o $(IMACKERN_DIR)/trap.o \ @@ -2259,7 +2326,14 @@ IMACKERN_OBJS := $(IMACKERN_DIR)/efi_entry_x86_64.o $(IMACKERN_DIR)/efi_x86.o $( $(IMACKERN_DIR)/frames.o $(IMACKERN_DIR)/heap.o $(IMACKERN_DIR)/libc_min.o \ $(IMACKERN_DIR)/ahci_x86.o $(IMACKERN_DIR)/disk_part.o $(IMACKERN_DIR)/disk.o \ $(IMACKERN_DIR)/pci_x86.o $(IMACKERN_DIR)/smp_x86.o $(IMACKERN_DIR)/disk_nvme.o \ - $(IMACKERN_DIR)/tg3_x86.o $(IMACKERN_DIR)/report_x86.o $(IMACKERN_DIR)/aienos_net.o + $(IMACKERN_DIR)/tg3_x86.o +IMACKERN_REPORT_OBJS := $(IMACKERN_DIR)/report_x86.o $(IMACKERN_DIR)/aienos_net.o +# Symbols only the lab image may contain; the default image is checked for them after linking. +IMACKERN_REPORT_SYMS := ck_x86_report_hold|ck_x86_report_frame|ck_x86_report_filter|ck_x86_report_parts|ck_x86_tg3_send|ck_x86_tg3_drain|net_udp_build +ifeq ($(CK_X86_REPORT),1) +IMACKERN_OBJS += $(IMACKERN_REPORT_OBJS) +IMACKERN_CFLAGS += -DCK_X86_REPORT=1 +endif IMACKERN_HDRS := $(X86K)/x86.h $(BOOT)/handoff.h $(BOOT)/efi.h $(KDIR)/core/ck_internal.h $(KDIR)/include/ck.h $(IMACKERN_DIR)/efi_entry_x86_64.o: $(BOOT)/efi_entry_x86_64.S $(IMACKERN_DIR)/efi_x86.o: $(X86K)/efi_x86.c $(IMACKERN_HDRS) @@ -2283,7 +2357,7 @@ $(IMACKERN_DIR)/disk_nvme.o: $(NATIVE)/disk/disk_nvme.c $(NATIVE)/disk/disk_nvme $(IMACKERN_DIR)/tg3_x86.o: $(X86K)/tg3_x86.c $(IMACKERN_HDRS) $(KDIR)/mm/frames.h $(IMACKERN_DIR)/report_x86.o: $(X86K)/report_x86.c $(X86K)/report_x86.h $(IMACKERN_HDRS) $(NATIVE)/net/aienos_net.h $(IMACKERN_DIR)/aienos_net.o: $(NATIVE)/net/aienos_net.c $(NATIVE)/net/aienos_net.h -$(IMACKERN_OBJS): +$(sort $(IMACKERN_OBJS) $(IMACKERN_REPORT_OBJS)): @mkdir -p $(dir $@) $(X86CC) $(IMACKERN_CFLAGS) -DAIENOS_COMMIT='"$(AIENOS_COMMIT)"' -c -o $@ $< $(IMACKERN_ELF): $(IMACKERN_OBJS) $(BOOT)/image_x86_64.ld @@ -2302,6 +2376,15 @@ $(IMACKERN_ELF): $(IMACKERN_OBJS) $(BOOT)/image_x86_64.ld @n=$$($(X86NM) $@ | grep -c ' t isr_common$$' || true); s=$$($(X86NM) $@ | grep ' T ck_x86_isr_stubs$$' | cut -c1-16); \ e=$$($(X86NM) $@ | grep ' t isr_common$$' | cut -c1-16); \ if [ "$$n" != 1 ] || [ $$((0x$$e - 0x$$s)) != 4096 ]; then echo "interrupt stubs are not 256 x 16 bytes"; rm -f $@; exit 1; fi + @r=$$($(X86NM) $@ | grep -E ' [TtDdBbRr] ($(IMACKERN_REPORT_SYMS))$$' || true); \ + if [ "$(CK_X86_REPORT)" = 1 ]; then \ + for s in ck_x86_report_hold ck_x86_report_filter ck_x86_report_frame; do \ + echo "$$r" | grep -q " $$s$$" || { echo "lab image lacks $$s"; rm -f $@; exit 1; }; done; \ + elif [ -n "$$r" ]; then \ + echo "default iMac image links the lab-only network report (build it with CK_X86_REPORT=1 only):"; \ + echo "$$r"; rm -f $@; exit 1; fi + @if [ "$(CK_X86_REPORT)" != 1 ] && grep -aq "AIENOS-IMAC-REPORT" $@; then \ + echo "default iMac image carries the report header string"; rm -f $@; exit 1; fi $(IMACKERN_EFI): $(IMACKERN_ELF) $(X86OBJCOPY) -O binary $< $@ @sz=$$(stat -c %s $@); pad=$$(( (4096 - sz % 4096) % 4096 )); \ @@ -2310,6 +2393,25 @@ $(IMACKERN_EFI): $(IMACKERN_ELF) @[ "$$(od -An -tx1 -j68 -N2 $@ | tr -d ' ')" = "6486" ] || { echo "PE Machine is not x86_64 (0x8664)"; rm -f $@; exit 1; } @echo "built $@ (commit $(AIENOS_COMMIT))" imac-kernel: $(IMACKERN_EFI) +# W^X negative controls (#409), TEST-ONLY, QEMU only, never deployed: IMACKERN_WX_MUTANT=no_nx drops every +# NX bit, =text_writable leaves the kernel's code writable. The kernel's W^X probes must then panic +# (scripts/qemu_ck_imac_kernel_test.sh builds both into their own OUT). The stamp rebuilds kmain_x86.o +# whenever the setting changes, so a mutant object never lingers in a default build. +IMACKERN_WX_MUTANT ?= +ifeq ($(strip $(IMACKERN_WX_MUTANT)),) +IMACKERN_WX_FLAGS := +else ifeq ($(strip $(IMACKERN_WX_MUTANT)),no_nx) +IMACKERN_WX_FLAGS := -DCK_X86_WX_MUTANT_NO_NX=1 +else ifeq ($(strip $(IMACKERN_WX_MUTANT)),text_writable) +IMACKERN_WX_FLAGS := -DCK_X86_WX_MUTANT_TEXT_RW=1 +else +$(error IMACKERN_WX_MUTANT must be empty, no_nx or text_writable) +endif +$(IMACKERN_DIR)/kmain_x86.o: IMACKERN_CFLAGS += $(IMACKERN_WX_FLAGS) +$(IMACKERN_DIR)/kmain_x86.o: $(IMACKERN_DIR)/wx_mutant.stamp +$(IMACKERN_DIR)/wx_mutant.stamp: FORCE + @mkdir -p $(dir $@) + @echo '$(strip $(IMACKERN_WX_MUTANT))' | cmp -s - $@ || echo '$(strip $(IMACKERN_WX_MUTANT))' > $@ # Raspberry Pi 5 board image (see CK_PI5 above): target/native-kernel-pi5/BOOTAA64.EFI pi5-store: diff --git a/native/kernel/README.md b/native/kernel/README.md index 9b30cc2f..2cd091ef 100644 --- a/native/kernel/README.md +++ b/native/kernel/README.md @@ -14,7 +14,7 @@ QEMU qualifies nothing physical: a PASS here says nothing about real hardware. | `core/` | Console, printf, ACPI, reports/panic/PSCI reset, M3 (threads, scheduler, EL0, capabilities, IPC), `kmain.c`. | | `tests/` | Host unit tests. | | `third_party/omega/` | The canonical Omega Cortex store, byte for byte from the omega commit in `omega.lock` (checked by `scripts/omega_lock_check.sh`); built freestanding by `svc/cortex_store.c` over the sealed Store through `svc/cortex_journal.c` (native v1 plan P06). | -| `x86/` | x86_64 port, first cut (AIENOS-IMAC-KERNEL-0, 2017 iMac): UEFI stub, descriptor tables and interrupt stubs, page tables, local APIC timer, ACPI power off, console, secondary-core start, PCI walk, read-only AHCI and NVMe disks, transmit-only BCM57766 Ethernet report. | +| `x86/` | x86_64 port, first cut (AIENOS-IMAC-KERNEL-0, 2017 iMac): UEFI stub, descriptor tables and interrupt stubs, page tables, local APIC timer, ACPI power off, console, secondary-core start, PCI walk, read-only AHCI and NVMe disks, BCM57766 Ethernet link detection; a lab-only, opt-in network report (`CK_X86_REPORT=1`). | | `../boot/` | Minimal UEFI entry stub (one image with the kernel). | ## Build and test @@ -168,19 +168,39 @@ build refuses any other ATA command); NVMe through the shared `x86/`). Both disk_dev write hooks always refuse, serial numbers and MAC addresses are never printed, and each disk's GPT is checked by the shared `dev/disk_part.c` (both copies, CRCs, the AIENOS partition located if present). -The Broadcom BCM57766 Ethernet chip (14e4:1686) gets a transmit-only, polled -driver (`x86/tg3_x86.c`: core reset, bootcode handshake, rings in one DMA block -below 4 GiB, PHY autonegotiation; it never receives and the MAC address is -never printed). The last line before the hold is a one-line `summary:`. It -prints `kernel: alive`, holds the screen 60 s and powers off through ACPI S5. -During the hold `x86/report_x86.c` sends the RAM copy of the console (first -16 KiB) every 2 s while the link is up, as UDP broadcast from 0.0.0.0 to -255.255.255.255 port 47031 (TTL 1), in 1 KiB parts that each start with -`AIENOS-IMAC-REPORT v=1 run= part=/ bytes=`. -`tools/ck_imac_report_listen.c` (`make -C native/kernel imac-report-listen`, -run as `ck_imac_report_listen 47031 OUTDIR SECONDS`) rebuilds each run into -`OUTDIR/imac-.txt`; `scripts/ck_imac_report_test.sh` checks frames and -reassembly on the host, so a wired iMac no longer needs a photo of its screen. Output: the GOP framebuffer +The Broadcom BCM57766 Ethernet chip (14e4:1686) gets a polled driver +(`x86/tg3_x86.c`: core reset, bootcode handshake, rings in one DMA block below +4 GiB, PHY autonegotiation; it never reads received frames and the MAC address +is never printed). In the default image it only detects the link: frame +transmit is not compiled in. The last line before the hold is a one-line +`summary:`. It prints `kernel: alive`, holds the screen 60 s and powers off +through ACPI S5. + +**Network report: lab-only, opt-in, unauthenticated.** `make -C native/kernel +imac-kernel CK_X86_REPORT=1` builds a separate lab image, +`IMACKERN-LAB.EFI`, that adds `x86/report_x86.c`, `../net/aienos_net.c` and +tg3 transmit. The default `IMACKERN.EFI`, and any resident or service (ALLEN) +build, contain none of it; the link step fails a default image that has a +report symbol. During the hold the lab image sends, every 2 s while the link +is up, an allowlisted copy of the console (`ck_x86_report_filter`: only +complete, printable lines of at most 240 bytes whose key is on a fixed list of +kernel diagnostic keys; everything else, including `memory:`, is dropped +whole, so chat, keys, tokens and credentials cannot enter it), as UDP +broadcast from 0.0.0.0 to 255.255.255.255 port 47031 (TTL 1), in 1 KiB parts +that each start with +`AIENOS-IMAC-REPORT v=2 auth=none run= part=/ bytes=`. +Anyone on the LAN can read or forge these datagrams; the run id and checksum +are not authenticity, so a report is never a receipt, evidence or a command. +Future service diagnostics belong on the authenticated transport with an +explicitly authorized peer. `tools/ck_imac_report_listen.c` (`make -C +native/kernel imac-report-listen`, run as `ck_imac_report_listen 47031 OUTDIR +SECONDS`) says so when it starts, refuses the retired v=1 raw-console format +and rebuilds each run into `OUTDIR/imac-.unauthenticated.txt`; +`scripts/ck_imac_report_test.sh` checks the default and lab builds' symbols, +the allowlist (sentinel lines never leave), the frames and reassembly on the +host. + +Output: the GOP framebuffer (`core/fbcon.c`, lines from before ExitBootServices replayed onto it) and COM1 when a 16550 answers there (QEMU; the iMac has none). Shared, unchanged: `core/fbcon.c`, `fmt.c`, `acpi.c`, `handoff_check.c`, `mm/frames.c`, `heap.c`, @@ -188,11 +208,32 @@ when a 16550 answers there (QEMU; the iMac has none). Shared, unchanged: cores and attaches a SATA data disk and an NVMe disk, each with a GPT from `ck_gpt_image`, and fails unless three cores check in, the kernel finds each AIENOS partition where the tool wrote it and both disks are byte-identical -afterwards. Not yet: work scheduled on the other cores, x2APIC, NX, disk writes, +afterwards. Not yet: work scheduled on the other cores, x2APIC, disk writes, VT-d, receiving on the network, a store. QEMU (no BCM57766 there) qualifies nothing physical; copy the image to a FAT stick as `EFI/BOOT/BOOTX64.EFI` and start it from the Option-key boot picker. +Page permissions (W^X, #409): the kernel refuses a CPU without NX, sets +EFER.NXE and CR0.WP on the boot core and in the trampoline for every other +core, and maps its code read-only executable, its PE header and read-only data +(`.rodata`, relocations, GOT) read-only no-execute, and everything else (data, +bss, stacks, heap, page tables, MMIO, the framebuffer) no-execute, keeping the +PAT cache types and the stack guard; the 2 MiB pages around the image and the +trampoline are split into 4 KiB pages at the boundaries from +`../boot/image_x86_64.ld`. The trampoline page is never writable and executable +at once (writable while it is filled, executable while a core runs it, +read-only no-execute once the cores are parked). At boot the kernel proves it: +writes to code and to read-only data and execution from heap and stack must +each fault with the right error code (`wx: ok ...`), and after the cores and +disks are up an audit of every page table leaf must find nothing writable and +executable, only the code executable, and NXE and WP on every core +(`wx_audit: ok ...`). The QEMU test also builds two TEST-ONLY mutants +(`make imac-kernel IMACKERN_WX_MUTANT=no_nx` or `=text_writable`) and fails +unless their probes panic. W^X is not process isolation: everything here still +runs in ring 0 in one address space, any kernel code can change the page +tables, and learned or generated code must never be given kernel authority. +QEMU only; not yet run on the iMac. + ## Raspberry Pi 5 image (AIENOS-PI5 step 1) make -C native/kernel pi5 # target/native-kernel-pi5/BOOTAA64.EFI (-DCK_PI5=1 -DCK_KLOG=1) @@ -494,7 +535,7 @@ a FAIL to report, not to retry. 3. `ck_enter_el1`: EL2 -> EL1h with the MMU already on our tables. 4. EL1: `mmu: enabled`, `mmu_switch: ...` read back from the registers, heap check, guard-page self test, GICv3 from the MADT, 200 ms timer window - (INTID 30, 10 ms period), `kernel: alive`, `kernel_el: EL1h`. + (INTID 30, 10 ms period; on a starved emulator the window keeps counting up to 5 s until five ticks arrived, and each interval is measured from IRQ entry, so a host stall cannot produce a short interval), `kernel: alive`, `kernel_el: EL1h`. 5. Stages, in order, if linked: `ck_stage_devices`, `ck_stage_security`, `ck_stage_store`. Each prints `stage : ok`, `stage : FAIL rc=` or `stage : not linked`. @@ -539,6 +580,36 @@ low-water free bytes. lists (whole pages). Tables, stack, heap and pool come from it and are never handed out again. +## Native pipes (AIENOS-NATIVE-PIPE-1, aienos-mv#428) + +`core/pipe.c` / `core/pipe.h` make a pipe a kernel primitive: two independently scheduled operations exchange ordered +bytes through a bounded buffer, with no intermediate file. It is a byte stream, separate from the 56-byte typed +message ring of `core/ipc.h`; it reuses only the ipc.h capability tables. + +- **Contract.** OSH_PLATFORM_ABI (aien-protocols-mv `specs/osh-platform/`, read at `fb5fca98e667`, v1 DRAFT, unfrozen): + PIPE_CREATE, STREAM_READ / WRITE / CLOSE / DUP (section 8.1), at least 64 KiB per pipe (8.5), the error codes of 8.6 + (one shared copy in `core/osh_err.h`, also used by `core/osh_op.h`), epoch staleness (4.4) and authority at the + moment of the effect (9.2). Choices the draft does not pin are marked UNVERIFIED in `pipe.h`. +- **Ends are capabilities.** The read end holds `CK_R_READ`, the write end `CK_R_WRITE`, never both; optional + `CK_R_DERIVE` (dup in the same table), `CK_R_GRANT` (dup into another principal's table) and `CK_R_REVOKE`. Every + operation calls `ck_cap_lookup` when it acts, so a handle that was closed, reused or revoked is refused even if it + was valid a moment earlier (STALE, DENIED, REVOKED). +- **Bounded.** A static pool of `CK_PIPE_POOL_PIPES` (4) pipes of `CK_PIPE_CAPACITY` (65536) bytes; nothing is allocated. + A write past the free space is partial, a write on a full pipe returns WOULD_BLOCK (or parks with `CK_PIPE_F_BLOCK` + through the pool's wait / wake hook, which the kernel points at the scheduler). Last writer closed: reads return 0 + bytes once drained (EOF). No reader: BROKEN_PIPE. Revoke scrubs the buffer and no byte is delivered after it; cancel + makes the next or the blocked call on that end return INTERRUPTED with no byte moved. Counters (bytes, max resident, + WOULD_BLOCK, waits, wakeups, cancellations, revocations, refusals) are in `struct ck_pipe_stats`. +- **Versioned op table.** `ck_pipe_dispatch` takes a platform call frame (magic `OSHF`, `CK_PIPE_ABI_VERSION` 1, op id, + reserved, arguments) and refuses malformed frames and unknown ops or versions (INVALID_ARG, NOT_SUPPORTED) before any + effect. +- **Tests.** `make test` runs `test_pipe` (the 20-case corpus in `tests/fixtures/pipe/`, format in its README, plus + producer / consumer transfers through `core/sched.c`) and `pipe-mutant` (the write-right check removed: the test must + fail); `make sanitize` runs it under ASan+UBSan. `scripts/qemu_ck_pipe_test.sh` builds the TEST-ONLY `CK_PIPE_TEST=1` + image and checks the in-kernel run (GATES.md, PIPE). Host and QEMU evidence qualify nothing physical. +- **Not yet.** Task execution and shell dispatch over pipes are separate issues; the kernel's blocking hook yields + cooperatively inside one kernel thread, it does not switch M3 threads. + ## Notes for stage code - `ck_puts` prints the string as given; it does not add a newline. diff --git a/native/kernel/arch/.crumb b/native/kernel/arch/.crumb index 8da07878..8fcd5863 100644 --- a/native/kernel/arch/.crumb +++ b/native/kernel/arch/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-13T12:30:58Z", - "compiler": "crumb-compile/1", - "digest": "sha256:8f63182b423b274a3fa6dcf0a17811343f93bd1539e33479102ffa87935da1ca", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 8, - "generated_at_commit": "a01f365f16ea16bb4843f97b031ee72b4e028389", - "source_tree": "sha256:a3f57569a3f0d39ed15c92cf2444286702f51e87ade81dea77e76af193678a6b" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/kernel/arch/timer.c b/native/kernel/arch/timer.c index c905c893..dab231b4 100644 --- a/native/kernel/arch/timer.c +++ b/native/kernel/arch/timer.c @@ -1,12 +1,23 @@ /* timer.c -- EL1 physical generic timer (CNTP, PPI INTID 30) and the * monotonic time services. Tick semantics match the Rust kernel: the IRQ * re-arms CNTP_CVAL 10 ms after "now", then records the interval since the - * previous tick (the first interval is measured from arming). */ + * previous tick (the first interval is measured from arming). + * + * Both ends of an interval are the counter value read at IRQ ENTRY, the same + * value the next deadline is built from. An interval is therefore never + * shorter than the period, whatever the host does: the old code read the + * counter again AFTER re-arming, so a host stall between the two reads (QEMU + * TCG on a loaded machine) made one interval long and the next one short, and + * the M1 "no interval shorter than half a period" check failed (an interrupt + * storm or a missing EOI still shows: the next IRQ arrives at once). */ #include "arch.h" #include "ck_internal.h" static volatile uint64_t ticks, last, tmin, tmax; +#define CK_TIMER_MIN_TICKS 5 /* the M1 gate wants at least five ticks */ +#define CK_TIMER_GRACE_MS 5000 /* longest extra wait for them */ + static uint64_t counter(void) { ck_isb(); @@ -42,9 +53,8 @@ void ck_timer_tick(void) ck_wr(cntp_ctl_el0, 1); ck_isb(); ticks++; - uint64_t t = counter(); - uint64_t interval = t - last; - last = t; + uint64_t interval = now - last; + last = now; if (interval < tmin) tmin = interval; if (interval > tmax) @@ -66,15 +76,21 @@ int ck_timer_window(uint32_t ms, struct ck_timer_window *w) ck_isb(); ck_irq_on(); ck_isb(); + /* The window is wall-clock. A starved vCPU (QEMU TCG on a loaded host) may + * see fewer than CK_TIMER_MIN_TICKS ticks in it, which says nothing about + * the timer. Keep counting past the window until that many ticks arrived, + * giving up after CK_TIMER_GRACE_MS: a dead timer still reports 0 ticks. */ uint64_t window = hz / 1000 * ms; - while (counter() - start < window) + uint64_t grace = hz / 1000 * CK_TIMER_GRACE_MS; + uint64_t t; + while ((t = counter()) - start < window || (ticks < CK_TIMER_MIN_TICKS && t - start < grace)) ; ck_irq_off(); ck_isb(); ck_wr(cntp_ctl_el0, 0); ck_isb(); w->ticks = ticks; - w->ms = ms; + w->ms = (t - start) / (hz / 1000); w->freq_hz = hz; w->min_interval = ticks ? tmin : 0; w->max_interval = tmax; diff --git a/native/kernel/artifact/.crumb b/native/kernel/artifact/.crumb index 43b52963..9a859fa3 100644 --- a/native/kernel/artifact/.crumb +++ b/native/kernel/artifact/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-15T02:48:19Z", - "compiler": "crumb-compile/1", - "digest": "sha256:cd3be26829bc7f947521b1e5df144df2504ef25a3763ec0356861b7d17d5d901", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 13, - "generated_at_commit": "edd175183f30a31f4c7683e194dd6479dc8c7a6e", - "source_tree": "sha256:6cd37233b62c978bf5adeb03aeafb474e456a830a8992130b0fba7492840faa8" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/kernel/core/.crumb b/native/kernel/core/.crumb index 11410454..8d7a71b6 100644 --- a/native/kernel/core/.crumb +++ b/native/kernel/core/.crumb @@ -4,18 +4,6 @@ "path": ".." }, "extensions": { - "generated": { - "children": [], - "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-15T02:48:19Z", - "compiler": "crumb-compile/1", - "digest": "sha256:c9035b8f32a9539fe8d1f93ed968b3b56dd3ba4c2630b32b6c286b1dbd19d908", - "evidence_files": 0, - "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 69, - "generated_at_commit": "edd175183f30a31f4c7683e194dd6479dc8c7a6e", - "source_tree": "sha256:928d92ef1abd9076c57a25fb07becf22b43f0a46a7edd1998383f3dd6296e083" - }, "owner_lane": "", "provenance": { "entries": [ diff --git a/native/kernel/core/kmain.c b/native/kernel/core/kmain.c index d4a788c9..134e2cef 100644 --- a/native/kernel/core/kmain.c +++ b/native/kernel/core/kmain.c @@ -122,6 +122,10 @@ static __attribute__((noreturn)) void rollback_test_end(void) } #endif +#ifdef CK_PIPE_TEST +void ck_pipe_selftest(void); +#endif + static __attribute__((noreturn)) void ck_el1_main(void *arg) { struct ck_handoff *h = arg; @@ -212,6 +216,10 @@ static __attribute__((noreturn)) void ck_el1_main(void *arg) #if defined(CK_TEST_ROLLBACK_CPU_FAULT) || defined(CK_TEST_ROLLBACK_HANG) rollback_test_end(); #endif +#ifdef CK_PIPE_TEST + /* TEST-ONLY pipe self-test (core/pipe_test.c, scripts/qemu_ck_pipe_test.sh); never in a production image. */ + ck_pipe_selftest(); +#endif { struct ck_cpu_features cf; diff --git a/native/kernel/core/osc_admit.c b/native/kernel/core/osc_admit.c index ed912892..0acaa9e9 100644 --- a/native/kernel/core/osc_admit.c +++ b/native/kernel/core/osc_admit.c @@ -218,7 +218,7 @@ struct lt_step { int ws; /* 0 none, 1..2 which caller workspace */ uint64_t cap; const char *rcpt; /* receipt Store entry; NULL: the unit's own (lt_rcpt_for), "-": none */ - int variant; /* receipt policy variant for this launch (ck_osc_rcpt_variant): 0 qual, 1 release, 2 revoked key */ + int variant; /* TEST ONLY: 0 qual, 1 release, 2 revoked key, 3 changed code under qual policy */ }; /* The receipt of each launched unit: a receipt binds the IR and the code, so l02 (l01 with a bigger stack) shares @@ -270,8 +270,14 @@ static void lt_run(const struct lt_step *s) const char *rn = s->rcpt ? s->rcpt : lt_rcpt_for(s->unit); size_t rlen = 0; const uint8_t *rb = lt_streq(rn, "-") ? 0 : ck_osc_receipt_find(rn, &rlen); - ck_osc_rcpt_variant = s->variant; + ck_osc_rcpt_variant = s->variant == 3 ? 0 : s->variant; + /* Preserve the valid receipt and admitted view; alter only the bytes + * privately copied by the launcher, exercising its final rehash. */ + if (s->variant == 3) + lt_unit[u].bytes[lt_unit[u].acc.code_off] ^= 1; ck_osc_launch(lt_unit[u].bytes, lt_unit[u].len, <_unit[u].acc, rb, rlen, &rq, &r, &info); + if (s->variant == 3) + lt_unit[u].bytes[lt_unit[u].acc.code_off] ^= 1; ck_osc_rcpt_variant = 0; char rs[96], as[80]; ck_osc_result_str(&r, rs, sizeof rs); @@ -295,7 +301,7 @@ static void lt_run(const struct lt_step *s) hex(idh, info.rcpt.id, 8); ck_printf("osc_rcpt_launch: %s %s(%s) receipt=%s policy=%s -> %s receipt_id=%s revoked=%s ticks=%llu " "pages_mapped=%u page_tables_zeroed=%u slot_free=%u; QEMU (aarch64 virt), TEST signer, not physical\n", - s->unit, s->fn, as, rb ? rn : "none", vname[s->variant], rs, idh, + s->unit, s->fn, as, rb ? rn : "none", vname[s->variant == 3 ? 0 : s->variant], rs, idh, info.rcpt.revoked == OSC_RCPT_REVOKED_ID ? "receipt_id" : info.rcpt.revoked == OSC_RCPT_REVOKED_KEY ? "signer_key" : "-", (unsigned long long)r.ticks, info.pages_mapped, (unsigned)info.tables_zeroed, @@ -339,6 +345,7 @@ static void rt_all(void) { "a01_valid_min.unit", "add", 2, { 15, 16 }, 0, 0, 0, "n_deps.rcpt", 0 }, { "a01_valid_min.unit", "add", 2, { 16, 17 }, 0, 0, 0, "n_checker.rcpt", 0 }, { "a01_valid_min.unit", "add", 2, { 17, 18 }, 0, 0, 0, "a01.owner.rcpt", 1 }, + { "a01_valid_min.unit", "add", 2, { 18, 19 }, 0, 0, 0, "a01.rcpt", 3 }, { "a01_valid_min.unit", "add", 2, { 20, 22 }, 0, 0, 0, "a01.rcpt", 0 }, }; ck_printf("osc_rcpt_selftest: launches=%u unit=a01_valid_min.unit; QEMU (aarch64 virt), TEST signer, not physical\n", diff --git a/native/kernel/core/osh_err.h b/native/kernel/core/osh_err.h new file mode 100644 index 00000000..b4754102 --- /dev/null +++ b/native/kernel/core/osh_err.h @@ -0,0 +1,25 @@ +/* osh_err.h -- OSH platform error codes (OSH_PLATFORM_ABI.md section 8.6, v1 DRAFT, unfrozen; read at aien-protocols-mv + * fb5fca98e667). One copy of the numbering, shared by the test-only shell adapter (osh_op.h) and the kernel pipe primitive + * (pipe.h), so the two can never disagree. Pure definitions, no test-only guard: the pipe primitive is not test-only. */ +#ifndef AIENOS_CK_OSH_ERR_H +#define AIENOS_CK_OSH_ERR_H + +enum osh_err { + OSH_E_OK = 0, OSH_E_DENIED = 1, OSH_E_REVOKED = 2, OSH_E_STALE = 3, OSH_E_NOT_FOUND = 4, OSH_E_UNAVAILABLE = 5, + OSH_E_INVALID_ARG = 6, OSH_E_LIMIT = 7, OSH_E_INTERRUPTED = 8, OSH_E_BROKEN_PIPE = 9, OSH_E_IO = 10, + OSH_E_OUTCOME_UNKNOWN = 11, OSH_E_CAP_DOMAIN_MISMATCH = 12, OSH_E_CAP_GEN_NARROW = 13, OSH_E_NOT_SUPPORTED = 14, + OSH_E_WOULD_BLOCK = 15, OSH_E_PARTIAL_LAUNCH = 16 +}; +#define OSH_E_COUNT 17u + +/* Name of a code; section 8.6: an unknown code is IO, never OK. */ +static inline const char *osh_err_label(unsigned e) +{ + static const char *const n[OSH_E_COUNT] = { "OK", "DENIED", "REVOKED", "STALE", "NOT_FOUND", "UNAVAILABLE", + "INVALID_ARG", "LIMIT", "INTERRUPTED", "BROKEN_PIPE", "IO", + "OUTCOME_UNKNOWN", "CAP_DOMAIN_MISMATCH", "CAP_GEN_NARROW", + "NOT_SUPPORTED", "WOULD_BLOCK", "PARTIAL_LAUNCH" }; + return e < OSH_E_COUNT ? n[e] : "IO"; +} + +#endif diff --git a/native/kernel/core/osh_op.c b/native/kernel/core/osh_op.c index 9c53dcfc..69dcfdd6 100644 --- a/native/kernel/core/osh_op.c +++ b/native/kernel/core/osh_op.c @@ -38,10 +38,7 @@ __attribute__((unused)) static int same(const void *a, const void *b, size_t n) const char *osh_err_name(unsigned e) { - static const char *const n[] = { "OK", "DENIED", "REVOKED", "STALE", "NOT_FOUND", "UNAVAILABLE", "INVALID_ARG", "LIMIT", - "INTERRUPTED", "BROKEN_PIPE", "IO", "OUTCOME_UNKNOWN", "CAP_DOMAIN_MISMATCH", - "CAP_GEN_NARROW", "NOT_SUPPORTED", "WOULD_BLOCK", "PARTIAL_LAUNCH" }; - return e < sizeof n / sizeof n[0] ? n[e] : "IO"; /* section 8.6: an unknown code is IO, never OK */ + return osh_err_label(e); /* osh_err.h; section 8.6: an unknown code is IO, never OK */ } const char *osh_outcome_name(unsigned o) diff --git a/native/kernel/core/osh_op.h b/native/kernel/core/osh_op.h index e39a8b49..5ce842ae 100644 --- a/native/kernel/core/osh_op.h +++ b/native/kernel/core/osh_op.h @@ -25,13 +25,8 @@ #error "CK_OSH_OP_TEST cannot be combined with CK_HARDWARE_STAGING" #endif -/* section 8.6 platform error codes (numbers as in the draft) */ -enum osh_err { - OSH_E_OK = 0, OSH_E_DENIED = 1, OSH_E_REVOKED = 2, OSH_E_STALE = 3, OSH_E_NOT_FOUND = 4, OSH_E_UNAVAILABLE = 5, - OSH_E_INVALID_ARG = 6, OSH_E_LIMIT = 7, OSH_E_INTERRUPTED = 8, OSH_E_BROKEN_PIPE = 9, OSH_E_IO = 10, - OSH_E_OUTCOME_UNKNOWN = 11, OSH_E_CAP_DOMAIN_MISMATCH = 12, OSH_E_CAP_GEN_NARROW = 13, OSH_E_NOT_SUPPORTED = 14, - OSH_E_WOULD_BLOCK = 15, OSH_E_PARTIAL_LAUNCH = 16 -}; +/* section 8.6 platform error codes: one shared numbering (osh_err.h), also used by the kernel pipe primitive (pipe.h) */ +#include "osh_err.h" /* section 10 outcomes */ enum osh_outcome { OSH_O_NOT_STARTED = 0, OSH_O_COMPLETED, OSH_O_FAILED_NO_EFFECT, OSH_O_CANCELLED, OSH_O_OUTCOME_UNKNOWN }; diff --git a/native/kernel/core/pipe.c b/native/kernel/core/pipe.c new file mode 100644 index 00000000..2496832e --- /dev/null +++ b/native/kernel/core/pipe.c @@ -0,0 +1,465 @@ +/* pipe.c -- see pipe.h. Bounded byte pipes over ipc.h capability tables; no allocation, no libc. */ +#include "pipe.h" + +static void bytes_zero(uint8_t *d, size_t n) +{ + for (size_t i = 0; i < n; i++) + d[i] = 0; +} + +static void stats_zero(struct ck_pipe_stats *s) +{ + *s = (struct ck_pipe_stats){ 0 }; +} + +void ck_pipe_pool_init(struct ck_pipe_pool *p, const struct ck_pipe_hooks *hooks) +{ + for (unsigned i = 0; i < CK_PIPE_POOL_PIPES; i++) { + struct ck_pipe *q = &p->pipes[i]; + bytes_zero(q->buf, CK_PIPE_CAPACITY); + q->head = q->len = q->epoch = 0; + q->reader_refs = q->writer_refs = 0; + q->flags = 0; + q->waiting[0] = q->waiting[1] = 0; + stats_zero(&q->stats); + } + p->hooks = hooks; + stats_zero(&p->total); + p->live = 0; +} + +int ck_pipe_pool_empty(const struct ck_pipe_pool *p) +{ + for (unsigned i = 0; i < CK_PIPE_POOL_PIPES; i++) + if (p->pipes[i].flags & CK_PIPE_LIVE) + return 0; + return p->live == 0; +} + +/* Every counter is kept twice: this incarnation and the pool total. */ +#define BUMP(p, q, field, by) \ + do { \ + (q)->stats.field += (by); \ + (p)->total.field += (by); \ + } while (0) + +static void wake(struct ck_pipe_pool *p, unsigned idx, unsigned end) +{ + struct ck_pipe *q = &p->pipes[idx]; + if (!q->waiting[end] || !p->hooks || !p->hooks->wake) + return; + BUMP(p, q, wakeups, 1); + p->hooks->wake(p->hooks->ctx, idx, end); +} + +static unsigned data_right(unsigned end) +{ + return end == CK_PIPE_END_READ ? CK_R_READ : CK_R_WRITE; +} + +/* The effect-boundary check, run inside every operation at the moment of its effect. + * need: rights the capability must hold. want_end: the end the operation needs, or -1 for either. + * OK with *idx and *end set; otherwise the refusal. A REVOKED pipe is reported only when live_ok is 0. */ +static unsigned resolve(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, unsigned need, + int want_end, int live_ok, unsigned *idx, unsigned *end) +{ + if (!t || h.generation == 0 || h.index >= t->n) + return OSH_E_INVALID_ARG; + uint32_t res = 0; + int r = ck_cap_lookup(t, h, need, &res); + if (r == CK_CAP_INVALID) + return OSH_E_STALE; /* slot closed, or reused under a newer generation */ + if (r != CK_CAP_OK) + return OSH_E_DENIED; /* the capability lacks a right this effect needs */ + if ((res >> 24) != CK_PIPE_RES_TAG) + return OSH_E_DENIED; /* not a stream capability */ + unsigned i = (res >> 20) & 7u, e = (res >> 23) & 1u; + uint32_t epoch = res & CK_PIPE_EPOCH_MAX; + if (i >= CK_PIPE_POOL_PIPES) + return OSH_E_DENIED; + if (want_end >= 0 && e != (unsigned)want_end) + return OSH_E_DENIED; /* a read end cannot write, a write end cannot read */ + const struct ck_pipe *q = &p->pipes[i]; + if (!(q->flags & CK_PIPE_LIVE) || q->epoch != epoch) + return OSH_E_STALE; /* section 4.4: an id from an earlier incarnation */ + if (!live_ok && (q->flags & CK_PIPE_REVOKED)) + return OSH_E_REVOKED; + *idx = i; + *end = e; + return OSH_E_OK; +} + +static unsigned refuse(struct ck_pipe_pool *p, unsigned e) +{ + if (e == OSH_E_DENIED || e == OSH_E_STALE || e == OSH_E_REVOKED) + p->total.refused++; + return e; +} + +unsigned ck_pipe_create(struct ck_pipe_pool *p, struct ck_cap_table *t, struct ck_handle *rd, struct ck_handle *wr) +{ + if (!t || !rd || !wr) + return OSH_E_INVALID_ARG; + unsigned idx = CK_PIPE_POOL_PIPES; + for (unsigned i = 0; i < CK_PIPE_POOL_PIPES; i++) + if (!(p->pipes[i].flags & CK_PIPE_LIVE) && p->pipes[i].epoch < CK_PIPE_EPOCH_MAX) { + idx = i; + break; + } + if (idx == CK_PIPE_POOL_PIPES) + return OSH_E_LIMIT; + struct ck_pipe *q = &p->pipes[idx]; + uint32_t epoch = q->epoch + 1; + struct ck_handle r, w; + if (ck_cap_insert(t, ck_pipe_resource(idx, CK_PIPE_END_READ, epoch), CK_R_READ | CK_PIPE_CTL_RIGHTS, &r) != + CK_CAP_OK) + return OSH_E_LIMIT; + if (ck_cap_insert(t, ck_pipe_resource(idx, CK_PIPE_END_WRITE, epoch), CK_R_WRITE | CK_PIPE_CTL_RIGHTS, &w) != + CK_CAP_OK) { + ck_cap_remove(t, r); /* nothing stays allocated on failure */ + return OSH_E_LIMIT; + } + q->epoch = epoch; + q->head = q->len = 0; + q->reader_refs = q->writer_refs = 1; + q->flags = CK_PIPE_LIVE; + q->waiting[0] = q->waiting[1] = 0; + stats_zero(&q->stats); + p->live++; + *rd = r; + *wr = w; + return OSH_E_OK; +} + +static unsigned read_once(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, uint8_t *buf, + size_t max, size_t *n, unsigned *idx_out) +{ + unsigned idx, end; + unsigned e = resolve(p, t, h, CK_R_READ, CK_PIPE_END_READ, 0, &idx, &end); + if (e != OSH_E_OK) + return refuse(p, e); + struct ck_pipe *q = &p->pipes[idx]; + *idx_out = idx; + if (q->flags & CK_PIPE_CANCEL_READ) { + q->flags &= ~CK_PIPE_CANCEL_READ; + BUMP(p, q, cancellations, 1); + return OSH_E_INTERRUPTED; + } + if (max == 0) + return OSH_E_OK; + if (q->len == 0) { + if (q->writer_refs == 0) { + BUMP(p, q, eof, 1); + return OSH_E_OK; /* every writer closed and the buffer is drained: EOF */ + } + BUMP(p, q, would_block, 1); + return OSH_E_WOULD_BLOCK; + } + size_t take = max < q->len ? max : q->len; + for (size_t i = 0; i < take; i++) { + buf[i] = q->buf[q->head]; + q->buf[q->head] = 0; /* consumed bytes do not stay resident */ + q->head = (q->head + 1) % CK_PIPE_CAPACITY; + } + q->len -= (uint32_t)take; + if (q->len == 0) + q->head = 0; + *n = take; + BUMP(p, q, bytes_read, take); + BUMP(p, q, reads, 1); + wake(p, idx, CK_PIPE_END_WRITE); + return OSH_E_OK; +} + +static unsigned write_once(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, + const uint8_t *buf, size_t len, size_t *n, unsigned *idx_out) +{ + unsigned idx, end; +#ifdef CK_PIPE_MUTANT_SKIP_RIGHTS + /* TEST-ONLY mutant (make pipe-mutant): the write right and the end are not checked. test_pipe must fail. */ + unsigned e = resolve(p, t, h, 0, -1, 0, &idx, &end); +#else + unsigned e = resolve(p, t, h, CK_R_WRITE, CK_PIPE_END_WRITE, 0, &idx, &end); +#endif + if (e != OSH_E_OK) + return refuse(p, e); + struct ck_pipe *q = &p->pipes[idx]; + *idx_out = idx; + if (q->flags & CK_PIPE_CANCEL_WRITE) { + q->flags &= ~CK_PIPE_CANCEL_WRITE; + BUMP(p, q, cancellations, 1); + return OSH_E_INTERRUPTED; + } + if (q->reader_refs == 0) { + BUMP(p, q, broken_pipe, 1); + return OSH_E_BROKEN_PIPE; + } + if (len == 0) + return OSH_E_OK; + size_t room = CK_PIPE_CAPACITY - q->len; + if (room == 0) { + BUMP(p, q, would_block, 1); + return OSH_E_WOULD_BLOCK; + } + size_t put = len < room ? len : room; + uint32_t at = (q->head + q->len) % CK_PIPE_CAPACITY; + for (size_t i = 0; i < put; i++) { + q->buf[at] = buf[i]; + at = (at + 1) % CK_PIPE_CAPACITY; + } + q->len += (uint32_t)put; + *n = put; + BUMP(p, q, bytes_written, put); + BUMP(p, q, writes, 1); + if (q->len > q->stats.max_resident) + q->stats.max_resident = q->len; + if (q->len > p->total.max_resident) + p->total.max_resident = q->len; + wake(p, idx, CK_PIPE_END_READ); + return OSH_E_OK; +} + +/* Park on (idx, end) through the wait hook. OK = retry; anything else ends the call with no byte moved. */ +static unsigned park(struct ck_pipe_pool *p, unsigned idx, unsigned end) +{ + if (!p->hooks || !p->hooks->wait) + return OSH_E_WOULD_BLOCK; + struct ck_pipe *q = &p->pipes[idx]; + uint32_t epoch = q->epoch; + q->waiting[end]++; + BUMP(p, q, waits, 1); + unsigned w = p->hooks->wait(p->hooks->ctx, idx, end); + /* The pipe may have been freed and recreated while parked; count only our own wait out. */ + if (q->epoch == epoch && q->waiting[end]) + q->waiting[end]--; + if (w != OSH_E_OK) { + if (w == OSH_E_INTERRUPTED) + BUMP(p, q, cancellations, 1); + return w >= OSH_E_COUNT ? OSH_E_IO : w; /* section 8.6: an unknown code is IO, never OK */ + } + return OSH_E_OK; +} + +unsigned ck_stream_read(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, uint8_t *buf, + size_t max, unsigned flags, size_t *n) +{ + if (!n || (max && !buf) || (flags & ~CK_PIPE_F_BLOCK)) + return OSH_E_INVALID_ARG; + for (;;) { + unsigned idx = 0; + *n = 0; + unsigned e = read_once(p, t, h, buf, max, n, &idx); + if (e != OSH_E_WOULD_BLOCK || !(flags & CK_PIPE_F_BLOCK)) + return e; + e = park(p, idx, CK_PIPE_END_READ); + if (e != OSH_E_OK) + return e; + } +} + +unsigned ck_stream_write(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, const uint8_t *buf, + size_t len, unsigned flags, size_t *n) +{ + if (!n || (len && !buf) || (flags & ~CK_PIPE_F_BLOCK)) + return OSH_E_INVALID_ARG; + for (;;) { + unsigned idx = 0; + *n = 0; + unsigned e = write_once(p, t, h, buf, len, n, &idx); + if (e != OSH_E_WOULD_BLOCK || !(flags & CK_PIPE_F_BLOCK)) + return e; + e = park(p, idx, CK_PIPE_END_WRITE); + if (e != OSH_E_OK) + return e; + } +} + +static void pipe_free(struct ck_pipe_pool *p, struct ck_pipe *q) +{ + bytes_zero(q->buf, CK_PIPE_CAPACITY); + q->head = q->len = 0; + q->flags = 0; + q->waiting[0] = q->waiting[1] = 0; + p->live--; +} + +unsigned ck_stream_close(struct ck_pipe_pool *p, struct ck_cap_table *t, struct ck_handle h) +{ + if (!t || h.generation == 0 || h.index >= t->n) + return OSH_E_INVALID_ARG; + uint32_t res = 0; + if (ck_cap_lookup(t, h, 0, &res) != CK_CAP_OK) + return refuse(p, OSH_E_STALE); /* already closed, or the slot belongs to someone newer */ + if ((res >> 24) != CK_PIPE_RES_TAG || ((res >> 20) & 7u) >= CK_PIPE_POOL_PIPES) + return refuse(p, OSH_E_DENIED); /* not ours to close here */ + unsigned idx, end; + unsigned e = resolve(p, t, h, 0, -1, 1, &idx, &end); + ck_cap_remove(t, h); /* the handle is released whatever the pipe's state */ + if (e != OSH_E_OK) + return refuse(p, e); + struct ck_pipe *q = &p->pipes[idx]; + if (end == CK_PIPE_END_READ) { + if (q->reader_refs) + q->reader_refs--; + if (q->reader_refs == 0) + wake(p, idx, CK_PIPE_END_WRITE); /* a blocked writer now sees BROKEN_PIPE */ + } else { + if (q->writer_refs) + q->writer_refs--; + if (q->writer_refs == 0) + wake(p, idx, CK_PIPE_END_READ); /* a blocked reader now sees EOF once drained */ + } + if (q->reader_refs == 0 && q->writer_refs == 0) + pipe_free(p, q); + return OSH_E_OK; +} + +unsigned ck_stream_dup(struct ck_pipe_pool *p, struct ck_cap_table *from, struct ck_handle h, struct ck_cap_table *to, + unsigned rights, struct ck_handle *out) +{ + if (!to || !out) + return OSH_E_INVALID_ARG; + unsigned need = to == from ? CK_R_DERIVE : CK_R_GRANT; + unsigned idx, end; + unsigned e = resolve(p, from, h, need, -1, 0, &idx, &end); + if (e != OSH_E_OK) + return refuse(p, e); + unsigned have = 0; + ck_cap_rights(from, h, &have); + unsigned dr = data_right(end); + if (!(rights & dr) || (rights & ~(dr | CK_PIPE_CTL_RIGHTS))) + return OSH_E_INVALID_ARG; /* a dup carries its end's data right and nothing of the other end */ + if (rights & ~have) + return refuse(p, OSH_E_DENIED); /* attenuation only: never more than the source holds */ + struct ck_pipe *q = &p->pipes[idx]; + struct ck_handle c; + if (ck_cap_insert(to, ck_pipe_resource(idx, end, q->epoch), rights, &c) != CK_CAP_OK) + return OSH_E_LIMIT; + if (end == CK_PIPE_END_READ) + q->reader_refs++; + else + q->writer_refs++; + *out = c; + return OSH_E_OK; +} + +unsigned ck_pipe_revoke(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h) +{ + unsigned idx, end; + unsigned e = resolve(p, t, h, CK_R_REVOKE, -1, 0, &idx, &end); + if (e != OSH_E_OK) + return refuse(p, e); + struct ck_pipe *q = &p->pipes[idx]; + q->flags |= CK_PIPE_REVOKED; + q->flags &= ~(CK_PIPE_CANCEL_READ | CK_PIPE_CANCEL_WRITE); + bytes_zero(q->buf, CK_PIPE_CAPACITY); /* buffered bytes are never delivered after a revoke */ + q->head = q->len = 0; + BUMP(p, q, revocations, 1); + wake(p, idx, CK_PIPE_END_READ); + wake(p, idx, CK_PIPE_END_WRITE); + return OSH_E_OK; +} + +unsigned ck_pipe_cancel(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h) +{ + unsigned idx, end, rights = 0; + unsigned e = resolve(p, t, h, 0, -1, 0, &idx, &end); + if (e != OSH_E_OK) + return refuse(p, e); + ck_cap_rights(t, h, &rights); + if (!(rights & data_right(end))) /* the end's own data right: READ to interrupt reads, WRITE to interrupt writes */ + return refuse(p, OSH_E_DENIED); + p->pipes[idx].flags |= end == CK_PIPE_END_READ ? CK_PIPE_CANCEL_READ : CK_PIPE_CANCEL_WRITE; + wake(p, idx, end); + return OSH_E_OK; +} + +unsigned ck_pipe_release_table(struct ck_pipe_pool *p, struct ck_cap_table *t) +{ + unsigned closed = 0; + for (unsigned i = 0; i < t->n; i++) { + const struct ck_cap_slot *s = &t->slots[i]; + if (!s->live || s->tombstone || (s->resource >> 24) != CK_PIPE_RES_TAG) + continue; + struct ck_handle h = { i, s->generation }; + ck_stream_close(p, t, h); + closed++; + } + return closed; +} + +/* ---- versioned op table ---- */ +static const uint8_t op_args[] = { [CK_PIPE_OP_CREATE] = 0, [CK_PIPE_OP_READ] = 2, [CK_PIPE_OP_WRITE] = 2, + [CK_PIPE_OP_CLOSE] = 1, [CK_PIPE_OP_DUP] = 3 }; +#define OP_MAX CK_PIPE_OP_DUP + +unsigned ck_pipe_dispatch(struct ck_pipe_pool *p, struct ck_cap_table *caller, struct ck_cap_table *peer, + const uint64_t *frame, size_t ncells, uint8_t *slice, size_t slice_len, + struct ck_pipe_ret *ret) +{ + struct ck_pipe_ret r = { 0 }; + unsigned e; + struct ck_handle h = { 0, 0 }; + if (!frame || ncells < 4 || frame[0] != CK_PIPE_FRAME_MAGIC) { + e = OSH_E_INVALID_ARG; + goto done; + } + if (frame[1] != CK_PIPE_ABI_VERSION) { + e = OSH_E_NOT_SUPPORTED; /* section 3: never guess at another version */ + goto done; + } + if (frame[3] != 0) { + e = OSH_E_INVALID_ARG; + goto done; + } + if (frame[2] == 0 || frame[2] > OP_MAX) { + e = OSH_E_NOT_SUPPORTED; /* unknown op: refused before any effect */ + goto done; + } + unsigned op = (unsigned)frame[2]; + if (ncells != 4u + op_args[op] || (op != CK_PIPE_OP_CREATE && ck_handle_from_raw(frame[4], &h) != 0)) { + e = OSH_E_INVALID_ARG; + goto done; + } + size_t n = 0; + switch (op) { + case CK_PIPE_OP_CREATE: { + struct ck_handle rd, wr; + e = ck_pipe_create(p, caller, &rd, &wr); + if (e == OSH_E_OK) { + r.value = ck_handle_raw(rd); + r.value2 = ck_handle_raw(wr); + } + break; + } + case CK_PIPE_OP_READ: + case CK_PIPE_OP_WRITE: + if (frame[5] & ~(uint64_t)CK_PIPE_F_BLOCK) { + e = OSH_E_INVALID_ARG; + break; + } + e = op == CK_PIPE_OP_READ ? ck_stream_read(p, caller, h, slice, slice_len, (unsigned)frame[5], &n) + : ck_stream_write(p, caller, h, slice, slice_len, (unsigned)frame[5], &n); + r.value = n; + break; + case CK_PIPE_OP_CLOSE: + e = ck_stream_close(p, caller, h); + break; + default: { /* CK_PIPE_OP_DUP */ + struct ck_handle c; + if (frame[5] & ~(uint64_t)CK_R_ALL || frame[6] > 1 || (frame[6] == 1 && !peer)) { + e = OSH_E_INVALID_ARG; + break; + } + e = ck_stream_dup(p, caller, h, frame[6] ? peer : caller, (unsigned)frame[5], &c); + if (e == OSH_E_OK) + r.value = ck_handle_raw(c); + break; + } + } +done: + r.error = e; + if (ret) + *ret = r; + return e; +} diff --git a/native/kernel/core/pipe.h b/native/kernel/core/pipe.h new file mode 100644 index 00000000..cb48d874 --- /dev/null +++ b/native/kernel/core/pipe.h @@ -0,0 +1,174 @@ +/* pipe.h -- bounded byte-stream pipes, a native AIENOS execution primitive (aienos-mv#428, AIENOS-NATIVE-PIPE-1). + * + * Contract: aien-protocols-mv specs/osh-platform/OSH_PLATFORM_ABI.md read at commit fb5fca98e667 (v1 DRAFT, unfrozen): + * section 8.1 (PIPE_CREATE, STREAM_READ / WRITE / CLOSE / DUP; bounded pipes with backpressure, WOULD_BLOCK or block, + * BROKEN_PIPE when the reader closed), 8.5 (64 KiB per pipe minimum, LIMIT instead of truncation), 8.6 (error codes, + * shared with osh_op.h through osh_err.h), 4.4 (epoch: an id from another epoch fails STALE) and 9.2 (authority is + * checked at the moment of the effect). Anything below marked UNVERIFIED is this kernel's own choice where the draft + * names a thing but does not pin it. + * + * This is a byte pipe, separate from the 56-byte typed message ring in ipc.h. It reuses only the capability tables of + * ipc.h: every stream end is a capability in the caller's ck_cap_table, and every operation looks the handle up with + * ck_cap_lookup (live slot, matching generation, required right) when the effect happens, not before. + * + * read end capability with CK_R_READ (never CK_R_WRITE) + * write end capability with CK_R_WRITE (never CK_R_READ) + * optional CK_R_DERIVE (dup into the same table), CK_R_GRANT (dup into another table), CK_R_REVOKE (revoke the pipe) + * + * Lifetimes. A pipe lives while at least one end capability is open. reader_refs / writer_refs count the open end + * capabilities (create gives one of each, every dup adds one, every close removes one). Last writer closed: once the + * buffer is drained a read returns OK with 0 bytes (EOF). No reader: a write returns BROKEN_PIPE. Both counts zero: the + * pipe slot is scrubbed and freed. Capabilities are independent slots (no derive parent link), so a closed end frees + * its slot at once and a table can always be emptied; ipc.h cascading revoke is therefore not used for pipes. + * Every pipe capability must be released through ck_stream_close or ck_pipe_release_table: removing one with + * ck_cap_remove directly would leave its count held. + * + * Epoch. Each pool slot has an epoch, incremented every time the slot is (re)created. The capability resource carries + * it, so a capability that outlived its pipe never reaches the next pipe in that slot: STALE. A handle whose capability + * slot was closed (and maybe reused with a new generation) also fails STALE, by the ck_cap generation check. + * + * Revocation and cancellation. ck_pipe_revoke (CK_R_REVOKE on either end) kills the whole pipe: the buffered bytes are + * scrubbed, both ends are woken, and every later read, write, dup or cancel on any end returns REVOKED; no byte is + * delivered after a revoke. Only close still works, to release the handles. ck_pipe_cancel (the data right of that + * end) interrupts the end: the next or currently blocked read (or write) on that end returns INTERRUPTED with no + * bytes moved, once; a later call runs normally (section 10: an interrupted wait is retried without re-running an + * effect, and an interrupted call here never moved a byte). + * + * Blocking. With CK_PIPE_F_BLOCK a read on an empty pipe or a write on a full one parks the caller through the + * pool's wait hook instead of returning WOULD_BLOCK, and retries (re-checking authority) after the hook returns OK. + * A blocking call returns as soon as it moved at least one byte (partial I/O; the caller loops). The kernel's hook + * yields to the scheduler; the host test simulates it. Without a wait hook a blocking call returns WOULD_BLOCK. + * + * Memory: a fixed pool of CK_PIPE_POOL_PIPES pipes with CK_PIPE_CAPACITY bytes each, all static; nothing grows. + * Pure logic, no hardware: host-tested in tests/test_pipe.c (fixtures in tests/fixtures/pipe/), driven in QEMU by + * core/pipe_test.c (CK_PIPE_TEST). Host and QEMU evidence qualify nothing physical. */ +#ifndef AIENOS_CK_PIPE_H +#define AIENOS_CK_PIPE_H + +#include +#include +#include "ipc.h" +#include "osh_err.h" + +#define CK_PIPE_ABI_VERSION 1u /* section 3: abi_version of the platform frame */ +#define CK_PIPE_FRAME_MAGIC 0x4F534846u /* section 3: "OSHF", platform frame magic */ +#define CK_PIPE_CAPACITY 65536u /* bytes per pipe; section 8.5 minimum 64 KiB (LIMITS_GET max_pipe_bytes) */ +#define CK_PIPE_POOL_PIPES 4u /* pipes per pool; UNVERIFIED: the draft sets no pipe count */ +_Static_assert(CK_PIPE_CAPACITY >= 65536u, "section 8.5: at least 64 KiB per pipe"); +_Static_assert(CK_PIPE_POOL_PIPES >= 1u && CK_PIPE_POOL_PIPES <= 8u, "the pipe index has three bits in the resource"); + +/* Capability resource of a stream end: tag 0x50 ("P") in bits 31..24, end in bit 23, pipe index in bits 22..20, + * epoch in bits 19..0. A slot whose epoch reached CK_PIPE_EPOCH_MAX is retired for good. Layout UNVERIFIED (own). */ +#define CK_PIPE_RES_TAG 0x50u +#define CK_PIPE_EPOCH_MAX 0xFFFFFu +static inline uint32_t ck_pipe_resource(unsigned idx, unsigned end, uint32_t epoch) +{ + return (CK_PIPE_RES_TAG << 24) | ((uint32_t)(end & 1u) << 23) | ((uint32_t)(idx & 7u) << 20) | + (epoch & CK_PIPE_EPOCH_MAX); +} + +enum ck_pipe_end { CK_PIPE_END_READ = 0, CK_PIPE_END_WRITE = 1 }; + +/* Platform op ids of the versioned op table. The draft names the operations; the numbers are UNVERIFIED (own). */ +enum ck_pipe_op { + CK_PIPE_OP_CREATE = 1, /* PIPE_CREATE() -> (read_stream, write_stream) */ + CK_PIPE_OP_READ = 2, /* STREAM_READ(stream, out_slice) -> n, 0 = EOF */ + CK_PIPE_OP_WRITE = 3, /* STREAM_WRITE(stream, in_slice) -> n, partial writes allowed */ + CK_PIPE_OP_CLOSE = 4, /* STREAM_CLOSE(stream) */ + CK_PIPE_OP_DUP = 5, /* STREAM_DUP(src_stream, rights, target table) -> stream; capability form, UNVERIFIED */ +}; + +#define CK_PIPE_F_BLOCK 0x1u /* read / write flag: park through the wait hook instead of WOULD_BLOCK */ + +/* Rights a create gives each end beyond its data right, and the only rights a dup may carry. */ +#define CK_PIPE_CTL_RIGHTS (CK_R_DERIVE | CK_R_GRANT | CK_R_REVOKE) + +struct ck_pipe_stats { + uint64_t bytes_written, bytes_read; /* bytes that moved */ + uint64_t writes, reads; /* calls that moved at least one byte */ + uint64_t max_resident; /* most bytes ever buffered at once (never above CK_PIPE_CAPACITY) */ + uint64_t would_block; /* WOULD_BLOCK results seen, returned or waited on (backpressure) */ + uint64_t waits; /* calls into the wait hook */ + uint64_t wakeups; /* calls into the wake hook (an end had a waiter) */ + uint64_t cancellations; /* INTERRUPTED results */ + uint64_t revocations; /* pipes revoked */ + uint64_t broken_pipe; /* BROKEN_PIPE results */ + uint64_t eof; /* reads that returned EOF */ + uint64_t refused; /* DENIED, STALE and REVOKED results at the effect boundary (pool total only) */ +}; + +#define CK_PIPE_LIVE 0x1u +#define CK_PIPE_REVOKED 0x2u +#define CK_PIPE_CANCEL_READ 0x4u +#define CK_PIPE_CANCEL_WRITE 0x8u + +struct ck_pipe { + uint8_t buf[CK_PIPE_CAPACITY]; /* ring: bytes head..head+len-1 (mod capacity) are buffered */ + uint32_t head, len; + uint32_t epoch; /* 0 = never created */ + uint32_t reader_refs, writer_refs; + uint32_t flags; + uint32_t waiting[2]; /* callers parked in the wait hook, per end */ + struct ck_pipe_stats stats; /* this incarnation; reset at create */ +}; + +/* Wait / wake hook. wait: the caller would block on (pipe, end); return OSH_E_OK to retry the operation (it re-checks + * authority) or an error (normally OSH_E_INTERRUPTED) to give up; the operation then returns it with no byte moved. + * wake: (pipe, end) may proceed (bytes, space, close, revoke or cancel); called only when that end has a waiter. */ +struct ck_pipe_hooks { + void *ctx; + unsigned (*wait)(void *ctx, unsigned pipe, unsigned end); + void (*wake)(void *ctx, unsigned pipe, unsigned end); +}; + +struct ck_pipe_pool { + struct ck_pipe pipes[CK_PIPE_POOL_PIPES]; + const struct ck_pipe_hooks *hooks; /* may be 0 */ + struct ck_pipe_stats total; /* every incarnation since init */ + unsigned live; /* pipes currently live */ +}; + +void ck_pipe_pool_init(struct ck_pipe_pool *p, const struct ck_pipe_hooks *hooks); +/* 1 if no pipe is live (every end of every pipe was closed). */ +int ck_pipe_pool_empty(const struct ck_pipe_pool *p); + +/* PIPE_CREATE: a new pipe, both ends inserted into t. LIMIT if the pool or the table is full (nothing is left + * allocated). The draft's PIPE_CREATE takes no binding, so no prior capability is required (UNVERIFIED). */ +unsigned ck_pipe_create(struct ck_pipe_pool *p, struct ck_cap_table *t, struct ck_handle *rd, struct ck_handle *wr); +/* STREAM_READ / STREAM_WRITE: *n = bytes moved (0 with OK on a read = EOF, or max == 0). */ +unsigned ck_stream_read(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, uint8_t *buf, + size_t max, unsigned flags, size_t *n); +unsigned ck_stream_write(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h, const uint8_t *buf, + size_t len, unsigned flags, size_t *n); +/* STREAM_CLOSE: releases the capability. Works on a revoked pipe. STALE (after releasing the capability) if it named + * an earlier incarnation of the slot. */ +unsigned ck_stream_close(struct ck_pipe_pool *p, struct ck_cap_table *t, struct ck_handle h); +/* STREAM_DUP: a new capability on the same end in `to` with `rights`, which must hold the end's data right, be a + * subset of the source rights and of data right | CK_PIPE_CTL_RIGHTS. Needs CK_R_DERIVE (to == from) or + * CK_R_GRANT (another table) on the source. */ +unsigned ck_stream_dup(struct ck_pipe_pool *p, struct ck_cap_table *from, struct ck_handle h, struct ck_cap_table *to, + unsigned rights, struct ck_handle *out); +/* Revoke the whole pipe (CK_R_REVOKE on either end). */ +unsigned ck_pipe_revoke(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h); +/* Interrupt the end h names (its data right needed). */ +unsigned ck_pipe_cancel(struct ck_pipe_pool *p, const struct ck_cap_table *t, struct ck_handle h); +/* Section 12 cleanup: closes every pipe capability in t. Returns how many were closed. */ +unsigned ck_pipe_release_table(struct ck_pipe_pool *p, struct ck_cap_table *t); + +/* ---- versioned op table ---- + * A platform call frame is cells (u64): 0 magic CK_PIPE_FRAME_MAGIC, 1 abi_version, 2 op, 3 reserved (0), then the + * op's arguments; the frame must be exactly 4 + nargs cells. Arguments: READ / WRITE: handle (ck_handle_raw form), + * flags; CLOSE: handle; DUP: handle, rights, target (0 caller table, 1 peer table); CREATE: none. The byte slice is + * the read destination or the write source. Check order, first failure wins, all before any effect: frame shorter + * than 4 cells, bad magic or nonzero reserved -> INVALID_ARG; abi_version not CK_PIPE_ABI_VERSION or an unknown op + * -> NOT_SUPPORTED; wrong cell count, a generation-0 handle or unknown flag bits -> INVALID_ARG. + * Result: {error, value} as in section 8; PIPE_CREATE also fills value2 (the write end). value2 is UNVERIFIED. */ +struct ck_pipe_ret { + uint32_t error; + uint64_t value, value2; +}; +unsigned ck_pipe_dispatch(struct ck_pipe_pool *p, struct ck_cap_table *caller, struct ck_cap_table *peer, + const uint64_t *frame, size_t ncells, uint8_t *slice, size_t slice_len, + struct ck_pipe_ret *ret); + +#endif diff --git a/native/kernel/core/pipe_drive.h b/native/kernel/core/pipe_drive.h new file mode 100644 index 00000000..447e774e --- /dev/null +++ b/native/kernel/core/pipe_drive.h @@ -0,0 +1,222 @@ +/* pipe_drive.h -- TEST driver for the pipe primitive (pipe.h): a producer and a consumer task, each a step function, + * interleaved by the run-queue scheduler (sched.h), exchanging a binary payload (every fifth byte NUL) through one pipe. + * Shared by the host test (tests/test_pipe.c) and the QEMU self-test (core/pipe_test.c, CK_PIPE_TEST) so both run + * the same scenario. No libc, no allocation: the caller owns the world, the pool, both tables and the sink buffer. + * + * The producer owns the write end; the read end is handed to the consumer's own table with STREAM_DUP (READ, plus + * REVOKE for the revocation scenario) and the producer's copy is closed, so each task holds one end. Non-blocking mode: + * a WOULD_BLOCK ends the step with no progress and the scheduler runs the other task. Blocking mode: the wait hook + * marks the caller blocked and keeps ticking the scheduler, running the other task's steps, until the wake hook fires + * for that end (OK, the call retries) or the spin bound runs out (INTERRUPTED: a stalled peer). Static functions only. */ +#ifndef AIENOS_CK_PIPE_DRIVE_H +#define AIENOS_CK_PIPE_DRIVE_H + +#include "pipe.h" +#include "sched.h" + +#define PD_CHUNK_MAX 8192u +#define PD_SPIN_MAX 64u +#define PD_TICK_MAX 2000000u + +struct pd_world; +struct pd_task { + uint32_t id; + int done, blocked; + void (*step)(struct pd_world *w, struct pd_task *t); +}; + +struct pd_world { + struct ck_pipe_pool *pool; + struct ck_cap_table *prod_t, *cons_t; + struct ck_pipe_hooks hooks; + struct ck_sched sched; + struct pd_task tasks[2]; /* 0 producer, 1 consumer */ + struct pd_task *current; + struct ck_handle w, r; + uint8_t woken[CK_PIPE_POOL_PIPES][2]; + unsigned flags; /* CK_PIPE_F_BLOCK or 0 */ + size_t total; /* payload bytes to send */ + size_t chunk_w, chunk_r; /* bytes per producer write / consumer read */ + unsigned prod_every, cons_every; /* a task moves bytes on one step in this many (a slow side), 0 or 1 = every step */ + size_t revoke_at; /* consumer revokes the pipe once it has this many bytes (0 = never) */ + uint8_t *sink; /* total bytes */ + uint8_t wbuf[PD_CHUNK_MAX], rbuf[PD_CHUNK_MAX]; + /* results */ + size_t sent, recvd, reads_after_revoke; + unsigned setup_err, prod_err, cons_err; /* OSH_E_OK, or the error the task ended on */ + int eof_seen, revoked; + uint64_t ticks, wait_spins, prod_steps, cons_steps; +}; + +static inline uint8_t pd_byte(size_t i) +{ + return i % 5 == 0 ? 0 : (uint8_t)(((uint32_t)i * 2654435761u) >> 13); +} + +static inline struct pd_task *pd_find(struct pd_world *w, uint32_t id) +{ + return w->tasks[0].id == id ? &w->tasks[0] : w->tasks[1].id == id ? &w->tasks[1] : 0; +} + +/* One scheduler tick: run the picked task's step unless it is blocked (parked on the stack) or done. */ +static inline int pd_tick(struct pd_world *w) +{ + uint32_t id = 0; + if (ck_sched_tick(&w->sched, 0, &id) != 1) + return 0; + w->ticks++; + struct pd_task *t = pd_find(w, id); + if (!t || t->blocked || t->done) + return 1; + struct pd_task *prev = w->current; + w->current = t; + t->step(w, t); + w->current = prev; + if (t->done) + ck_sched_remove(&w->sched, t->id); + return 1; +} + +static inline unsigned pd_wait(void *ctx, unsigned pipe, unsigned end) +{ + struct pd_world *w = ctx; + struct pd_task *me = w->current; + if (!me) + return OSH_E_INTERRUPTED; + me->blocked = 1; + w->woken[pipe][end] = 0; + for (unsigned s = 0; s < PD_SPIN_MAX && !w->woken[pipe][end]; s++) { + w->wait_spins++; + if (!pd_tick(w)) + break; + } + me->blocked = 0; + return w->woken[pipe][end] ? OSH_E_OK : OSH_E_INTERRUPTED; +} + +static inline void pd_wake(void *ctx, unsigned pipe, unsigned end) +{ + struct pd_world *w = ctx; + w->woken[pipe][end] = 1; +} + +static inline void pd_producer(struct pd_world *w, struct pd_task *t) +{ + w->prod_steps++; + if (w->prod_every > 1 && w->prod_steps % w->prod_every) + return; /* thinking: no I/O this step */ + if (w->sent == w->total) { + ck_stream_close(w->pool, w->prod_t, w->w); /* last writer: the consumer sees EOF once drained */ + t->done = 1; + return; + } + size_t want = w->total - w->sent; + if (want > w->chunk_w) + want = w->chunk_w; + for (size_t i = 0; i < want; i++) + w->wbuf[i] = pd_byte(w->sent + i); + size_t n = 0; + unsigned e = ck_stream_write(w->pool, w->prod_t, w->w, w->wbuf, want, w->flags, &n); + if (e == OSH_E_OK) { + w->sent += n; + } else if (e != OSH_E_WOULD_BLOCK) { + w->prod_err = e; + ck_stream_close(w->pool, w->prod_t, w->w); + t->done = 1; + } +} + +static inline void pd_consumer(struct pd_world *w, struct pd_task *t) +{ + w->cons_steps++; + if (w->cons_every > 1 && w->cons_steps % w->cons_every) + return; + size_t n = 0; + unsigned e = ck_stream_read(w->pool, w->cons_t, w->r, w->rbuf, w->chunk_r, w->flags, &n); + if (e == OSH_E_OK && n > 0) { + if (w->revoked) + w->reads_after_revoke++; + for (size_t i = 0; i < n && w->recvd + i < w->total; i++) + w->sink[w->recvd + i] = w->rbuf[i]; + w->recvd += n; + if (w->revoke_at && !w->revoked && w->recvd >= w->revoke_at) { + w->revoked = ck_pipe_revoke(w->pool, w->cons_t, w->r) == OSH_E_OK; + if (!w->revoked) + w->cons_err = OSH_E_IO; + } + } else if (e == OSH_E_OK) { + w->eof_seen = 1; + ck_stream_close(w->pool, w->cons_t, w->r); + t->done = 1; + } else if (e != OSH_E_WOULD_BLOCK) { + w->cons_err = e; + ck_stream_close(w->pool, w->cons_t, w->r); + t->done = 1; + } +} + +/* Run one transfer. pool and both tables must be fresh (the pool initialised with &w->hooks by this call). */ +static inline void pd_run(struct pd_world *w, struct ck_pipe_pool *pool, struct ck_cap_table *prod_t, + struct ck_cap_table *cons_t, uint8_t *sink, size_t total, size_t chunk_w, size_t chunk_r, + unsigned flags, unsigned prod_every, unsigned cons_every, size_t revoke_at) +{ + *w = (struct pd_world){ .pool = pool, .prod_t = prod_t, .cons_t = cons_t, .sink = sink, .total = total, + .chunk_w = chunk_w > PD_CHUNK_MAX ? PD_CHUNK_MAX : chunk_w, + .chunk_r = chunk_r > PD_CHUNK_MAX ? PD_CHUNK_MAX : chunk_r, .flags = flags, + .prod_every = prod_every, .cons_every = cons_every, .revoke_at = revoke_at }; + w->hooks = (struct ck_pipe_hooks){ w, pd_wait, pd_wake }; + ck_pipe_pool_init(pool, &w->hooks); + struct ck_handle r0; + w->setup_err = ck_pipe_create(pool, prod_t, &r0, &w->w); + if (w->setup_err != OSH_E_OK) + return; + w->setup_err = ck_stream_dup(pool, prod_t, r0, cons_t, CK_R_READ | (revoke_at ? CK_R_REVOKE : 0), &w->r); + unsigned c = ck_stream_close(pool, prod_t, r0); /* the producer keeps only the write end */ + if (w->setup_err == OSH_E_OK) + w->setup_err = c; + if (w->setup_err != OSH_E_OK) { + ck_pipe_release_table(pool, prod_t); + ck_pipe_release_table(pool, cons_t); + return; + } + static const uint8_t classes[1] = { 0 }; + ck_sched_init(&w->sched, 1, classes, CK_SCHED_MAX_TASKS, 1); + w->tasks[0] = (struct pd_task){ .id = 0x50524f44u, .step = pd_producer }; /* "PROD" */ + w->tasks[1] = (struct pd_task){ .id = 0x434f4e53u, .step = pd_consumer }; /* "CONS" */ + ck_sched_enqueue(&w->sched, w->tasks[0].id, CK_PRIO_NORMAL); + ck_sched_enqueue(&w->sched, w->tasks[1].id, CK_PRIO_NORMAL); + while ((!w->tasks[0].done || !w->tasks[1].done) && w->ticks < PD_TICK_MAX) + if (!pd_tick(w)) + break; + /* section 12: whatever happened, no end stays open */ + ck_pipe_release_table(pool, prod_t); + ck_pipe_release_table(pool, cons_t); +} + +/* Bytes of the sink that differ from the payload, over what was received. */ +static inline size_t pd_mismatches(const struct pd_world *w) +{ + size_t bad = 0, n = w->recvd < w->total ? w->recvd : w->total; + for (size_t i = 0; i < n; i++) + bad += w->sink[i] != pd_byte(i); + return bad; +} + +static inline size_t pd_nul_count(const struct pd_world *w) +{ + size_t z = 0, n = w->recvd < w->total ? w->recvd : w->total; + for (size_t i = 0; i < n; i++) + z += w->sink[i] == 0; + return z; +} + +/* 1 if the table holds no live slot at all (tombstones included). */ +static inline int pd_table_empty(const struct ck_cap_table *t) +{ + for (unsigned i = 0; i < CK_CAP_SLOTS; i++) + if (t->slots[i].live) + return 0; + return 1; +} + +#endif diff --git a/native/kernel/core/pipe_test.c b/native/kernel/core/pipe_test.c new file mode 100644 index 00000000..57f382d6 --- /dev/null +++ b/native/kernel/core/pipe_test.c @@ -0,0 +1,172 @@ +/* pipe_test.c -- AIENOS_CK_PIPE kernel self-test (TEST ONLY, CK_PIPE_TEST=1; gate scripts/qemu_ck_pipe_test.sh). + * + * Drives the pipe primitive (core/pipe.c, aienos-mv#428) inside the kernel: a producer and a consumer task, step + * functions interleaved by the run-queue scheduler (core/sched.c), each holding one end in its own capability table, + * through the same driver the host test uses (core/pipe_drive.h). The kernel's wait hook yields to the scheduler + * (it keeps ticking it, running the other task) until the wake hook fires; this is cooperative scheduling inside one + * kernel thread, not a context switch between M3 threads. Lines on the serial console: + * pipe_check: name= result=PASS|FAIL
;