[FEATURE] Retain original runtime images in exact supervisor roots #143
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/kernel#143
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
The Kernel-only boot module does not retain the independently relocated shared objects used by the running Kernel. Copying all supervisor leaves into ready roots also retains loader, firmware and free-memory aliases without a corresponding source owner.
Proposed behavior and scope
Consume the BootKernel 2.3 runtime-image contract through the genuine one-shot unsafe boot handover. Retain exact whole original Kernel/dependency allocations and replace legacy Kernel-only ownership. Build the supervisor template from the granted PT_LOAD page union and separately retained infrastructure roles, rather than inheriting arbitrary leaves or mapping allocation/virtual hulls.
Retain the actual runtime group across every Kernel/process root and CPU occupation. Preserve typed CPU, heap and table subowners. Decode maximum image permissions separately from effective shared-page policy: compatible RO/RW pages become RW, RO/RX become RX, and writable-executable unions fail. A shared writable page cannot retain a per-byte read-only claim.
Authority, security and reliability
A descriptor, hash, exclusion, address or observed leaf cannot mint an original memory owner. The original unsafe entry is closed and one-shot; failed intake cannot publish partial roles or release executing backing. Original ELF source files remain distinct from relocated runtime memory. Actual source identity and physical/cache policy checks precede template publication.
APIC, framebuffer and physical windows require separate genuine source roles. Inventory missing grants and fail closed instead of accepting copied supervisor mappings. Roots retain backing through switch/readback, invalidation and peer withdrawal; uncertain retirement retains custody.
Acceptance criteria
Alternatives and tradeoffs
Widening the Kernel module or retaining source catalog bytes cannot cover distinct relocated allocations. Treating current leaves as ownership preserves ambient aliases. A unique original runtime group plus an explicit allowlist keeps allocation lifetime and precise mapping policy separate.
Tracking and rollout
Implementation: original runtime-image sources, with processor memory policy and the coordinated manual.
Build on the native entry foundation. Coordinate LibHandoff design, the runtime-image codec, the Bootloader allocation-ledger producer, and native private-root activation. Native image acceptance remains open until observed with the actual graph.
Implemented in #146 with the source-lifetime manual in Docs #102. Exact runtime allocations now feed the supervisor allowlist; file retirement preserves only independently owned readers. Native release-image acceptance on one, two and four CPUs remains open, and debug framebuffer conversion stays closed until its real withdrawal/transfer is implemented.