[BUG] Preserve counted startup header before endpoint and workspace records #6

Closed
opened 2026-10-11 12:55:38 +02:00 by erikinkinen · 0 comments
Owner

Summary

RBS1 minor five declares a 264-byte header and 344-byte complete startup, but the portable encoder and parser still use the previous 248-byte header's endpoint/workspace positions. The control endpoint overwrites independently configured invocation/subscription counts. The literal declared-layout fixture and the current codec therefore disagree, preventing trustworthy private-realm startup admission. This is a source-observed framing regression; no runtime or test result is claimed.

Reproduction

Inspect the encoder and parser at LibIPC revision438ebd0aa6d2f85e5034574c825ce868310cd484 in the startup codec, together with declared extents and the independent literal fixture. The encoder writes counts at248/256, then writes the first endpoint at248. The parser interprets those same bytes as both counts and endpoint metadata. Its workspace reads304/312 although the declared264-byte header puts the workspace at312, address320 and length328.

An explicitly enabled startup with independently chosen small invocation/subscription counts is sufficient to expose the overwrite directly in encoded bytes. A disabled startup's encoded endpoint metadata instead appears as nonzero counts on parse. Execution is deferred by the current development instruction; these are source-derived outcomes to confirm with the authored controls when execution resumes.

Expected and actual behavior

Expected: the264-byte header owns all count/digest fields; two24-byte endpoint records occupy264–311, followed by one32-byte workspace record at312–343. Invocation/subscription counts remain at248/256. Every reserved tail word and exact complete length is checked.

Actual source: endpoint records occupy248/272 and workspace metadata296, address304/length312; the first endpoint overwrites the count tail and the codec ignores part of the declared final tail. No particular runtime error, exit status or image result has been measured.

Environment and identity

  • Component: LibIPC438ebd0aa6d2f85e5034574c825ce868310cd484; Integrationab652d18a464252addb8701ec5bf1ac66c01ef67.
  • Image/profile/digest: none executed for this investigation; source checkpoint only.
  • Architecture: portable codec used by freestanding x86-64 realm producers/consumers; no hardware/toolchain result asserted.
  • Authority: startup fields are descriptive; actual native route/custody and target mapping admission remain independent.
  • Last known working revision: not determined by this source investigation.

Evidence and prior checks

The exact current source and already-authored literal fixture above independently declare conflicting tail positions. No tests, builds, lint/product checks, generated documentation, VM/profiler execution or CI observation were run. Preserve this limitation in subsequent tracking. Derive tail offsets from the declared header and record extents to prevent this overlap from recurring when counts grow.

Tracking

Related native control, compatibility consumers and phase completion. Source acceptance can close after the complete grammar, independent literal/negative controls, documentation and coherent signed adoption are implemented; execution remains separately deferred.

Detailed scope and contracts

Counted startup tail repair — 11 October 2026

No old/trailing/partial/overwritten-tail fallback or new authority is added.

A disabled literal image requires zero count words and rejects obsolete overwritten-tail bytes. The maintained realm-startup VM source preserves its full oracle for two actual private mediators, authenticated readiness, peer-independent retirement/stale-handle refusal and ordinary successful shell exit. Its description now names the same canonical framing; no acceptance or marker is relaxed.

Bug source acceptance closes after complete repair, authored controls, documentation and coherent signed adoption, independently of deferred testing. The full native control design stays OPEN with all eight complete-transaction criteria pending. Actual counted thread storage/adoption, complete code/module/stack/guard/TLS/architecture, positive original enrollment, once-only member Start, all-running-member drain and real supervisor/loader/mediator deployment remain required. Full thread exit, departed-leader survival, join/detach and compatibility consumers remain open.

Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Canonical phase progress remains 21.78% weighted and 10.11% whole acceptance: 33/460 parents and 503/970 children under 167 decomposed parents. Source acceptance remains independent of deferred execution.

Counted original execution storage — 11 October 2026

Older schemas/widths reject without aliases, inferred counts or fallback.

Public payload IDs, matching process labels or spare capacity cannot enroll another execution. Unknown/stale/unsealed/failed/native-draining delivery retains its ordinary native custody and refusal obligations. This introduces no extra receiver, process capability, member enrollment or runnable context.

Eleven additional execution/arena controls are authored and unrun: empty-capacity refusal, all-original-key admission, retirement/reconstruction prevention, incomplete identity atomicity, missing/previously occupied engine capacity, canonical row association, successful CLAIM/completion/retirement, errored CLAIM custody, spare-row unknown/stale refusal, real target ThreadSlot geometry/disjoint extents and independent grown geometry.

Two spare execution rows remain inert while the full existing oracle still requires two actual private mediators, authenticated readiness, independent peer retirement, stale-handle refusal and ordinary successful shell exit.

