[FEATURE] Bind syscall return contracts to selected Kernel builds #56

Closed
opened 2026-10-18 12:54:10 +02:00 by erikinkinen · 3 comments
Owner

Problem and motivation

Exsh's native frame checker cannot carry register facts across a syscall without an explicit Kernel return contract. Matching symbols or a copied build receipt do not establish which producer supplied that contract.

Proposed behavior and scope

Declare Kernel's conditional syscall-return ABI and bind it to the selected original source, runtime feature closure, tools and freshly emitted ELF. Use the existing owned Cargo build path and pass the completed contract directly into Exsh's runtime/release frame analysis. Reuse its already built Exsh workload; prepare one bounded runtime Kernel producer before the unchanged 60-second analysis. Keep Kernel's separate minimal build and the other existing frame analyses. Coordinate Kernel, Integration and Exsh.

Authority, security and reliability

The ABI declaration is an explicit trusted semantic contract. Build correspondence does not prove compiler semantics or deployment of another image. Serialized diagnostics grant no authority. Unknown syscalls keep opaque memory effects; missing or mismatched producer inputs supply no preservation facts. Preserve existing call-target, source-membership and frame limits.

Acceptance criteria

  • Document the return conditions, output registers and conservative preserved set in Kernel's source contract and technical manual.
  • Produce and consume a real selected Kernel build through the owned gateway, without accepting a deserialized result as ownership.
  • Cover missing, wrong and stale producers, changed source/features/tools, malformed declarations and unknown syscall effects.
  • Exercise the producer and consumer in their actual CI path; keep unrelated incomplete proofs explicit.

Alternatives and tradeoffs

Discarding every register fact remains conservative but loses useful call targets. A name-based whitelist or an unbound register mask would hide the missing producer contract. The bounded build path adds correspondence checks while keeping its trust assumptions explicit.

Tracking and rollout

This supplies part of Exsh #4. Land the declaration, producer and consumer coherently, then select their exact revisions in Integration. Track phase completion in Integration #65.

## Problem and motivation Exsh's native frame checker cannot carry register facts across a syscall without an explicit Kernel return contract. Matching symbols or a copied build receipt do not establish which producer supplied that contract. ## Proposed behavior and scope Declare Kernel's conditional syscall-return ABI and bind it to the selected original source, runtime feature closure, tools and freshly emitted ELF. Use the existing owned Cargo build path and pass the completed contract directly into Exsh's runtime/release frame analysis. Reuse its already built Exsh workload; prepare one bounded runtime Kernel producer before the unchanged 60-second analysis. Keep Kernel's separate minimal build and the other existing frame analyses. Coordinate Kernel, Integration and Exsh. ## Authority, security and reliability The ABI declaration is an explicit trusted semantic contract. Build correspondence does not prove compiler semantics or deployment of another image. Serialized diagnostics grant no authority. Unknown syscalls keep opaque memory effects; missing or mismatched producer inputs supply no preservation facts. Preserve existing call-target, source-membership and frame limits. ## Acceptance criteria - [x] Document the return conditions, output registers and conservative preserved set in Kernel's source contract and technical manual. - [x] Produce and consume a real selected Kernel build through the owned gateway, without accepting a deserialized result as ownership. - [x] Cover missing, wrong and stale producers, changed source/features/tools, malformed declarations and unknown syscall effects. - [x] Exercise the producer and consumer in their actual CI path; keep unrelated incomplete proofs explicit. ## Alternatives and tradeoffs Discarding every register fact remains conservative but loses useful call targets. A name-based whitelist or an unbound register mask would hide the missing producer contract. The bounded build path adds correspondence checks while keeping its trust assumptions explicit. ## Tracking and rollout This supplies part of [Exsh #4](https://git.erikinkinen.fi/erix/exsh/issues/4). Land the declaration, producer and consumer coherently, then select their exact revisions in Integration. Track phase completion in [Integration #65](https://git.erikinkinen.fi/erix/integration/issues/65).
Author
Owner

The declaration is published in 32ee24c8. Integration 79ee9fbb supplies the owned producer, and Exsh fb01ad98 selects it for the existing runtime/release analysis. The actual local runtime build succeeds; the subsequent complete frame check still reaches its original 60-second deadline. This establishes build correspondence, not completed frame or guest acceptance.

The declaration is published in [32ee24c8](https://git.erikinkinen.fi/erix/kernel/commit/32ee24c8233cbfd183e6275a161de40048916e72). [Integration 79ee9fbb](https://git.erikinkinen.fi/erix/integration/commit/79ee9fbbe6c9c24039160784efd02ef5323d4a98) supplies the owned producer, and [Exsh fb01ad98](https://git.erikinkinen.fi/erix/exsh/commit/fb01ad98b5133da904290440613ee5532d5fd435) selects it for the existing runtime/release analysis. The actual local runtime build succeeds; the subsequent complete frame check still reaches its original 60-second deadline. This establishes build correspondence, not completed frame or guest acceptance.
Author
Owner

Exsh 3964e913 now carries complete scalar arguments through local and native calls, retaining each original object and instruction site. The local runtime diagnostic builds the selected Kernel and records actual analyzer query transfers through the live contract; missing or mismatched producers and unknown operations retain their refusals. The producer/consumer and negative-control criteria are checked. Public manual integration and the actual CI route remain open. The complete frame check still reaches its original 60-second deadline; repeated analyzer transfers are neither unique call sites nor guest execution.

[Exsh 3964e913](https://git.erikinkinen.fi/erix/exsh/commit/3964e913354136f265b73e84455ae451d8b03f2a) now carries complete scalar arguments through local and native calls, retaining each original object and instruction site. The local runtime diagnostic builds the selected Kernel and records actual analyzer query transfers through the live contract; missing or mismatched producers and unknown operations retain their refusals. The producer/consumer and negative-control criteria are checked. Public manual integration and the actual CI route remain open. The complete frame check still reaches its original 60-second deadline; repeated analyzer transfers are neither unique call sites nor guest execution.
Author
Owner

Closed on all four original contract criteria. 275fcbed supplies the technical manual. Exsh CI 600 builds the selected runtime Kernel and records actual query and unknown-operation analyzer transfers through the live consumer. That completes the CI-path criterion; its full frame analysis still reaches the original deadline and remains tracked in Exsh #4. The partial profile does not establish unique call sites or guest execution.

Closed on all four original contract criteria. [275fcbed](https://git.erikinkinen.fi/erix/docs/commit/275fcbedc25d11e33f55d6058beba1ec261d6238) supplies the technical manual. [Exsh CI 600](https://git.erikinkinen.fi/erix/exsh/actions/runs/600) builds the selected runtime Kernel and records actual query and unknown-operation analyzer transfers through the live consumer. That completes the CI-path criterion; its full frame analysis still reaches the original deadline and remains tracked in [Exsh #4](https://git.erikinkinen.fi/erix/exsh/issues/4). The partial profile does not establish unique call sites or guest execution.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:30 +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/kernel#56
No description provided.