generated from erix/meta
[FEATURE] Counted object names in the boot handoff #5
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#5
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 current boot catalog stores object names in 64-byte arrays. The release image has 49 DSO names of 85–109 bytes, so EFI reaches Kernel entry readiness but rejects the catalog before entering the Kernel.
Proposed behavior and scope
Introduce a Bootloader-to-Kernel handoff V2. Each object carries a checked offset and length into the retained, authenticated dynamic-link store. Dependency edges identify their target by object index; they do not duplicate names. Preserve full identities without truncation or a replacement string-size ceiling.
Migrate LibHandoff, Bootloader, Kernel and Rootd together. Keep the separate Kernel-to-Rootd handoff protocol unchanged.
Mapping requests also have a 64-byte name-pointer limit. Replace that pointer selector with a catalog-index mode on the existing kernel-control operation: flag bit 1 selects an index in
arg1,arg2must be zero, and bit 0 continues to select whole-graph mapping. Reject the retired pointer modes. Rootd obtains the ordinal from its original authenticated store enumeration; Kernel resolves it only against its validated, retained catalog. This removes the name ceiling without accepting arbitrary long caller pointers or introducing another operation permission.Procd also has three catalog mapping callers and a fixed-name staged-map request. Migrate staged mapping to a V2 request carrying the explicit catalog index already retained by Rootd. Preserve staged-process generation and caller authority checks.
Driver launch retains its existing executable-name policy. Resolve that name through a read-only catalog lookup on the same kernel-control operation: query flag 4, zero reserved arguments, and a counted UTF-8 name carried in the validated IPC payload after the fixed request prefix. The query returns the matching retained catalog index without mapping an object or reading a separate caller pointer. Procd then maps the returned index with the existing checked index mode. This preserves exact name policy without giving Procd a boot-store mapping, inferring ordinals from driver roles or introducing a registration service.
Authority, security and reliability
An offset grants no access by itself. Consumers resolve names only against their actual retained store, check range arithmetic, UTF-8, nonempty names and embedded NULs before publishing mappings, and preserve exact identity and dependency checks. Store custody and lifetime remain explicit. Reject incompatible versions and malformed ranges without partial publication. Do not allocate a second name pool or recover ownership from serialized fields.
Acceptance criteria
Alternatives and tradeoffs
Larger fixed arrays retain an arbitrary limit. Truncation loses identity. Renaming packages to fit the wire format imposes a packaging constraint without fixing the interface. Counted spans reuse the already retained authenticated bytes and avoid extra copies; they require coordinated version migration and careful bounds checks.
Tracking and rollout
Build on the runtime-symbol fix and dependency-order repair. Publish coordinated component branches and select their exact revisions together before producing the next image. Remove superseded Bootloader-to-Kernel APIs during migration.
The retained-source cohort uses LibHandoff #9, LibIPC #194, Bootloader #29 and Kernel #139. Kernel #139 replaces the closed descriptor-address consumer in Kernel #127; image and guest acceptance remain required.