[FEATURE] Attest separate process and thread origins in native delivery #5

Closed
opened 2026-10-04 14:40:54 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Native delivery currently exports only an original process pair. Genuine shared-process member admission requires a distinct actual submitting execution key, retained at submission and delivered alongside that process key. Existing status bytes must remain intact. Process-only realm/stage metadata must not fabricate a submitting thread.

Proposed behavior and scope

Complete the versioned OIR2 receive migration defined by authenticated process/thread ownership. The receive header is 72 bytes: magic OIR2 at 0–3, major version 2 at 4–5, extent 72 at 6–7, unchanged counts at 8–47, original process id/generation at 48–55, unchanged packed transition status at 56–63, actual thread id/generation at 64–71. Fresh input zeroes all output at 32–71. CLAIM returns both complete nonzero pairs; COLLECT returns neither. Reject old OIR1 framing and every mixed/partial origin before any native transfer effect.

Separate descriptive ProcessOrigin (process_id, staged_generation), ThreadOrigin (thread_id, thread_generation), and complete CallerOrigin (process, thread). Existing realm/startup/seal/credential metadata remains process-scoped and keeps its current encoded widths; it does not synthesize thread attestation. Native delivery and receive-result types carry complete CallerOrigin. Remove the superseded two-field CallerOrigin API by migrating all actual Rust consumers to the appropriate type rather than keeping a deprecated alias.

Kernel's Actor already captures actual execution id/generation and original process identity at submission. Export those stored keys without late lookup, request-derived labels or new capability grants. Update every current native codec, adapter, modeled boundary, target geometry, workload and documentation source. Process-scoped provider authorization deliberately selects the process component; original native invocation custody continues to name the actual execution. Posixd keeps full CLAIM origin through intake and refuses any execution not yet enrolled in its original client policy before request effects. Current authenticated initial execution is known from original native construction; later members require the still-open factory/enrollment implementation.

Authority, security and reliability

Copied identities and parsed bytes provide no authority. Only the actual successful native CLAIM disposition attests the original stored origin; COLLECT does not attest a server. Shared process policy remains one security domain, while original invocation ownership remains execution-scoped. Keep receiver/call leases, storage reservation before CLAIM, status interpretation, grant transfer, cancellation and terminal disposal boundaries intact. No new root, Process, MAP, receiver or per-call membership grant is introduced.

Complete immutable producer/consumer adoption before any additional member can execute. Preserve independent compiled helper ordering and Rootd adoption if actual helper dependencies change. Failed framing or partial origins cannot publish output or commit transfers. Native member factories, thread lifecycle, masks/TLS and real imported consumers remain separately required, not accepted by exporting their origin fields.

Acceptance criteria

Checklist
  • Implement strict 72-byte OIR2 framing with status preserved and both complete keys or neither.
  • Separate process metadata, thread metadata and full native submission origin without deprecated aliases or fabricated thread attestation.
  • Export actual captured native process and execution keys at CLAIM, with grant-free descriptive output and no late replacement lookup.
  • Migrate all current native adapters, process-scoped role checks, counted geometry and Posixd execution admission before effects.
  • Author independent valid distinct-key, malformed/old/partial framing, unchanged refusal, native attribution and unknown-member admission controls.
  • Extend maintained native invocation/workload source to observe actual thread keys without claiming shared-member implementation or an execution pass.
  • Maintain inline/component/manual contracts, code-size limits and missing-docs gates throughout the full migration.
  • Publish coherent signed immutable producer/consumer/helper/catalog revisions and reconcile owning reviews and phase tracking.

Alternatives and tradeoffs

Keep realm and staged process descriptors process-only: deriving an apparent thread from such metadata would invent attestation. Typed component origins make deliberate process-scoped authorization distinct from full native submitting identity. A versioned header rejects incompatible peers rather than reinterpreting OIR1's status words. Existing native constructors still admit only the initial execution; exporting its genuine keys is a necessary ABI migration, not an alternative to native shared-process threads.

Tracking and rollout

Native implementation, socket/thread consumers, phase completion. Roll out shared types and codecs, native producer and all current source consumers, meaningful authored controls/workloads and documentation, then publish the dependency graph and independently compiled helper before final catalogs. Testing, builds and CI observation remain deferred; source completion does not claim compiler/runtime, measured performance or full guest-build evidence.

Authenticated process and execution origins — 4 October 2026

CLAIM requires both complete keys; COLLECT requires neither. Old/partial/mixed origins refuse before native transfer/output effects.

Copied metadata and parsed bytes grant no authority, liveness or native attestation.

Posixd preserves full successful CLAIM origin in its original counted call record before interpretation and refuses unknown execution IDs or stale thread generations before request effects. Additional native members still require the open factory/enrollment implementation. Independent modeled controls preserve the denied original owner, empty refusal, unrelated pending peer and lease generation; only an enrolled writer can unblock that peer.

Genuine shared-process membership/factories, departed-leader survival, thread-only exit, join/detach, per-thread masks/TLS and full libc/imported-tool consumers remain required and open. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.

