generated from erix/meta
[FEATURE] Retain original loaded kernel and shared-library allocations #33
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/bootloader#33
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 loader allocates separate physical storage for the running kernel and each resolved shared library, but handoff module metadata describes only the kernel's own virtual range. The kernel cannot retain library execution pages by treating source-file metadata or generic reserved memory as an image owner.
Proposed behavior and scope
Keep an original allocation ledger for the kernel and its actual transitive libraries. Publish a versioned runtime-image group with exact whole-allocation extents, verified source identities and exact loaded PT_LOAD segments. Retain allocation padding and holes as occupied storage while mapping only the real segment page union. Coordinate the wire contract and kernel's original-entry intake; preserve the independent startup and topology records.
Authority, security and reliability
Each successful UEFI allocation immediately enters a scoped owner before a later operation can fail. Keep original allocation custody through relocation, final mapping verification and firmware exit. Unpublished failures release created allocations in reverse order; uncertain cleanup fails closed while retaining custody. Only successful firmware exit transfers the actual original image group.
Descriptors, hashes, generic BOOTLOADER reservations and observed page tables cannot create owners. Preserve exact segment R/W/X intent and verify the applied leaf/cache policy; reject unsupported NX policy or conflicting shared pages. Do not map a virtual hull across holes or claim that this component removes all low identity aliases.
Acceptance criteria
Alternatives and tradeoffs
Widening the kernel module would misrepresent its source and map unrelated virtual gaps. Copying all supervisor mappings or treating reserved memory as authority would retain firmware and unrelated backing. An explicit original allocation group requires coordinated producer, wire and consumer changes but preserves the actual ownership boundary.
Tracking and rollout
Build on #32 and coordinate kernel#143 and kernel#123. Uses the runtime-image design and wire codec. Coordinate the original-entry consumer before native image acceptance. Keep existing approved producer and codec heads unchanged.