generated from erix/meta
[FEATURE] Describe original loaded runtime image allocations #12
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/lib-handoff#12
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 loaded Kernel and its dependencies occupy separate firmware allocations. Original ELF catalog bytes and generic boot-memory exclusions cannot identify or authorize their relocated runtime pages. A native root must retain actual allocation custody and map only the intended segments.
Proposed behavior and scope
Add exactly known BootKernel 2.3 with critical flag
0x4, preserving all known 2.1/2.2 schemas. The 48-byte descriptor at offsets 240–287 counts 80-byte image records and 48-byte segment records. Startup and topology keep their existing positions; unused preceding slots are zero. Unknown revisions, flags, strides and nonzero reserved fields fail.Each image identifies one exact original physical allocation, load bias, verified original ELF hash, segment partition and Kernel/dependency role. Each segment identifies its image, exact physical/virtual byte range, initialized and memory lengths, maximum read/write/execute permissions and normalized PTE cache selector. The selector describes paging policy; it does not assert a write-back effective memory type from selector zero. PAT/MTRR admission remains a native consumer responsibility.
Expose borrowed, checked records and a fallible encoder that validates the entire prospective structure before mutation. Retain whole allocations including holes; only exact segment pages may be mapped. Check complete arithmetic, allocation/segment relationships, conflicting backing/cache, effective writable-executable shared pages, reservation coverage and metadata overlap. No fixed image or segment ceiling is introduced.
Authority, security and reliability
Parsed metadata, hashes, exclusions and observed page-table leaves grant nothing. Only the original unsafe boot handover transfers real producer allocation custody into a unique runtime group, replacing rather than duplicating legacy Kernel-only ownership. Maximum permissions require enforcement in actual primary mappings; they do not prove global boot aliases are already confined.
The Bootloader must retain a real scoped allocation ledger, release partial loads before firmware exit, and transfer the complete owners only after successful exit. Every consuming root must retain the group through switch, invalidation and withdrawal. The Kernel BSS heap and its typed suballocations stay within their real image owner; startup stacks/tables, devices, framebuffer and physical windows retain separate authority boundaries.
Acceptance criteria
Alternatives and tradeoffs
A widened Kernel module would grant holes and misidentify independent allocations. A catalog-only or leaf-derived owner would fabricate custody. Counted allocation and segment tables retain the actual allocation unit while preserving precise mapping policy. Structural checks cannot replace original-entry ownership or native execution evidence.
Tracking and rollout
Build on the counted topology contract. See the implemented contract and technical manual. Coordinate the Bootloader allocation-ledger producer and Kernel original-entry intake with native private-root activation. Actual native image acceptance stays with those implementations; this component establishes the wire contract only.