Verify installed runtime-image source mappings on native hardware #147

Open
opened 2026-11-13 17:58:39 +01:00 by erikinkinen · 0 comments
Owner

Problem and motivation

A source-backed supervisor constructor needs native evidence that the installed hardware root contains only its actual retained image, controller and table sources. Topology IDs and successful compilation do not establish alias confinement or processor permission enforcement.

Proposed behavior and scope

Add a read-only audit of the actual installed Kernel root while its original CPU, root pin, table storage, runtime/controller loans and bootstrap stack remain retained. Enumerate all owned installed entries and compare exact effective leaves, permissions and cache selectors against the allowed source plan. Account explicitly for the owned recursive table view, require it to be non-executable, and reject extra low aliases and mappings of allocation holes.

Add separate native image cases for successful source audit, a read through the withdrawn original loader-stack alias, a write to a genuine read-only runtime page, and execution through the recursive table alias. Preserve the existing architectural page-fault handler and its original hardware frame. Expected-fatal cases must verify actual fault address, instruction, supervisor mode and error bits; a missing marker or unexpected return cannot pass.

Authority, security and reliability

Actual retained root/table/stack and original allocation objects supply custody. Page-table words, addresses and diagnostic reports are observations only. The audit does not create mappings, import a memory owner or install an exception handler. It keeps local execution and table-borrow guards through readback and intentional probes. Failure retains backing and stops the diagnostic image.

Acceptance criteria

  • Implement complete installed-root/source readback and non-executable owned recursion with negative source controls.
  • Implement independent expected-fatal hardware cases using original source loans and unchanged architectural fault reporting.
  • Pass strict component/native compilation, existing regression suites and current-head CI; update component and manual contracts.
  • Run the genuine matching dynamic producer/consumer images on one, two and four configured CPUs, including successful audit and exact fatal oracles.
  • Keep AP execution, process-root confinement and multicore withdrawal acceptance separate; topology data cannot complete those requirements.

Alternatives and tradeoffs

A copied-table fixture or topology count cannot establish actual hardware mapping policy. Replacing the exception handler with a diagnostic success path would hide the original fault behavior. Read-only source-bound enumeration plus independent terminal cases tests the actual installed hierarchy without granting broader authority.

Tracking and rollout

Build on original runtime-image sources #146 and design #143. Coordinate Bootloader #34, LibHandoff #13, the source-lifetime manual and native activation #123.

## Problem and motivation A source-backed supervisor constructor needs native evidence that the installed hardware root contains only its actual retained image, controller and table sources. Topology IDs and successful compilation do not establish alias confinement or processor permission enforcement. ## Proposed behavior and scope Add a read-only audit of the actual installed Kernel root while its original CPU, root pin, table storage, runtime/controller loans and bootstrap stack remain retained. Enumerate all owned installed entries and compare exact effective leaves, permissions and cache selectors against the allowed source plan. Account explicitly for the owned recursive table view, require it to be non-executable, and reject extra low aliases and mappings of allocation holes. Add separate native image cases for successful source audit, a read through the withdrawn original loader-stack alias, a write to a genuine read-only runtime page, and execution through the recursive table alias. Preserve the existing architectural page-fault handler and its original hardware frame. Expected-fatal cases must verify actual fault address, instruction, supervisor mode and error bits; a missing marker or unexpected return cannot pass. ## Authority, security and reliability Actual retained root/table/stack and original allocation objects supply custody. Page-table words, addresses and diagnostic reports are observations only. The audit does not create mappings, import a memory owner or install an exception handler. It keeps local execution and table-borrow guards through readback and intentional probes. Failure retains backing and stops the diagnostic image. ## Acceptance criteria - [ ] Implement complete installed-root/source readback and non-executable owned recursion with negative source controls. - [ ] Implement independent expected-fatal hardware cases using original source loans and unchanged architectural fault reporting. - [ ] Pass strict component/native compilation, existing regression suites and current-head CI; update component and manual contracts. - [ ] Run the genuine matching dynamic producer/consumer images on one, two and four configured CPUs, including successful audit and exact fatal oracles. - [ ] Keep AP execution, process-root confinement and multicore withdrawal acceptance separate; topology data cannot complete those requirements. ## Alternatives and tradeoffs A copied-table fixture or topology count cannot establish actual hardware mapping policy. Replacing the exception handler with a diagnostic success path would hide the original fault behavior. Read-only source-bound enumeration plus independent terminal cases tests the actual installed hierarchy without granting broader authority. ## Tracking and rollout Build on [original runtime-image sources #146](https://git.erikinkinen.fi/erix/kernel/pulls/146) and [design #143](https://git.erikinkinen.fi/erix/kernel/issues/143). Coordinate [Bootloader #34](https://git.erikinkinen.fi/erix/bootloader/pulls/34), [LibHandoff #13](https://git.erikinkinen.fi/erix/lib-handoff/pulls/13), [the source-lifetime manual](https://git.erikinkinen.fi/erix/docs/pulls/102) and [native activation #123](https://git.erikinkinen.fi/erix/kernel/pulls/123).
erikinkinen added this to the Alpha 1 milestone 2026-11-13 17:58:39 +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#147
No description provided.