[FEATURE] Own target memory while building a process #121

Open
opened 2026-11-07 06:10:54 +01:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Process loaders need to create an address space, populate its memory and hand it over for execution. That construction lifetime should remain explicit across calls between the process and memory services.

Proposed behavior and scope

Introduce a native build resource created together with the target address space. It retains the target and its backing until construction finishes or aborts. Authorized build operations populate that target; execution and conflicting mapping operations remain excluded during construction.

Coordinate Kernel, LibCapabi, LibIPC and its syscall shim, Vspaced, Memd, Rootd and Procd. Process construction is the initial scope. Device/DMA ownership and live address-space editing require separate contracts.

Authority, security and reliability

Use the actual native capability and resource throughout creation, delegation, use and retirement. Keep data-frame allocator authority explicit. Identifiers and request fields describe a target; they do not grant build authority.

Specify rights attenuation, capability transfer, revocation and cleanup when a participant exits. Partial creation, allocation failure or uncertain completion must retain the existing duties and prevent premature execution. Preserve unrelated processes and their mappings.

Acceptance criteria

  • Review the creation, backing, delegation, finish, abort and teardown contracts before changing the ABI.
  • Implement coordinated native, SDK and service paths, including migration of superseded construction paths.
  • Demonstrate normal process loading and start on the release image.
  • Reject unauthorized, stale, foreign and conflicting operations without changing unrelated state.
  • Exercise partial allocation, capability exhaustion, participant exit and revocation without leaking backing or authority.
  • Exercise start/mapping races and cleanup on 1, 2 and 4 vCPUs.
  • Update the architecture and technical manual; publish source-linked expected results.
  • Measure creation time, allocation count and retained backing under a fixed workload, and explain regressions.

Alternatives and tradeoffs

Compare a dedicated build capability with extending the existing creation API. Settle transfer/copy rules and the finish-to-start transition. Favor a design that keeps policy in userspace and makes native resource lifetimes explicit.

Tracking and rollout

Part of Phase 6. Land the agreed native contract, coordinated SDK/service consumers and integration coverage as a coherent sequence. Link dependent PRs here as they become available.

## Problem and motivation Process loaders need to create an address space, populate its memory and hand it over for execution. That construction lifetime should remain explicit across calls between the process and memory services. ## Proposed behavior and scope Introduce a native build resource created together with the target address space. It retains the target and its backing until construction finishes or aborts. Authorized build operations populate that target; execution and conflicting mapping operations remain excluded during construction. Coordinate Kernel, LibCapabi, LibIPC and its syscall shim, Vspaced, Memd, Rootd and Procd. Process construction is the initial scope. Device/DMA ownership and live address-space editing require separate contracts. ## Authority, security and reliability Use the actual native capability and resource throughout creation, delegation, use and retirement. Keep data-frame allocator authority explicit. Identifiers and request fields describe a target; they do not grant build authority. Specify rights attenuation, capability transfer, revocation and cleanup when a participant exits. Partial creation, allocation failure or uncertain completion must retain the existing duties and prevent premature execution. Preserve unrelated processes and their mappings. ## Acceptance criteria - [ ] Review the creation, backing, delegation, finish, abort and teardown contracts before changing the ABI. - [ ] Implement coordinated native, SDK and service paths, including migration of superseded construction paths. - [ ] Demonstrate normal process loading and start on the release image. - [ ] Reject unauthorized, stale, foreign and conflicting operations without changing unrelated state. - [ ] Exercise partial allocation, capability exhaustion, participant exit and revocation without leaking backing or authority. - [ ] Exercise start/mapping races and cleanup on 1, 2 and 4 vCPUs. - [ ] Update the architecture and technical manual; publish source-linked expected results. - [ ] Measure creation time, allocation count and retained backing under a fixed workload, and explain regressions. ## Alternatives and tradeoffs Compare a dedicated build capability with extending the existing creation API. Settle transfer/copy rules and the finish-to-start transition. Favor a design that keeps policy in userspace and makes native resource lifetimes explicit. ## Tracking and rollout Part of [Phase 6](https://git.erikinkinen.fi/erix/integration/issues/65). Land the agreed native contract, coordinated SDK/service consumers and integration coverage as a coherent sequence. Link dependent PRs here as they become available.
erikinkinen added this to the Alpha 1 milestone 2026-11-07 06:10:54 +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#121
No description provided.