All eight declared source migration criteria are complete. Close as implemented under the testing waiver; genuine native members and required execution evidence remain open in the linked implementation/phase issues.

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 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 5, PR 2, owned-invocation-abi.md
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
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
## Problem and motivation Native delivery currently exports only an original process pair. Genuine shared-process member admission requires a distinct actual submitting execution key, retained at submission and delivered alongside that process key. Existing status bytes must remain intact. Process-only realm/stage metadata must not fabricate a submitting thread. ## Proposed behavior and scope Complete the versioned OIR2 receive migration defined by [authenticated process/thread ownership](https://git.erikinkinen.fi/erix/kernel/issues/44). The receive header is 72 bytes: magic OIR2 at 0–3, major version 2 at 4–5, extent 72 at 6–7, unchanged counts at 8–47, original process id/generation at 48–55, unchanged packed transition status at 56–63, actual thread id/generation at 64–71. Fresh input zeroes all output at 32–71. CLAIM returns both complete nonzero pairs; COLLECT returns neither. Reject old OIR1 framing and every mixed/partial origin before any native transfer effect. Separate descriptive ProcessOrigin (process_id, staged_generation), ThreadOrigin (thread_id, thread_generation), and complete CallerOrigin (process, thread). Existing realm/startup/seal/credential metadata remains process-scoped and keeps its current encoded widths; it does not synthesize thread attestation. Native delivery and receive-result types carry complete CallerOrigin. Remove the superseded two-field CallerOrigin API by migrating all actual Rust consumers to the appropriate type rather than keeping a deprecated alias. Kernel's Actor already captures actual execution id/generation and original process identity at submission. Export those stored keys without late lookup, request-derived labels or new capability grants. Update every current native codec, adapter, modeled boundary, target geometry, workload and documentation source. Process-scoped provider authorization deliberately selects the process component; original native invocation custody continues to name the actual execution. Posixd keeps full CLAIM origin through intake and refuses any execution not yet enrolled in its original client policy before request effects. Current authenticated initial execution is known from original native construction; later members require the still-open factory/enrollment implementation. ## Authority, security and reliability Copied identities and parsed bytes provide no authority. Only the actual successful native CLAIM disposition attests the original stored origin; COLLECT does not attest a server. Shared process policy remains one security domain, while original invocation ownership remains execution-scoped. Keep receiver/call leases, storage reservation before CLAIM, status interpretation, grant transfer, cancellation and terminal disposal boundaries intact. No new root, Process, MAP, receiver or per-call membership grant is introduced. Complete immutable producer/consumer adoption before any additional member can execute. Preserve independent compiled helper ordering and Rootd adoption if actual helper dependencies change. Failed framing or partial origins cannot publish output or commit transfers. Native member factories, thread lifecycle, masks/TLS and real imported consumers remain separately required, not accepted by exporting their origin fields. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Implement strict 72-byte OIR2 framing with status preserved and both complete keys or neither. - [x] Separate process metadata, thread metadata and full native submission origin without deprecated aliases or fabricated thread attestation. - [x] Export actual captured native process and execution keys at CLAIM, with grant-free descriptive output and no late replacement lookup. - [x] Migrate all current native adapters, process-scoped role checks, counted geometry and Posixd execution admission before effects. - [x] Author independent valid distinct-key, malformed/old/partial framing, unchanged refusal, native attribution and unknown-member admission controls. - [x] Extend maintained native invocation/workload source to observe actual thread keys without claiming shared-member implementation or an execution pass. - [x] Maintain inline/component/manual contracts, code-size limits and missing-docs gates throughout the full migration. - [x] Publish coherent signed immutable producer/consumer/helper/catalog revisions and reconcile owning reviews and phase tracking. </details> ## Alternatives and tradeoffs Keep realm and staged process descriptors process-only: deriving an apparent thread from such metadata would invent attestation. Typed component origins make deliberate process-scoped authorization distinct from full native submitting identity. A versioned header rejects incompatible peers rather than reinterpreting OIR1's status words. Existing native constructors still admit only the initial execution; exporting its genuine keys is a necessary ABI migration, not an alternative to native shared-process threads. ## Tracking and rollout [Native implementation](https://git.erikinkinen.fi/erix/kernel/issues/1), [socket/thread consumers](https://git.erikinkinen.fi/erix/posixd/issues/34), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). Roll out shared types and codecs, native producer and all current source consumers, meaningful authored controls/workloads and documentation, then publish the dependency graph and independently compiled helper before final catalogs. Testing, builds and CI observation remain deferred; source completion does not claim compiler/runtime, measured performance or full guest-build evidence. ### Authenticated process and execution origins — 4 October 2026 CLAIM requires both complete keys; COLLECT requires neither. Old/partial/mixed origins refuse before native transfer/output effects. Copied metadata and parsed bytes grant no authority, liveness or native attestation. Posixd preserves full successful CLAIM origin in its original counted call record before interpretation and refuses unknown execution IDs or stale thread generations before request effects. Additional native members still require the open factory/enrollment implementation. Independent modeled controls preserve the denied original owner, empty refusal, unrelated pending peer and lease generation; only an enrolled writer can unblock that peer. Genuine shared-process membership/factories, departed-leader survival, thread-only exit, join/detach, per-thread masks/TLS and full libc/imported-tool consumers remain required and open. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. All eight declared source migration criteria are complete. Close as implemented under the testing waiver; genuine native members and required execution evidence remain open in the linked implementation/phase issues. <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 | [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 5](https://git.erikinkinen.fi/erix/lib-ipc/issues/5), [PR 2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2), [owned-invocation-abi.md](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/owned-invocation-abi.md) | | 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) | | 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#5
No description provided.