generated from erix/meta
[FEATURE] Define and enforce a versioned compatibility artifact contract #15
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-dynlink#15
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
Imported userspace runtimes need an artifact contract distinct from the native abort-only policy. Native rejection of TLS, initializers and unwind metadata must remain explicit.
Proposed behavior and scope
Define a versioned, allocation-free compatibility record binding the complete original ELF length, SHA256, executable/shared-object role and x86-64 SysV target to declared runtime requirements. Use exact framing, reject unknown versions/fields and require canonical encoding.
Loaderd will bind the record to its original authenticated object bytes and validate the actual executable ELF. Its existing initial-TLS producer is the only supported additional mechanism. Ordered initialization/finalization, dynamic-module TLS, symbol versions and unwind requirements refuse until their runtime mechanisms exist.
Authority, security and reliability
Requirements describe the object; they grant no file, library, mapping or execution authority. Original graph/file provenance, closure validation, W^X, relocation checks and native artifact guards remain mandatory. No initializer is called by intake, and malformed input performs no native operation.
Acceptance criteria
Alternatives and tradeoffs
A flag that relaxes the native artifact policy would blur the two contracts. A separate required-feature record keeps later runtime additions explicit without claiming their execution today.
Tracking and rollout
Extend LibDynlink's existing TLS foundations in #4, then wire the contract into Loaderd's authenticated initial-TLS intake. Constructors, dynamic-module lifetime and unwind execution remain separate runtime work.
The contract and its authenticated Loaderd intake are implemented in LibDynlink #16 and Loaderd #32. Docs #85 specifies the record and updates the library API reference. Native artifact rejection remains separate; unsupported initialization, unwind, symbol-version and dynamic-module requirements refuse before materialization.