The full native member control and Start design remains OPEN with all eight original complete-transaction criteria pending. Additional prepared members, current original code/module/stack/guard/TLS and complete architecture state, positive original enrollment, once-only Start and all-running-member stop/drain remain required. Per-thread masks/TLS, thread exit, departed-leader survival, join/detach and all required compatibility consumers remain open.

Read-only source inventories record all 4,387 code files below1,000 lines, missing_docs denial at all 98 Cargo crate roots, and153 duplicate PR guards across76 workflows.

Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Canonical phase progress remains 21.78% weighted and 10.11% whole acceptance: 33/460 parents and 503/970 children under 167 decomposed parents. Source acceptance remains independent of deferred execution.

Related records and contracts
Repository Links
blockd PR 2
coreutils PR 2
crashd PR 2
deviced PR 3
docs PR 4
drv-acpi PR 2
drv-i8042 PR 2
drv-ps2-keyboard PR 2
drv-ps2-mouse PR 2
drv-rtc-cmos PR 2
drv-serial PR 2
drv-virtio-block PR 2
dynlinkd issue 1, PR 3
e2fsd PR 3
exsh PR 3
extop PR 2
fatd PR 3
fbcond PR 2
hotplugd PR 2
inputd PR 2
integration PR 12
irqd PR 2
kernel issue 1, issue 44, PR 3
keyd PR 2
launchd PR 2
lib-block PR 2
lib-bootstrap PR 2
lib-capabi PR 2
lib-cstd issue 1
lib-driver PR 2
lib-input PR 2
lib-interrupt PR 2
lib-ipc issue 6, PR 2
lib-log PR 2
lib-posixabi PR 3
lib-service PR 2
lib-stdio PR 2
lib-time PR 2
lib-tty PR 2
lib-vfs PR 2
loaderd PR 2
logd PR 4
memd PR 2
named PR 2
pagerd PR 2
posixd PR 5, thread-storage.md
powerboxd PR 2
probed PR 2
procd PR 2
ramfsd PR 2
rootd PR 2
seriald PR 2
timed PR 2
ttyd PR 3
vfsd PR 3
vspaced PR 2
## Summary RBS1 minor five declares a 264-byte header and 344-byte complete startup, but the portable encoder and parser still use the previous 248-byte header's endpoint/workspace positions. The control endpoint overwrites independently configured invocation/subscription counts. The literal declared-layout fixture and the current codec therefore disagree, preventing trustworthy private-realm startup admission. This is a source-observed framing regression; no runtime or test result is claimed. ## Reproduction Inspect the encoder and parser at LibIPC revision438ebd0aa6d2f85e5034574c825ce868310cd484 in [the startup codec](https://git.erikinkinen.fi/erix/lib-ipc/src/commit/438ebd0aa6d2f85e5034574c825ce868310cd484/src/realm_startup/startup.rs), together with [declared extents](https://git.erikinkinen.fi/erix/lib-ipc/src/commit/438ebd0aa6d2f85e5034574c825ce868310cd484/src/realm_startup.rs) and [the independent literal fixture](https://git.erikinkinen.fi/erix/lib-ipc/src/commit/438ebd0aa6d2f85e5034574c825ce868310cd484/tests/realm_startup.rs). The encoder writes counts at248/256, then writes the first endpoint at248. The parser interprets those same bytes as both counts and endpoint metadata. Its workspace reads304/312 although the declared264-byte header puts the workspace at312, address320 and length328. An explicitly enabled startup with independently chosen small invocation/subscription counts is sufficient to expose the overwrite directly in encoded bytes. A disabled startup's encoded endpoint metadata instead appears as nonzero counts on parse. Execution is deferred by the current development instruction; these are source-derived outcomes to confirm with the authored controls when execution resumes. ## Expected and actual behavior Expected: the264-byte header owns all count/digest fields; two24-byte endpoint records occupy264–311, followed by one32-byte workspace record at312–343. Invocation/subscription counts remain at248/256. Every reserved tail word and exact complete length is checked. Actual source: endpoint records occupy248/272 and workspace metadata296, address304/length312; the first endpoint overwrites the count tail and the codec ignores part of the declared final tail. No particular runtime error, exit status or image result has been measured. ## Environment and identity - Component: LibIPC438ebd0aa6d2f85e5034574c825ce868310cd484; Integrationab652d18a464252addb8701ec5bf1ac66c01ef67. - Image/profile/digest: none executed for this investigation; source checkpoint only. - Architecture: portable codec used by freestanding x86-64 realm producers/consumers; no hardware/toolchain result asserted. - Authority: startup fields are descriptive; actual native route/custody and target mapping admission remain independent. - Last known working revision: not determined by this source investigation. ## Evidence and prior checks The exact current source and already-authored literal fixture above independently declare conflicting tail positions. No tests, builds, lint/product checks, generated documentation, VM/profiler execution or CI observation were run. Preserve this limitation in subsequent tracking. Derive tail offsets from the declared header and record extents to prevent this overlap from recurring when counts grow. ## Tracking Related [native control](https://git.erikinkinen.fi/erix/kernel/issues/47), [compatibility consumers](https://git.erikinkinen.fi/erix/posixd/issues/34) and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). Source acceptance can close after the complete grammar, independent literal/negative controls, documentation and coherent signed adoption are implemented; execution remains separately deferred. <details> <summary>Detailed scope and contracts</summary> ### Counted startup tail repair — 11 October 2026 No old/trailing/partial/overwritten-tail fallback or new authority is added. A disabled literal image requires zero count words and rejects obsolete overwritten-tail bytes. The maintained realm-startup VM source preserves its full oracle for two actual private mediators, authenticated readiness, peer-independent retirement/stale-handle refusal and ordinary successful shell exit. Its description now names the same canonical framing; no acceptance or marker is relaxed. Bug source acceptance closes after complete repair, authored controls, documentation and coherent signed adoption, independently of deferred testing. The full [native control design](https://git.erikinkinen.fi/erix/kernel/issues/47) stays OPEN with all eight complete-transaction criteria pending. Actual counted thread storage/adoption, complete code/module/stack/guard/TLS/architecture, positive original enrollment, once-only member Start, all-running-member drain and real supervisor/loader/mediator deployment remain required. Full thread exit, departed-leader survival, join/detach and compatibility consumers remain open. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Canonical phase progress remains 21.78% weighted and 10.11% whole acceptance: 33/460 parents and 503/970 children under 167 decomposed parents. Source acceptance remains independent of deferred execution. ### Counted original execution storage — 11 October 2026 Older schemas/widths reject without aliases, inferred counts or fallback. Public payload IDs, matching process labels or spare capacity cannot enroll another execution. Unknown/stale/unsealed/failed/native-draining delivery retains its ordinary native custody and refusal obligations. This introduces no extra receiver, process capability, member enrollment or runnable context. Eleven additional execution/arena controls are authored and unrun: empty-capacity refusal, all-original-key admission, retirement/reconstruction prevention, incomplete identity atomicity, missing/previously occupied engine capacity, canonical row association, successful CLAIM/completion/retirement, errored CLAIM custody, spare-row unknown/stale refusal, real target ThreadSlot geometry/disjoint extents and independent grown geometry. Two spare execution rows remain inert while the full existing oracle still requires two actual private mediators, authenticated readiness, independent peer retirement, stale-handle refusal and ordinary successful shell exit. The full [native member control and Start design](https://git.erikinkinen.fi/erix/kernel/issues/47) remains OPEN with all eight original complete-transaction criteria pending. Additional prepared members, current original code/module/stack/guard/TLS and complete architecture state, positive original enrollment, once-only Start and all-running-member stop/drain remain required. Per-thread masks/TLS, thread exit, departed-leader survival, join/detach and all required compatibility consumers remain open. Read-only source inventories record all 4,387 code files below1,000 lines, missing_docs denial at all 98 Cargo crate roots, and153 duplicate PR guards across76 workflows. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Canonical phase progress remains 21.78% weighted and 10.11% whole acceptance: 33/460 parents and 503/970 children under 167 decomposed parents. Source acceptance remains independent of deferred execution. </details> <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | blockd | [PR 2](https://git.erikinkinen.fi/erix/blockd/pulls/2) | | coreutils | [PR 2](https://git.erikinkinen.fi/erix/coreutils/pulls/2) | | crashd | [PR 2](https://git.erikinkinen.fi/erix/crashd/pulls/2) | | deviced | [PR 3](https://git.erikinkinen.fi/erix/deviced/pulls/3) | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | drv-acpi | [PR 2](https://git.erikinkinen.fi/erix/drv-acpi/pulls/2) | | drv-i8042 | [PR 2](https://git.erikinkinen.fi/erix/drv-i8042/pulls/2) | | drv-ps2-keyboard | [PR 2](https://git.erikinkinen.fi/erix/drv-ps2-keyboard/pulls/2) | | drv-ps2-mouse | [PR 2](https://git.erikinkinen.fi/erix/drv-ps2-mouse/pulls/2) | | drv-rtc-cmos | [PR 2](https://git.erikinkinen.fi/erix/drv-rtc-cmos/pulls/2) | | drv-serial | [PR 2](https://git.erikinkinen.fi/erix/drv-serial/pulls/2) | | drv-virtio-block | [PR 2](https://git.erikinkinen.fi/erix/drv-virtio-block/pulls/2) | | dynlinkd | [issue 1](https://git.erikinkinen.fi/erix/dynlinkd/issues/1), [PR 3](https://git.erikinkinen.fi/erix/dynlinkd/pulls/3) | | e2fsd | [PR 3](https://git.erikinkinen.fi/erix/e2fsd/pulls/3) | | exsh | [PR 3](https://git.erikinkinen.fi/erix/exsh/pulls/3) | | extop | [PR 2](https://git.erikinkinen.fi/erix/extop/pulls/2) | | fatd | [PR 3](https://git.erikinkinen.fi/erix/fatd/pulls/3) | | fbcond | [PR 2](https://git.erikinkinen.fi/erix/fbcond/pulls/2) | | hotplugd | [PR 2](https://git.erikinkinen.fi/erix/hotplugd/pulls/2) | | inputd | [PR 2](https://git.erikinkinen.fi/erix/inputd/pulls/2) | | integration | [PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12) | | irqd | [PR 2](https://git.erikinkinen.fi/erix/irqd/pulls/2) | | kernel | [issue 1](https://git.erikinkinen.fi/erix/kernel/issues/1), [issue 44](https://git.erikinkinen.fi/erix/kernel/issues/44), [PR 3](https://git.erikinkinen.fi/erix/kernel/pulls/3) | | keyd | [PR 2](https://git.erikinkinen.fi/erix/keyd/pulls/2) | | launchd | [PR 2](https://git.erikinkinen.fi/erix/launchd/pulls/2) | | lib-block | [PR 2](https://git.erikinkinen.fi/erix/lib-block/pulls/2) | | lib-bootstrap | [PR 2](https://git.erikinkinen.fi/erix/lib-bootstrap/pulls/2) | | lib-capabi | [PR 2](https://git.erikinkinen.fi/erix/lib-capabi/pulls/2) | | lib-cstd | [issue 1](https://git.erikinkinen.fi/erix/lib-cstd/issues/1) | | lib-driver | [PR 2](https://git.erikinkinen.fi/erix/lib-driver/pulls/2) | | lib-input | [PR 2](https://git.erikinkinen.fi/erix/lib-input/pulls/2) | | lib-interrupt | [PR 2](https://git.erikinkinen.fi/erix/lib-interrupt/pulls/2) | | lib-ipc | [issue 6](https://git.erikinkinen.fi/erix/lib-ipc/issues/6), [PR 2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2) | | lib-log | [PR 2](https://git.erikinkinen.fi/erix/lib-log/pulls/2) | | lib-posixabi | [PR 3](https://git.erikinkinen.fi/erix/lib-posixabi/pulls/3) | | lib-service | [PR 2](https://git.erikinkinen.fi/erix/lib-service/pulls/2) | | lib-stdio | [PR 2](https://git.erikinkinen.fi/erix/lib-stdio/pulls/2) | | lib-time | [PR 2](https://git.erikinkinen.fi/erix/lib-time/pulls/2) | | lib-tty | [PR 2](https://git.erikinkinen.fi/erix/lib-tty/pulls/2) | | lib-vfs | [PR 2](https://git.erikinkinen.fi/erix/lib-vfs/pulls/2) | | loaderd | [PR 2](https://git.erikinkinen.fi/erix/loaderd/pulls/2) | | logd | [PR 4](https://git.erikinkinen.fi/erix/logd/pulls/4) | | memd | [PR 2](https://git.erikinkinen.fi/erix/memd/pulls/2) | | named | [PR 2](https://git.erikinkinen.fi/erix/named/pulls/2) | | pagerd | [PR 2](https://git.erikinkinen.fi/erix/pagerd/pulls/2) | | posixd | [PR 5](https://git.erikinkinen.fi/erix/posixd/pulls/5), [thread-storage.md](https://git.erikinkinen.fi/erix/posixd/src/branch/feature/posix-compat/docs/thread-storage.md) | | powerboxd | [PR 2](https://git.erikinkinen.fi/erix/powerboxd/pulls/2) | | probed | [PR 2](https://git.erikinkinen.fi/erix/probed/pulls/2) | | procd | [PR 2](https://git.erikinkinen.fi/erix/procd/pulls/2) | | ramfsd | [PR 2](https://git.erikinkinen.fi/erix/ramfsd/pulls/2) | | rootd | [PR 2](https://git.erikinkinen.fi/erix/rootd/pulls/2) | | seriald | [PR 2](https://git.erikinkinen.fi/erix/seriald/pulls/2) | | timed | [PR 2](https://git.erikinkinen.fi/erix/timed/pulls/2) | | ttyd | [PR 3](https://git.erikinkinen.fi/erix/ttyd/pulls/3) | | vfsd | [PR 3](https://git.erikinkinen.fi/erix/vfsd/pulls/3) | | vspaced | [PR 2](https://git.erikinkinen.fi/erix/vspaced/pulls/2) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:47 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/lib-ipc#6
No description provided.