[FEATURE] Complete ELF TLS layout, linking and native thread initialization #4

Open
opened 2026-10-11 21:51:39 +02:00 by erikinkinen · 0 comments
Owner

Do not disclose suspected vulnerabilities here; follow SECURITY.md instead.

Problem and motivation

Ordinary native threads and imported Rust/LLVM tools need correctly initialized per-thread TLS, errno and dynamic TLS resolution. The current artifact/runtime path rejects TLS, and native initial process setup installs a zero thread pointer. A pure parser or successful additional-member context alone does not satisfy the complete production boundary.

Proposed behavior and scope

Complete original ELF64 PT_TLS template validation, x86-64 VariantII layout and EriX runtime TCB/DTV construction, TLS symbol/relocation linking, actual initial/additional native context initialization and libc thread-local interfaces. Coordinate LibElf, LibDynlink, Loaderd, Dynlinkd, LibIPC, Kernel, Procd/Launchd/Rootd, LibCstd, Posixd, Integration and the manual. Support caller-counted module/template/image storage with full checked extents, alignment and original initialization prefix plus zero suffix, including all-zero templates and sparse original module identifiers. Preserve original file/template provenance and immutable per-process module registry through native member birth and retirement.

The complete production path must initialize initial and additional threads before execution, inherit actual creator signal masks and FP environment as required, expose correct per-thread errno/TLS resolver/runtime behavior, implement member exit/join/detach cleanup and support every manifested imported consumer. Existing bootstrap/trusted artifacts must not silently gain unsupported TLS behavior.

Authority, security and reliability

TLS metadata, addresses, module IDs and DTV values supply no native authority. Pure libraries borrow explicit original bytes and caller storage; no ambient lookup, mapping, allocation or service route exists. Actual loader/mediator/native producers independently retain original process/stage/factory/member authority, mappings, creator CLAIM, positive context/enrollment and once-only Start. Guard absence, permissions, exclusive per-thread stack/TLS and current machine/CPU policy remain native prerequisites. TCB/DTV/module extents preflight before any destination effect; errors retain original custody and cannot reconstruct a successor from copied receipts. Revocation/terminal cleanup settles actual private images/mappings and counts before native identity reuse.

Acceptance criteria

Checklist
  • Complete validated PT_TLS extraction and original template provenance, malformed/duplicate/truncated/overflow/alignment and zero-initialization contracts without private size/count ceilings.
  • Complete caller-counted VariantII layout and EriX TCB/DTV image construction with deterministic module identities, sparse identifiers, correct alignment residue and checked symbol offsets/addresses.
  • Complete TLS symbol kinds and dynamic/local/initial-exec/descriptor relocation forms required by actual imported artifacts, with exact writable non-executable target geometry and original graph/module correlation.
  • Wire actual Loaderd/Dynlinkd/artifact build and inspection policy, plus initial and additional native TLS initialization before genuine user execution; remove obsolete unsupported assumptions after complete migration.
  • Complete per-thread libc errno, TLS resolver and normal creation/lifecycle/join/detach and all required native/imported consumer adoption, including creator FP/mask inheritance and positive cleanup.
  • Author independent parser/layout/relocation/refusal/capacity and real native multi-thread TLS VM controls retaining every original integration oracle; deferred execution must be reported accurately.
  • Maintain useful inline rustdoc, missing_docs, code files below 1000 physical lines, component/manual contracts and coherent signed immutable source/helper/runtime graph and owning reviews.
  • Demonstrate both full EriX guest build generations and external Rust/LLVM rebuilding inside EriX with original source/toolchain/artifact provenance and complete performance evidence when execution resumes.

Alternatives and tradeoffs

Removing the TLS rejection before runtime/context support would admit broken executables. Treating TLS symbols as ordinary addresses or sharing one TLS block would violate the required per-thread semantics. Keep current runtime refusal until complete producers/consumers can initialize it, while implementing and reviewing pure validation/layout first. Dynamic loading beyond the initial graph must retain original module identities and custody instead of imposing a private module-count limit.

Tracking and rollout

Related work: native context/enrollment/Start, thread consumers, libc, dynamic linker, phase completion. Follow the complete producer/consumer transaction and original authority lifetimes; no narrow foundation closes the complete native requirement. Tests/builds/lint/rendering/VM/profiler execution and CI observation remain deferred. Full guest/self-toolchain rebuilding remains mandatory and unperformed.

Primary specification inputs: ELF program header/TLS template, x86-64 processor ABI. Independently author implementation from these contracts; do not copy third-party implementation.

Detailed scope and contracts

Original ELF TLS image and linking source — 11 October 2026

Static native TLS refusal remains intact.

Complete caller-image preflight precedes every byte effect; refusal and spare bytes remain unchanged. Scalar addresses, IDs and generations grant no native authority.

Ordinary graph planning refuses TLS, and the distinct patch type cannot enter existing eight-byte-only handoff consumers. Descriptor resolver addresses remain descriptive; actual register-preserving code and its native mapping must be authenticated separately. Missing weak TLS providers, static-linker annotations and complete actual imported-artifact coverage remain unfinished.

No allocation, ambient lookup, numeric address dereference, capability minting, FS setter or runtime policy widening is introduced. Twenty-one independent template/image/expression/graph controls cover malformed/overflow/alignment/refusal, independent images, provider identity, full descriptor targets and late-refusal/retry output custody.

Actual Loaderd/Dynlinkd/Procd/Kernel initial and additional TLS image production, LibCstd errno/TLS/descriptor accessors, ordinary creation/deployment, inherited FP state, member exit/join/detach, module mutation/unload/destructors and all required native/imported consumers remain unfinished. Existing executable/artifact TLS refusal stays until every thread is initialized. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.

Canonical completion is 21.88% weighted and 10.11% whole acceptance: 33/460 accepted parents, 505/978 completed sub-items under 168 decomposed parents. Two explicit template/image source sub-items are credited; complete TLS and native thread lifecycle requirements remain open.

Tracking: complete TLS, native thread acceptance, linker runtime, libc, thread consumers, phase completion.

Selected original symbol provider correction — 11 October 2026

An unused weak provider cannot cause an unrelated overflow refusal, and an unrelated TLS export cannot reject an ordinary local or selected strong definition. Both ordinary and TLS planning consume this shared selected-provider metadata; no ambient lookup, mapping, native capability or runtime TLS admission is introduced.

Existing TLS parser/image foundations and all original native VM oracles remain; complete native initial/additional TLS initialization, libc, ordinary creation/deployment/lifecycle and required imported consumers remain open.

The source defect is resolved on implementation and authored controls under the testing waiver; complete TLS and native thread acceptance remain open. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.

Tracking: resolved provider defect, complete TLS, native thread acceptance, phase completion.

Original initial-process TLS admission design — 11 October 2026

Implement a distinct initial-process path before allowing production TLS artifacts. Existing additional-member WRITE/context/creator CLAIM is not initial-process authority. A sealed common Created-stage admission must independently require the actual Running current caller's Process SEND route and actual GRANT-bearing install grant for the exact original Created initial process/generation. Member factory budget/absence policy remains separate. Scalar process/thread labels, copied receipts and current-execution context supply no construction authority.

Proposed immediate x86-64 operation 0x62 accepts an exact counted ITI1 version-1 request and a zero 64-byte ITR1 reply reservation. Its 128-byte header carries route/grant/process/generation, nonzero original intent, entry, initial SysV stack pointer, thread pointer, code/stack/TLS byte intervals and module/guard/TLS-byte counts. Module records are 24 bytes, guard records 16 bytes and TLS input is an inline opaque immutable prefix. Initial ordinary startup-image/endpoint arguments remain owned by existing startup admission, never overwritten by TLS input. The initial Start stack top must equal the captured SysV pointer plus eight. All products, sums, scalar geometry and actual complete caller READ/WRITE span preflight without private count/size ceilings. Copy input before target effects; revalidate the original caller/span before complete reply publication.

Kernel-owned noncopy initial TLS storage retains original initial execution/process/creator/intent and copied immutable memory recipe/input. Authenticate current original mapping occupations, required/forbidden permissions, code entry, stack red zone/return slot, guard absence and exclusive stack/TLS through the existing actual VSpace reference mechanism. Reserve/copy all intent, observation and directory storage before mapping-reference publication. A pending record retains exact native mapping/input/progress through machine allocation or byte-write refusal. Same pending retry still needs the original held stage authority and exact unchanged intent. A ready retry is descriptive reconciliation from the same actual creator/original occupation and cannot reset bytes/registers or mint replacement authority after grant disposal/Start.

Initial Start rejects pending TLS, changed entry/stack, invalidated original mappings/guards and current machine-policy refusal before runnable publication. Ready Start validates the original retained FS pointer/private machine owner; initial-frame construction validates original stack/mappings again before first return. Legacy non-TLS setup remains explicit FS0 until its producer is migrated. No unrestricted scalar FS setter is added. Shared startup arguments and complete GPR/FP/native hardware behavior retain their original owners.

Abort/whole-group stop and drain include initial TLS preflight before remote/shared effects. Positive original VSpace reference settlement precedes erasure of copied TLS intent and private machine state and native identity reuse. Dropped source views or revoked grants cannot forget pending native backing; stale labels cannot follow a replacement. Module/ELF/TCB/DTV policy remains in the loader/libc, not Kernel.

Wire actual Loaderd/Dynlinkd/Procd materialization to original template/layout custody and exact-width patches, map the complete initial stack/TLS/guard geometry, initialize while original stage grant is held, then dispose the grant positively and Start. Additional birth uses the same original process registry/image policy and its genuine member context. LibCstd per-thread errno/TLS/descriptor resolvers, normal thread creation/deployment, inherited FP/masks, exit/join/detach/module/unload/destructors and all required consumers remain in the full design. Author literal framing, actual grant/role/refusal/mapping/cleanup, initial/additional multi-thread TLS and complete older VM controls. Tests/builds/lint/VM/profiling/CI remain deferred; do not credit executed runtime or guest builds from source controls. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Preserve all original complete acceptance criteria; this design does not replace them with a smaller native or parser endpoint.

Original initial-process TLS native custody — 12 October 2026

Original initial-process TLS now has a distinct native operation 0x62 with ITI1/ITR1, independently requiring the actual Running caller's Process SEND endpoint and exact Created initial-process stage GRANT. Scalar labels, copied receipts and current execution alone cannot construct it. Caller-counted module/guard/template framing validates every field/extent/count/reserved byte without private count/size limits, preauthorizes before copied-input allocation and preserves refusal/spare bytes.

Machine or byte refusal retains pending original custody; changed input/creator/occupation/mapping cannot adopt it. Actual complete caller READ/WRITE span preflights before copy/effects, and the same original caller/span revalidates before complete reply publication.

Initial Start refuses pending state, changed entry/top, invalidated original mappings/guards or machine policy before runnable publication.

They cover complete framing/overflow/refusal/correlation, actual Process/grant/initial role, prefix/zero/stack/startup preservation, same-original ready replay, peer/changed-input refusal, guard and remap conditions, allocation cut points, unauthorized allocation refusal and positive abort/reuse. No hook supplies effects.

Actual Loaderd/Dynlinkd/Procd ELF image/patch producers, LibCstd errno/TLS/descriptor accessors, ordinary native creation/deployment, inherited FP state, exit/join/detach/module/unload/destructors and all required consumers remain unfinished. Existing executable/artifact TLS refusal stays until every initial and additional producer is migrated. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. No narrower native or parser endpoint replaces complete acceptance.

Full native/TLS/runtime/lifecycle/consumer acceptance remains open.

Tracking: complete TLS, full native thread acceptance, libc, thread consumers, phase completion.

Original production TLS materialization design — 12 October 2026

Carry original authenticated ELF PT_TLS templates through the complete existing Loaderd/Dynlinkd/Procd transaction. Loaderd retains exact original file borrows and manifest/content identity, supplies deterministic process-local module IDs and immutable template descriptors, and constructs the initial VariantII self/DTV/errno image in caller-counted workspace. Materialize a separate read-only original template/module registry for future additional thread birth; mutated initial TLS must never become another thread's initialization template. The optional extended TCB records the original registry pointer while preserving the established self/DTV/errno prefix. Dedicated stack/guard/TLS/registry segments use explicit deployment/caller geometry after checked original mapped extents, without overlapping ELF modules or imposing a library count/size ceiling.

Dynlinkd consumes original module/template geometry and the same declared TLS region/TCB policy, retains it in its actual deployment arena, resolves provider kinds/module offsets against original graph membership and emits complete exact-width 4/8/16-byte patches. Replace the obsolete eight-byte-only transport representation and migrate every producer/consumer coherently; keep full writable non-executable target checks, original identities, closure and eager semantics. Split the large transaction implementation before adding code. Missing weak/null-provider and actual imported relocation/symbol-scope coverage remain full requirements, not a permissive runtime fallback.

Extend Procd's immutable materialization begin with the exact prospective initial-TLS packet count, zero for explicit non-TLS. Its authenticated deployment geometry delegates separate caller-counted TLS packet bytes in the runtime arena; no fixed transport scratch limit becomes a TLS image policy. Preflight the complete count before CREATE. A private Loaderd-only binding supplies role geometry and module/guard/template counts, never a process/grant/route selector. Sequential exact original fragments fill the admitted Procd-owned input, retaining correlation, counts and cleanup state through partial failure. Procd inserts its independently held original Process route, exact stage grant and actual creation identity. Native client transport validates the complete canonical packet, status/extent and original input/reply correlation, preserving uncertainty and spare caller bytes without allocation or a private size cap.

All load segments, original patches, stack/guard/TLS/registry and TLS input must complete before native or staged Commit. Call actual initial0x62 while the same stage grant remains held, retain original native outcome/progress on malformed or unknown replies, and dispose the grant positively only after readiness. Staged/realm handoff must preserve the same initialized original process and lifetime; no copied metadata supplies Start. Positive original native abort/retirement precedes packet erasure/reuse. No ambient source search, extra process-wide route, raw FS setter, imported process identity or forged member CLAIM is introduced.

Add native current-thread libc errno, dynamic TLS lookup and eager register-preserving descriptor entry points tied to the established initialized image. Complete ordinary additional thread creation/deployment, actual creator FP/mask inheritance, exit/join/detach/module/unload/destructors and required native/imported consumers remain mandatory. Do not remove artifact/runtime rejection until the supported producer/consumer contract actually admits each required form. Author independent streaming/count/refusal/input/output/mapping/native-call/cleanup controls and real initial/additional ELF TLS VM sources retaining every older oracle. Preserve rustdoc/missing_docs, files below1000lines, signed immutable source/helper/catalog graphs and owning review/master evidence.

Testing/build/lint/rendering/VM/profiling and CI observation remain deferred, with controls authored and results reported accurately. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Preserve all complete existing acceptance criteria and do not replace them with a parser, bridge, arena or native primitive endpoint.

Initial TLS materialization storage and native readiness — 12 October 2026

Old 64/88-byte bodies reject. Procd inserts independently retained actual Process SEND route, exact stage grant, native created identity and original intent; the payload cannot select them. Identical repeats retain progress; changed descriptions refuse. Stale, empty, reordered, overflowing and overlong input refuses before mutation; fragments cannot overwrite the private native header or reply reservation.

Both ordinary and staged commit require complete mappings/patches/canonical TLS input and actual native operation 0x62 while the original stage grant remains held, before grant disposal, transfer or Start. The allocation-free client hashes complete original input across transport and requires exact positive extent and complete identity/intent/TP correlation. Only the complete original native result publishes readiness; repeat gating cannot reset live bytes. Loaderd's noncopy materialization owner retains acknowledged-abort responsibility after a lost streaming reply and refuses incomplete commit or input replacement.

Eighteen new unit controls and an independent capacity/descriptor/refusal suite are authored and unrun. Coverage includes complete original correlation, capacity refusal before creation/cleanup, input order/header/reply/spare protection, malformed/incomplete input before native effects, once-only readiness, uncertain native/abort outcomes, refusal of original owner replacement, positive cleanup erasure and lost streaming replies.

Actual authenticated ELF template/immutable registry/image production, dedicated stack/guard/TLS/registry geometry, Dynlinkd original module correlation/exact-width patch streaming, libc errno/TLS/descriptor accessors, ordinary additional thread birth/deployment/creator FP inheritance, exit/join/detach/module/unload/destructors and required imported/native consumers remain unfinished. Existing artifact/production ELF TLS refusal stays until these paths migrate. Both complete EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Complete native and TLS acceptance remains open; this materialization source is a prerequisite, not a replacement for full acceptance.

Exact-width materialization and complete raw-record refusal — 12 October 2026

Old scalar-only record/body widths reject and retired value fields are removed without aliases.

Complete-batch validation now decodes every raw record and propagates each refusal before exposing an accepted immutable iterator.

Fifteen new unit controls are authored and unrun: five literal codec/full-record controls, five mixed-width/span/boundary/failure/producer-state controls, three client correlation/refusal/uncertainty controls and two original graph producer/short-output controls. They include malformed-first/middle/last validation, no early output/native/progress/cleanup effect, exact bytes and untouched spare capacity, complete overflow refusal and original abort custody.

Actual TLS graph/module/template/immutable registry/image production, dedicated mapping geometry, libc resolvers, normal additional thread birth/FP inheritance, complete lifecycle and required imported/native consumers remain unfinished. Existing ELF/artifact TLS refusal stays. Both complete EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Full native and TLS acceptance stays open; this exact-width stream is a prerequisite, not a substitute for complete producer adoption.

Original immutable TLS registry and production image adoption — 12 October 2026

Retain a separate immutable registry of original authenticated ELF TLS prefixes and metadata; never derive a later thread's template from the first thread's writable TLS bytes. Registry framing uses ERR1, version one, a 64-byte header with module count, complete extent, original nonzero registry generation and authenticated graph digest, then 96-byte module records followed by exact packed original prefixes. Each record retains nonzero process-local module ID, original graph-object ordinal, packed prefix offset/length, complete memory extent, alignment/residue, reserved zero and original file content digest. Numeric identities, digests and bytes remain descriptive and cannot authenticate a native process, mapping, file or successor.

The pure caller-counted encoder/parser must preflight all header/table/prefix arithmetic, canonical prefix ordering, full extent, every reserved byte and original module geometry before output publication. Caller sorting indices validate duplicate module IDs and duplicate original graph-object ownership without a private module or image-size ceiling. Borrow every original prefix from the same immutable registry; expose complete original source correlation and fill caller-owned module records only after whole-input/storage preflight. Place this registry in a separate read-only production region. It supplies original template provenance to actual additional-thread construction and synchronized module lifetime, never ambient lookup or arbitrary mapping permission.

Keep the established 24-byte self/DTV/errno ABI prefix. Production images reserve a 32-byte TCB, with the immutable registry address at offset 24 as a documented extension. Initialize that pointer only from the retained original production registry geometry; scalar pointers confer no native authority. Every ordinary production thread needs an initialized EriX TCB/DTV/errno even when the graph has no PT_TLS module. Existing early/nonmigrated native paths may not silently acquire libc TLS APIs through their legacy FS0 context; completing their migration remains required before full runtime/artifact admission changes.

Loaderd keeps authenticated original object snapshots, deterministically associates their TLS templates with original graph ordinals/module IDs and derives immutable registry plus original VariantII image in explicit deployment-supplied workspace. Dedicated checked stack/guard/TLS/registry regions follow the complete original mapped ELF extent without overlap. Stack/deployment budgets are explicit policy, not hidden crate maxima; request and image byte counts are preflighted before native creation. Dynlinkd receives immutable original registry/source associations and exact image geometry through its already authenticated graph transaction, verifies each against the original object digests/IDs, and runs the original TLS-aware graph planner with caller-owned arena storage. Exact-width output uses the already migrated patch stream; it cannot substitute empty/dummy templates for original provenance.

Connect the actual registry/image/module/guard stream to Procd's retained original stage and native readiness gate before ordinary/staged/realm commit. Add per-thread libc errno/TLS/descriptor resolution tied to the initialized image, full additional-thread birth/FP and mask inheritance, lifetime/exit/join/detach/module/unload/destructor consumers and real ELF/native VM controls retaining every older oracle. Preserve current artifact/production TLS rejection until the corresponding supported producer and consumer path is actually complete. The complete native/TLS/runtime acceptance criteria stay unchanged.

Testing/builds/lint/rendering/VM/profiling and CI observation remain deferred; author meaningful source controls and report them as unrun. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Complete this production path rather than redefining success around the registry or another intermediate API.

Keep exact original object ordinal, template address/load bias, file-prefix extent and image/registry offsets together; crossing an initialization-prefix boundary refuses before effects. Never substitute mutable live-thread bytes or treat copied digests/pointers as authority.

Runtime registry bytes become immutable at publication; module mutation/unload/destructor synchronization remains part of complete acceptance. No test/VM/build/profiler or CI observation is claimed; full existing criteria and both EriX plus external Rust/LLVM guest rebuilding remain unchanged and required.

Immutable original TLS registry and initial ELF production — 12 October 2026

The encoder/parser preserve refusal and spare bytes without private module/image ceilings. Fresh image initialization derives from the retained immutable registry, never another thread's writable bytes. Digests, IDs and pointer words remain descriptive and grant no native authority.

Required descriptors derive the exact original ABI export within original executable nonwritable code; a scalar address is only an assertion, and actual libc resolver implementation remains pending.

Cross-prefix and original zero-suffix effects refuse rather than disappearing; relocated zero-suffix support remains required. A complete second read supplies original process-memory patches; SHA-256 of all ordered canonical records and the exact full count must agree before linker retirement and child commit.

Old descriptors refuse. The versioned standard and smoke profiles explicitly select adjustable 65536-byte stack policy; malformed/unpatched stack values refuse.

They include literal sparse/empty/duplicate/malformed registry geometry, independent fresh images, exact fragments/tail/refusal/spare bytes, original transaction association and retirement, actual committed mixed-width TLS plans, selected descriptor provider/code-span refusal, disjoint workspace, complete plan/count correlation, late cross-prefix/zero-suffix refusal and actual original PT_TLS Loaderd handoff.

Full TLS/native acceptance remains open. Actual libc errno/TLS/descriptor resolution, early FS0 migration, ordinary additional birth, FP/mask inheritance, join/detach/exit, synchronized module lifetime/unload/destructors, required weak-null/static-flag/zero-suffix forms and complete native/imported consumers still need implementation. Existing native VM sources and all earlier integration oracles remain; complete ELF multi-thread VM adoption remains required. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. These completed source prerequisites do not substitute for complete production/runtime/lifecycle acceptance.

Four fully completed source prerequisites are exposed under the original full TLS item; its additional-thread/libc/lifetime/consumer scope remains open.

Explicit original per-thread C runtime primitives — 12 October 2026

TLS lookup preflights original nonzero ID, complete count/slot/module arithmetic, immutable registry-generation correlation, present pointer and offset within its complete original extent; a one-past result supplies no dereference authority.

Accepted bytes cannot authenticate a current native thread, module lifetime or mapped registry.

Integration replaces the old memory-only selection type with RuntimeSelection and requires exact explicit component schemas/roles. Standalone CLI component selection is explicit; existing kernel/shared builders retain memory-only selection and the shared builder refuses substitution. Thread provenance cannot satisfy old memory support, and public thread provider policy does not expand the old hidden-only memory provenance contract.

Literal oracles cover signed isolated errno, sparse missing IDs, full-width offsets, one-past results, zero-sized present modules, complete malformed first/last slots, original generation/identity and extent overflow refusal without byte changes.

Complete libc/TLS/native acceptance stays open. Actual native consumer packaging, early FS0 migration, normal additional birth, creator FP/mask inheritance, TLS keys/destructor ordering, synchronized module admission/unload, exit/join/detach, required imported forms and real native ELF multi-thread VM controls remain mandatory. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed. These implemented primitives and explicit producer/provenance paths are source prerequisites, not complete runtime or self-host acceptance.

Bounded original thread controls and compatibility packaging — 12 October 2026

Expected SIGILL requires the original raw negative child signal status, matching shell status and clean owned cleanup. Numeric exits, another signal, timeout, warnings or uncertain cleanup cannot satisfy it. Complete actual command and source/tool/owner/receipt identity remains before acceptance; already owned original probes are reused without repeating compilation.

Compatibility packaging preserves the original thread instructions and all four standalone memory/string instruction sections; the driver requires byte identity rather than matching names alone.

Compatibility support cannot impersonate memory-only or thread-only provenance. Existing kernel/shared bootstrap continues memory-only selection and refuses substitution; full artifact TLS admission is unchanged.

Complete libc/TLS/native acceptance remains open. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. The complete original criteria are retained; this source packaging and authored host driver cannot substitute for actual native or guest evidence.

Original creator environment implementation — 12 October 2026

Native admission requires an actual captured original image; the immutable snapshot is retained beside the original invocation and lent only through the sealed outstanding successful creator CLAIM. Later asynchronous caller changes, receiver CPU state and payload data cannot replace that source.

Exact replay compares it; Start uses retained intent and never recaptures or resets registers. Current original authority, independent Kernel baseline, TLS memory, enrollment/EXECUTE and positive cleanup stay required.

Eight independent unit controls cover init/format/fresh-byte/reserved bits, allocation/replay/retirement, asynchronous source changes and actual actor refusal. The existing actual CPL3 member stream now requires original creator rounding and masked SSE precision status, fresh TOP/tags and all sixteen fresh XMM registers before installing its distinct canary. Full ordinary birth/lifecycle/libc/imported consumers, complete ELF TLS/masks/module lifetime and native multi-thread evidence remain open. Both EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.

Two complete creator-environment implementation/control-source prerequisites are exposed without narrowing full native/ELF/TLS/libc/consumer/guest acceptance.

Native thread self-exit and finalization implementation — 12 October 2026

Scalar opcode 0x63 accepts a complete opaque result word with all other arguments reserved zero; no peer, process, capability or pointer selector is supplied. The bridge admits only the exact same-caller finalization return and rejects departed/unknown/auxiliary success. Hosted transport refuses locally without instructions or pointer access.

Thread-only exit retires only its original receiver/caller/wait/observer custody, emits no process event and retires no process lifetime grant. The assembly-owned return guard never resumes the committed terminal stack.

With no surviving started peer, lifecycle exclusion closes preparation and initial/member Start, retains unstarted/uncertain charged backing that cannot execute and keeps the same running execution for runtime finalizers followed by existing whole-process exit zero. Exact result replay never selects another intent; changed result/generation/process/state refuses. Positive departed-member observation/disposal requires a genuine original noncopy view; current attribution, native charges and refused backing preserve original custody.

A separate actual CPL3 self-exit scenario requires full retained result and original initial/shared-process survival before complete original group drain. Complete ordinary creation, full exit/join/detach/libc/ELF/imported consumers and both EriX plus external Rust/LLVM guest build generations remain open and mandatory.

Native runtime consumer selection implementation — 12 October 2026

The shared builder refuses wrong component, policy or target before source/tool access. Both registry readers require exact integer version four; prebuilt header refusal occurs before artifact-row access. Old memory-only registries, public compatibility, missing/mixed thread roles and stale ABI cannot satisfy shared admission.

Four independent authored controls cover actual-consumer component/policy/target refusal before effects, normal/prebuilt version refusal, memory/thread/public substitution and complete thread role/ABI identity.

Resolver code availability does not initialize FS/TLS or provide native execution authority; existing artifact TLS refusal remains. Complete libc/startup/sysroot, ordinary native creation, full thread/module lifetime, keys/destructors, join/detach, imported consumers and both EriX plus external Rust/LLVM guest build generations remain required and unperformed.

Native runtime consumer documentation correction — 12 October 2026

Full ordinary creation, libc/sysroot, lifecycle, native ELF/TLS and both EriX plus external Rust/LLVM guest build generations remain open and required.

Held-member native exit-result observation implementation — 12 October 2026

Native opcode 0x64 requires actual current-local native member READ and exact original serial, reusing the complete NTO1 selection and a distinct NXR1 output. Factory, counterfeit/replaced binding, missing READ, stale serial/native association and group removal refuse. The bridge preserves status precedence and correlates original input, serial, flags and extent; hosted targets refuse locally without instructions or pointed-to access.

Retained cleanup-only members may observe their original result through real native charge/backing refusal; last-thread finalization yields no departed result. Each repeat requires current READ and restores unchanged original custody. Observation grants no lookup, exclusive join, Start/stop/disposal authority and changes no shared inventory, mapping, result, charge or backing. An error or absent result never proves cleanup.

The isolated actual CPL3 self-exit stream checks pending READ before Start, malformed register/output/span refusal and two full-width departed-result queries through the production path. Four separately supplied directed SEND/RECV rendezvous endpoints order custodian readiness, member notification/self-exit, result queries and creator/observer acknowledgements before process drain. The creator stays blocked/alive until actual result acknowledgement; each actor positively disposes its last-used rendezvous grants and final native oracles require absence. Hooks compare actual results/state and supply no runtime effect.

Full ordinary factory provisioning/request dispatch, exclusive join/detach, libc/startup/sysroot, native ELF/TLS/module lifetime and imported consumers remain open and mandatory. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed.

Authenticated staged client factory producer implementation — 12 October 2026

Explicit private operation 0x445 takes exact 48-byte descriptive framing plus one independently received original stage GRANT. The existing independently empty pre-provision working column receives the native factory; no default thread grant or hidden scratch pool is added.

Complete current Held descriptor correlation, actual local metadata and native READ/serial/scope/kind/minimal rights precede every publication. Rights are exactly READ/MINT/GRANT; no unused MANAGE is granted. The exact 104-byte response echoes original input and native descriptor data; failure has a zero tail and no grants. Parsed bytes and metadata authenticate no capability or cleanup.

Positive owned COMPLETE uniquely returns the same stage GRANT then genuine factory. Transferred state rejects source access before slot queries, so replacement occupations cannot supply old authority. A new request cannot duplicate a transferred factory. Changed row/scope, uncertainty, failed READ or partial publication retains exact original child/delivery/prospective source/native intent through independent retirement.

Full mediator configuration delivery, ordinary preparation/context/enrollment/Start dispatch, exclusive join/detach, libc/startup/sysroot, native ELF/TLS/module lifetime and imported consumers remain open and required. Full producer/consumer VM coverage remains required as that path is wired. Both complete EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed.

Counted Launchd client factory custody implementation — 12 October 2026

Superseded startup symbols/versions are removed without aliases; capacity and hashes confer no authority.

Accepted/nonzero/unknown callers and prospective row columns remain retained; exact caller RELEASE/drain retirement precedes result acceptance. Complete original request,scope,capacity,intent,current Held descriptor and exact stage GRANT plus factory READ/MINT/GRANT roles must match. Actual inventory and native READ/serial/process/kind/rights/cleanup evidence precede Begin. Sticky cleanup refusal retains row quarantine even after the native caller drains.

Sixteen controls are authored/unrun: literal capacity/budget/old-width, paired caller source/result/cancel/retirement, one/multiple-client provisioning/refusal/quarantine, default seal-to-Start and receiver-only unsupported admission.

Posixd current receiver-only intake refuses positive factory descriptions while retaining prospective caller/source custody. Complete mediator factory delivery and ordinary preparation/context/enrollment/Start, exclusive join/detach, libc/startup/sysroot, native ELF/TLS/module lifetime and imported consumers remain open. Full producer/consumer VM coverage remains required as that path is wired. Both complete EriX guest generations and rebuilding external Rust/LLVM inside EriX remain mandatory and unperformed.

Validation resumed in parallel — 12 October 2026

The user lifted restrictions on testing and CI monitoring and requires all repositories to pass CI. Test or CI failures must never block unrelated implementation progress. Existing waived source checkpoints remain historical source acceptance, not retrospective test proof; earlier “remain deferred” wording is superseded for ongoing work.

Full native factory delivery, ordinary thread lifecycle/libc/TLS integration, both whole EriX guest generations and rebuilding external Rust/LLVM inside EriX remain required and unfinished.

Related records and contracts
Repository Links
bootloader PR 3
docs PR 4
dynlinkd PR 3
exsh issue 13
integration issue 103, PR 12, native-c-runtime-consumers.md
kernel PR 3, creator-floating-environment.md, native-member-exit-observation.md, native-thread-exit.md
launchd client-thread-factory.md
lib-cstd thread-runtime.md
lib-dynlink PR 3, tls-registry.md
lib-elf PR 2
lib-ipc PR 2, relocation-patches.md
loaderd PR 2
posixd PR 5
procd PR 2, client-thread-factory.md, initial-tls-materialization.md
rootd PR 2
Do not disclose suspected vulnerabilities here; follow SECURITY.md instead. ## Problem and motivation Ordinary native threads and imported Rust/LLVM tools need correctly initialized per-thread TLS, errno and dynamic TLS resolution. The current artifact/runtime path rejects TLS, and native initial process setup installs a zero thread pointer. A pure parser or successful additional-member context alone does not satisfy the complete production boundary. ## Proposed behavior and scope Complete original ELF64 PT_TLS template validation, x86-64 VariantII layout and EriX runtime TCB/DTV construction, TLS symbol/relocation linking, actual initial/additional native context initialization and libc thread-local interfaces. Coordinate LibElf, LibDynlink, Loaderd, Dynlinkd, LibIPC, Kernel, Procd/Launchd/Rootd, LibCstd, Posixd, Integration and the manual. Support caller-counted module/template/image storage with full checked extents, alignment and original initialization prefix plus zero suffix, including all-zero templates and sparse original module identifiers. Preserve original file/template provenance and immutable per-process module registry through native member birth and retirement. The complete production path must initialize initial and additional threads before execution, inherit actual creator signal masks and FP environment as required, expose correct per-thread errno/TLS resolver/runtime behavior, implement member exit/join/detach cleanup and support every manifested imported consumer. Existing bootstrap/trusted artifacts must not silently gain unsupported TLS behavior. ## Authority, security and reliability TLS metadata, addresses, module IDs and DTV values supply no native authority. Pure libraries borrow explicit original bytes and caller storage; no ambient lookup, mapping, allocation or service route exists. Actual loader/mediator/native producers independently retain original process/stage/factory/member authority, mappings, creator CLAIM, positive context/enrollment and once-only Start. Guard absence, permissions, exclusive per-thread stack/TLS and current machine/CPU policy remain native prerequisites. TCB/DTV/module extents preflight before any destination effect; errors retain original custody and cannot reconstruct a successor from copied receipts. Revocation/terminal cleanup settles actual private images/mappings and counts before native identity reuse. ## Acceptance criteria <details> <summary>Checklist</summary> - [x] Complete validated PT_TLS extraction and original template provenance, malformed/duplicate/truncated/overflow/alignment and zero-initialization contracts without private size/count ceilings. - [x] Complete caller-counted VariantII layout and EriX TCB/DTV image construction with deterministic module identities, sparse identifiers, correct alignment residue and checked symbol offsets/addresses. - [ ] Complete TLS symbol kinds and dynamic/local/initial-exec/descriptor relocation forms required by actual imported artifacts, with exact writable non-executable target geometry and original graph/module correlation. - [ ] Wire actual Loaderd/Dynlinkd/artifact build and inspection policy, plus initial and additional native TLS initialization before genuine user execution; remove obsolete unsupported assumptions after complete migration. - [ ] Complete per-thread libc errno, TLS resolver and normal creation/lifecycle/join/detach and all required native/imported consumer adoption, including creator FP/mask inheritance and positive cleanup. - [ ] Author independent parser/layout/relocation/refusal/capacity and real native multi-thread TLS VM controls retaining every original integration oracle; deferred execution must be reported accurately. - [ ] Maintain useful inline rustdoc, missing_docs, code files below 1000 physical lines, component/manual contracts and coherent signed immutable source/helper/runtime graph and owning reviews. - [ ] Demonstrate both full EriX guest build generations and external Rust/LLVM rebuilding inside EriX with original source/toolchain/artifact provenance and complete performance evidence when execution resumes. </details> ## Alternatives and tradeoffs Removing the TLS rejection before runtime/context support would admit broken executables. Treating TLS symbols as ordinary addresses or sharing one TLS block would violate the required per-thread semantics. Keep current runtime refusal until complete producers/consumers can initialize it, while implementing and reviewing pure validation/layout first. Dynamic loading beyond the initial graph must retain original module identities and custody instead of imposing a private module-count limit. ## Tracking and rollout Related work: [native context/enrollment/Start](https://git.erikinkinen.fi/erix/kernel/issues/47), [thread consumers](https://git.erikinkinen.fi/erix/posixd/issues/34), [libc](https://git.erikinkinen.fi/erix/lib-cstd/issues/1), [dynamic linker](https://git.erikinkinen.fi/erix/dynlinkd/issues/1), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). Follow the complete producer/consumer transaction and original authority lifetimes; no narrow foundation closes the complete native requirement. Tests/builds/lint/rendering/VM/profiler execution and CI observation remain deferred. Full guest/self-toolchain rebuilding remains mandatory and unperformed. Primary specification inputs: [ELF program header/TLS template](https://refspecs.linuxfoundation.org/elf/gabi4%2B/ch5.pheader.html), [x86-64 processor ABI](https://refspecs.linuxfoundation.org/elf/x86_64-abi-0.99.pdf). Independently author implementation from these contracts; do not copy third-party implementation. <details> <summary>Detailed scope and contracts</summary> ### Original ELF TLS image and linking source — 11 October 2026 Static native TLS refusal remains intact. Complete caller-image preflight precedes every byte effect; refusal and spare bytes remain unchanged. Scalar addresses, IDs and generations grant no native authority. Ordinary graph planning refuses TLS, and the distinct patch type cannot enter existing eight-byte-only handoff consumers. Descriptor resolver addresses remain descriptive; actual register-preserving code and its native mapping must be authenticated separately. Missing weak TLS providers, static-linker annotations and complete actual imported-artifact coverage remain unfinished. No allocation, ambient lookup, numeric address dereference, capability minting, FS setter or runtime policy widening is introduced. Twenty-one independent template/image/expression/graph controls cover malformed/overflow/alignment/refusal, independent images, provider identity, full descriptor targets and late-refusal/retry output custody. Actual Loaderd/Dynlinkd/Procd/Kernel initial and additional TLS image production, LibCstd errno/TLS/descriptor accessors, ordinary creation/deployment, inherited FP state, member exit/join/detach, module mutation/unload/destructors and all required native/imported consumers remain unfinished. Existing executable/artifact TLS refusal stays until every thread is initialized. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Canonical completion is 21.88% weighted and 10.11% whole acceptance: 33/460 accepted parents, 505/978 completed sub-items under 168 decomposed parents. Two explicit template/image source sub-items are credited; complete TLS and native thread lifecycle requirements remain open. Tracking: [complete TLS](https://git.erikinkinen.fi/erix/lib-dynlink/issues/4), [native thread acceptance](https://git.erikinkinen.fi/erix/kernel/issues/47), [linker runtime](https://git.erikinkinen.fi/erix/dynlinkd/issues/1), [libc](https://git.erikinkinen.fi/erix/lib-cstd/issues/1), [thread consumers](https://git.erikinkinen.fi/erix/posixd/issues/34), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). ### Selected original symbol provider correction — 11 October 2026 An unused weak provider cannot cause an unrelated overflow refusal, and an unrelated TLS export cannot reject an ordinary local or selected strong definition. Both ordinary and TLS planning consume this shared selected-provider metadata; no ambient lookup, mapping, native capability or runtime TLS admission is introduced. Existing TLS parser/image foundations and all original native VM oracles remain; complete native initial/additional TLS initialization, libc, ordinary creation/deployment/lifecycle and required imported consumers remain open. The source defect is resolved on implementation and authored controls under the testing waiver; complete TLS and native thread acceptance remain open. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Tracking: [resolved provider defect](https://git.erikinkinen.fi/erix/lib-dynlink/issues/5), [complete TLS](https://git.erikinkinen.fi/erix/lib-dynlink/issues/4), [native thread acceptance](https://git.erikinkinen.fi/erix/kernel/issues/47), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). ### Original initial-process TLS admission design — 11 October 2026 Implement a distinct initial-process path before allowing production TLS artifacts. Existing additional-member WRITE/context/creator CLAIM is not initial-process authority. A sealed common Created-stage admission must independently require the actual Running current caller's Process SEND route and actual GRANT-bearing install grant for the exact original Created initial process/generation. Member factory budget/absence policy remains separate. Scalar process/thread labels, copied receipts and current-execution context supply no construction authority. Proposed immediate x86-64 operation 0x62 accepts an exact counted `ITI1` version-1 request and a zero 64-byte `ITR1` reply reservation. Its 128-byte header carries route/grant/process/generation, nonzero original intent, entry, initial SysV stack pointer, thread pointer, code/stack/TLS byte intervals and module/guard/TLS-byte counts. Module records are 24 bytes, guard records 16 bytes and TLS input is an inline opaque immutable prefix. Initial ordinary startup-image/endpoint arguments remain owned by existing startup admission, never overwritten by TLS input. The initial Start stack top must equal the captured SysV pointer plus eight. All products, sums, scalar geometry and actual complete caller READ/WRITE span preflight without private count/size ceilings. Copy input before target effects; revalidate the original caller/span before complete reply publication. Kernel-owned noncopy initial TLS storage retains original initial execution/process/creator/intent and copied immutable memory recipe/input. Authenticate current original mapping occupations, required/forbidden permissions, code entry, stack red zone/return slot, guard absence and exclusive stack/TLS through the existing actual VSpace reference mechanism. Reserve/copy all intent, observation and directory storage before mapping-reference publication. A pending record retains exact native mapping/input/progress through machine allocation or byte-write refusal. Same pending retry still needs the original held stage authority and exact unchanged intent. A ready retry is descriptive reconciliation from the same actual creator/original occupation and cannot reset bytes/registers or mint replacement authority after grant disposal/Start. Initial Start rejects pending TLS, changed entry/stack, invalidated original mappings/guards and current machine-policy refusal before runnable publication. Ready Start validates the original retained FS pointer/private machine owner; initial-frame construction validates original stack/mappings again before first return. Legacy non-TLS setup remains explicit FS0 until its producer is migrated. No unrestricted scalar FS setter is added. Shared startup arguments and complete GPR/FP/native hardware behavior retain their original owners. Abort/whole-group stop and drain include initial TLS preflight before remote/shared effects. Positive original VSpace reference settlement precedes erasure of copied TLS intent and private machine state and native identity reuse. Dropped source views or revoked grants cannot forget pending native backing; stale labels cannot follow a replacement. Module/ELF/TCB/DTV policy remains in the loader/libc, not Kernel. Wire actual Loaderd/Dynlinkd/Procd materialization to original template/layout custody and exact-width patches, map the complete initial stack/TLS/guard geometry, initialize while original stage grant is held, then dispose the grant positively and Start. Additional birth uses the same original process registry/image policy and its genuine member context. LibCstd per-thread errno/TLS/descriptor resolvers, normal thread creation/deployment, inherited FP/masks, exit/join/detach/module/unload/destructors and all required consumers remain in the full design. Author literal framing, actual grant/role/refusal/mapping/cleanup, initial/additional multi-thread TLS and complete older VM controls. Tests/builds/lint/VM/profiling/CI remain deferred; do not credit executed runtime or guest builds from source controls. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Preserve all original complete acceptance criteria; this design does not replace them with a smaller native or parser endpoint. ### Original initial-process TLS native custody — 12 October 2026 Original initial-process TLS now has a distinct native operation 0x62 with ITI1/ITR1, independently requiring the actual Running caller's Process SEND endpoint and exact Created initial-process stage GRANT. Scalar labels, copied receipts and current execution alone cannot construct it. Caller-counted module/guard/template framing validates every field/extent/count/reserved byte without private count/size limits, preauthorizes before copied-input allocation and preserves refusal/spare bytes. Machine or byte refusal retains pending original custody; changed input/creator/occupation/mapping cannot adopt it. Actual complete caller READ/WRITE span preflights before copy/effects, and the same original caller/span revalidates before complete reply publication. Initial Start refuses pending state, changed entry/top, invalidated original mappings/guards or machine policy before runnable publication. They cover complete framing/overflow/refusal/correlation, actual Process/grant/initial role, prefix/zero/stack/startup preservation, same-original ready replay, peer/changed-input refusal, guard and remap conditions, allocation cut points, unauthorized allocation refusal and positive abort/reuse. No hook supplies effects. Actual Loaderd/Dynlinkd/Procd ELF image/patch producers, LibCstd errno/TLS/descriptor accessors, ordinary native creation/deployment, inherited FP state, exit/join/detach/module/unload/destructors and all required consumers remain unfinished. Existing executable/artifact TLS refusal stays until every initial and additional producer is migrated. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. No narrower native or parser endpoint replaces complete acceptance. Full native/TLS/runtime/lifecycle/consumer acceptance remains open. Tracking: [complete TLS](https://git.erikinkinen.fi/erix/lib-dynlink/issues/4), [full native thread acceptance](https://git.erikinkinen.fi/erix/kernel/issues/47), [libc](https://git.erikinkinen.fi/erix/lib-cstd/issues/1), [thread consumers](https://git.erikinkinen.fi/erix/posixd/issues/34), [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). ### Original production TLS materialization design — 12 October 2026 Carry original authenticated ELF PT_TLS templates through the complete existing Loaderd/Dynlinkd/Procd transaction. Loaderd retains exact original file borrows and manifest/content identity, supplies deterministic process-local module IDs and immutable template descriptors, and constructs the initial VariantII self/DTV/errno image in caller-counted workspace. Materialize a separate read-only original template/module registry for future additional thread birth; mutated initial TLS must never become another thread's initialization template. The optional extended TCB records the original registry pointer while preserving the established self/DTV/errno prefix. Dedicated stack/guard/TLS/registry segments use explicit deployment/caller geometry after checked original mapped extents, without overlapping ELF modules or imposing a library count/size ceiling. Dynlinkd consumes original module/template geometry and the same declared TLS region/TCB policy, retains it in its actual deployment arena, resolves provider kinds/module offsets against original graph membership and emits complete exact-width 4/8/16-byte patches. Replace the obsolete eight-byte-only transport representation and migrate every producer/consumer coherently; keep full writable non-executable target checks, original identities, closure and eager semantics. Split the large transaction implementation before adding code. Missing weak/null-provider and actual imported relocation/symbol-scope coverage remain full requirements, not a permissive runtime fallback. Extend Procd's immutable materialization begin with the exact prospective initial-TLS packet count, zero for explicit non-TLS. Its authenticated deployment geometry delegates separate caller-counted TLS packet bytes in the runtime arena; no fixed transport scratch limit becomes a TLS image policy. Preflight the complete count before CREATE. A private Loaderd-only binding supplies role geometry and module/guard/template counts, never a process/grant/route selector. Sequential exact original fragments fill the admitted Procd-owned input, retaining correlation, counts and cleanup state through partial failure. Procd inserts its independently held original Process route, exact stage grant and actual creation identity. Native client transport validates the complete canonical packet, status/extent and original input/reply correlation, preserving uncertainty and spare caller bytes without allocation or a private size cap. All load segments, original patches, stack/guard/TLS/registry and TLS input must complete before native or staged Commit. Call actual initial0x62 while the same stage grant remains held, retain original native outcome/progress on malformed or unknown replies, and dispose the grant positively only after readiness. Staged/realm handoff must preserve the same initialized original process and lifetime; no copied metadata supplies Start. Positive original native abort/retirement precedes packet erasure/reuse. No ambient source search, extra process-wide route, raw FS setter, imported process identity or forged member CLAIM is introduced. Add native current-thread libc errno, dynamic TLS lookup and eager register-preserving descriptor entry points tied to the established initialized image. Complete ordinary additional thread creation/deployment, actual creator FP/mask inheritance, exit/join/detach/module/unload/destructors and required native/imported consumers remain mandatory. Do not remove artifact/runtime rejection until the supported producer/consumer contract actually admits each required form. Author independent streaming/count/refusal/input/output/mapping/native-call/cleanup controls and real initial/additional ELF TLS VM sources retaining every older oracle. Preserve rustdoc/missing_docs, files below1000lines, signed immutable source/helper/catalog graphs and owning review/master evidence. Testing/build/lint/rendering/VM/profiling and CI observation remain deferred, with controls authored and results reported accurately. Both complete EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Preserve all complete existing acceptance criteria and do not replace them with a parser, bridge, arena or native primitive endpoint. ### Initial TLS materialization storage and native readiness — 12 October 2026 Old 64/88-byte bodies reject. Procd inserts independently retained actual Process SEND route, exact stage grant, native created identity and original intent; the payload cannot select them. Identical repeats retain progress; changed descriptions refuse. Stale, empty, reordered, overflowing and overlong input refuses before mutation; fragments cannot overwrite the private native header or reply reservation. Both ordinary and staged commit require complete mappings/patches/canonical TLS input and actual native operation 0x62 while the original stage grant remains held, before grant disposal, transfer or Start. The allocation-free client hashes complete original input across transport and requires exact positive extent and complete identity/intent/TP correlation. Only the complete original native result publishes readiness; repeat gating cannot reset live bytes. Loaderd's noncopy materialization owner retains acknowledged-abort responsibility after a lost streaming reply and refuses incomplete commit or input replacement. Eighteen new unit controls and an independent capacity/descriptor/refusal suite are authored and unrun. Coverage includes complete original correlation, capacity refusal before creation/cleanup, input order/header/reply/spare protection, malformed/incomplete input before native effects, once-only readiness, uncertain native/abort outcomes, refusal of original owner replacement, positive cleanup erasure and lost streaming replies. Actual authenticated ELF template/immutable registry/image production, dedicated stack/guard/TLS/registry geometry, Dynlinkd original module correlation/exact-width patch streaming, libc errno/TLS/descriptor accessors, ordinary additional thread birth/deployment/creator FP inheritance, exit/join/detach/module/unload/destructors and required imported/native consumers remain unfinished. Existing artifact/production ELF TLS refusal stays until these paths migrate. Both complete EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Complete native and TLS acceptance remains open; this materialization source is a prerequisite, not a replacement for full acceptance. ### Exact-width materialization and complete raw-record refusal — 12 October 2026 Old scalar-only record/body widths reject and retired value fields are removed without aliases. Complete-batch validation now decodes every raw record and propagates each refusal before exposing an accepted immutable iterator. Fifteen new unit controls are authored and unrun: five literal codec/full-record controls, five mixed-width/span/boundary/failure/producer-state controls, three client correlation/refusal/uncertainty controls and two original graph producer/short-output controls. They include malformed-first/middle/last validation, no early output/native/progress/cleanup effect, exact bytes and untouched spare capacity, complete overflow refusal and original abort custody. Actual TLS graph/module/template/immutable registry/image production, dedicated mapping geometry, libc resolvers, normal additional thread birth/FP inheritance, complete lifecycle and required imported/native consumers remain unfinished. Existing ELF/artifact TLS refusal stays. Both complete EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Full native and TLS acceptance stays open; this exact-width stream is a prerequisite, not a substitute for complete producer adoption. ### Original immutable TLS registry and production image adoption — 12 October 2026 Retain a separate immutable registry of original authenticated ELF TLS prefixes and metadata; never derive a later thread's template from the first thread's writable TLS bytes. Registry framing uses ERR1, version one, a 64-byte header with module count, complete extent, original nonzero registry generation and authenticated graph digest, then 96-byte module records followed by exact packed original prefixes. Each record retains nonzero process-local module ID, original graph-object ordinal, packed prefix offset/length, complete memory extent, alignment/residue, reserved zero and original file content digest. Numeric identities, digests and bytes remain descriptive and cannot authenticate a native process, mapping, file or successor. The pure caller-counted encoder/parser must preflight all header/table/prefix arithmetic, canonical prefix ordering, full extent, every reserved byte and original module geometry before output publication. Caller sorting indices validate duplicate module IDs and duplicate original graph-object ownership without a private module or image-size ceiling. Borrow every original prefix from the same immutable registry; expose complete original source correlation and fill caller-owned module records only after whole-input/storage preflight. Place this registry in a separate read-only production region. It supplies original template provenance to actual additional-thread construction and synchronized module lifetime, never ambient lookup or arbitrary mapping permission. Keep the established 24-byte self/DTV/errno ABI prefix. Production images reserve a 32-byte TCB, with the immutable registry address at offset 24 as a documented extension. Initialize that pointer only from the retained original production registry geometry; scalar pointers confer no native authority. Every ordinary production thread needs an initialized EriX TCB/DTV/errno even when the graph has no PT_TLS module. Existing early/nonmigrated native paths may not silently acquire libc TLS APIs through their legacy FS0 context; completing their migration remains required before full runtime/artifact admission changes. Loaderd keeps authenticated original object snapshots, deterministically associates their TLS templates with original graph ordinals/module IDs and derives immutable registry plus original VariantII image in explicit deployment-supplied workspace. Dedicated checked stack/guard/TLS/registry regions follow the complete original mapped ELF extent without overlap. Stack/deployment budgets are explicit policy, not hidden crate maxima; request and image byte counts are preflighted before native creation. Dynlinkd receives immutable original registry/source associations and exact image geometry through its already authenticated graph transaction, verifies each against the original object digests/IDs, and runs the original TLS-aware graph planner with caller-owned arena storage. Exact-width output uses the already migrated patch stream; it cannot substitute empty/dummy templates for original provenance. Connect the actual registry/image/module/guard stream to Procd's retained original stage and native readiness gate before ordinary/staged/realm commit. Add per-thread libc errno/TLS/descriptor resolution tied to the initialized image, full additional-thread birth/FP and mask inheritance, lifetime/exit/join/detach/module/unload/destructor consumers and real ELF/native VM controls retaining every older oracle. Preserve current artifact/production TLS rejection until the corresponding supported producer and consumer path is actually complete. The complete native/TLS/runtime acceptance criteria stay unchanged. Testing/builds/lint/rendering/VM/profiling and CI observation remain deferred; author meaningful source controls and report them as unrun. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Complete this production path rather than redefining success around the registry or another intermediate API. Keep exact original object ordinal, template address/load bias, file-prefix extent and image/registry offsets together; crossing an initialization-prefix boundary refuses before effects. Never substitute mutable live-thread bytes or treat copied digests/pointers as authority. Runtime registry bytes become immutable at publication; module mutation/unload/destructor synchronization remains part of complete acceptance. No test/VM/build/profiler or CI observation is claimed; full existing criteria and both EriX plus external Rust/LLVM guest rebuilding remain unchanged and required. ### Immutable original TLS registry and initial ELF production — 12 October 2026 The encoder/parser preserve refusal and spare bytes without private module/image ceilings. Fresh image initialization derives from the retained immutable registry, never another thread's writable bytes. Digests, IDs and pointer words remain descriptive and grant no native authority. Required descriptors derive the exact original ABI export within original executable nonwritable code; a scalar address is only an assertion, and actual libc resolver implementation remains pending. Cross-prefix and original zero-suffix effects refuse rather than disappearing; relocated zero-suffix support remains required. A complete second read supplies original process-memory patches; SHA-256 of all ordered canonical records and the exact full count must agree before linker retirement and child commit. Old descriptors refuse. The versioned standard and smoke profiles explicitly select adjustable 65536-byte stack policy; malformed/unpatched stack values refuse. They include literal sparse/empty/duplicate/malformed registry geometry, independent fresh images, exact fragments/tail/refusal/spare bytes, original transaction association and retirement, actual committed mixed-width TLS plans, selected descriptor provider/code-span refusal, disjoint workspace, complete plan/count correlation, late cross-prefix/zero-suffix refusal and actual original PT_TLS Loaderd handoff. Full TLS/native acceptance remains open. Actual libc errno/TLS/descriptor resolution, early FS0 migration, ordinary additional birth, FP/mask inheritance, join/detach/exit, synchronized module lifetime/unload/destructors, required weak-null/static-flag/zero-suffix forms and complete native/imported consumers still need implementation. Existing native VM sources and all earlier integration oracles remain; complete ELF multi-thread VM adoption remains required. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. These completed source prerequisites do not substitute for complete production/runtime/lifecycle acceptance. Four fully completed source prerequisites are exposed under the original full TLS item; its additional-thread/libc/lifetime/consumer scope remains open. ### Explicit original per-thread C runtime primitives — 12 October 2026 TLS lookup preflights original nonzero ID, complete count/slot/module arithmetic, immutable registry-generation correlation, present pointer and offset within its complete original extent; a one-past result supplies no dereference authority. Accepted bytes cannot authenticate a current native thread, module lifetime or mapped registry. Integration replaces the old memory-only selection type with RuntimeSelection and requires exact explicit component schemas/roles. Standalone CLI component selection is explicit; existing kernel/shared builders retain memory-only selection and the shared builder refuses substitution. Thread provenance cannot satisfy old memory support, and public thread provider policy does not expand the old hidden-only memory provenance contract. Literal oracles cover signed isolated errno, sparse missing IDs, full-width offsets, one-past results, zero-sized present modules, complete malformed first/last slots, original generation/identity and extent overflow refusal without byte changes. Complete libc/TLS/native acceptance stays open. Actual native consumer packaging, early FS0 migration, normal additional birth, creator FP/mask inheritance, TLS keys/destructor ordering, synchronized module admission/unload, exit/join/detach, required imported forms and real native ELF multi-thread VM controls remain mandatory. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed. These implemented primitives and explicit producer/provenance paths are source prerequisites, not complete runtime or self-host acceptance. ### Bounded original thread controls and compatibility packaging — 12 October 2026 Expected SIGILL requires the original raw negative child signal status, matching shell status and clean owned cleanup. Numeric exits, another signal, timeout, warnings or uncertain cleanup cannot satisfy it. Complete actual command and source/tool/owner/receipt identity remains before acceptance; already owned original probes are reused without repeating compilation. Compatibility packaging preserves the original thread instructions and all four standalone memory/string instruction sections; the driver requires byte identity rather than matching names alone. Compatibility support cannot impersonate memory-only or thread-only provenance. Existing kernel/shared bootstrap continues memory-only selection and refuses substitution; full artifact TLS admission is unchanged. Complete libc/TLS/native acceptance remains open. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. The complete original criteria are retained; this source packaging and authored host driver cannot substitute for actual native or guest evidence. ### Original creator environment implementation — 12 October 2026 Native admission requires an actual captured original image; the immutable snapshot is retained beside the original invocation and lent only through the sealed outstanding successful creator CLAIM. Later asynchronous caller changes, receiver CPU state and payload data cannot replace that source. Exact replay compares it; Start uses retained intent and never recaptures or resets registers. Current original authority, independent Kernel baseline, TLS memory, enrollment/EXECUTE and positive cleanup stay required. Eight independent unit controls cover init/format/fresh-byte/reserved bits, allocation/replay/retirement, asynchronous source changes and actual actor refusal. The existing actual CPL3 member stream now requires original creator rounding and masked SSE precision status, fresh TOP/tags and all sixteen fresh XMM registers before installing its distinct canary. Full ordinary birth/lifecycle/libc/imported consumers, complete ELF TLS/masks/module lifetime and native multi-thread evidence remain open. Both EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. Two complete creator-environment implementation/control-source prerequisites are exposed without narrowing full native/ELF/TLS/libc/consumer/guest acceptance. ### Native thread self-exit and finalization implementation — 12 October 2026 Scalar opcode 0x63 accepts a complete opaque result word with all other arguments reserved zero; no peer, process, capability or pointer selector is supplied. The bridge admits only the exact same-caller finalization return and rejects departed/unknown/auxiliary success. Hosted transport refuses locally without instructions or pointer access. Thread-only exit retires only its original receiver/caller/wait/observer custody, emits no process event and retires no process lifetime grant. The assembly-owned return guard never resumes the committed terminal stack. With no surviving started peer, lifecycle exclusion closes preparation and initial/member Start, retains unstarted/uncertain charged backing that cannot execute and keeps the same running execution for runtime finalizers followed by existing whole-process exit zero. Exact result replay never selects another intent; changed result/generation/process/state refuses. Positive departed-member observation/disposal requires a genuine original noncopy view; current attribution, native charges and refused backing preserve original custody. A separate actual CPL3 self-exit scenario requires full retained result and original initial/shared-process survival before complete original group drain. Complete ordinary creation, full exit/join/detach/libc/ELF/imported consumers and both EriX plus external Rust/LLVM guest build generations remain open and mandatory. ### Native runtime consumer selection implementation — 12 October 2026 The shared builder refuses wrong component, policy or target before source/tool access. Both registry readers require exact integer version four; prebuilt header refusal occurs before artifact-row access. Old memory-only registries, public compatibility, missing/mixed thread roles and stale ABI cannot satisfy shared admission. Four independent authored controls cover actual-consumer component/policy/target refusal before effects, normal/prebuilt version refusal, memory/thread/public substitution and complete thread role/ABI identity. Resolver code availability does not initialize FS/TLS or provide native execution authority; existing artifact TLS refusal remains. Complete libc/startup/sysroot, ordinary native creation, full thread/module lifetime, keys/destructors, join/detach, imported consumers and both EriX plus external Rust/LLVM guest build generations remain required and unperformed. ### Native runtime consumer documentation correction — 12 October 2026 Full ordinary creation, libc/sysroot, lifecycle, native ELF/TLS and both EriX plus external Rust/LLVM guest build generations remain open and required. ### Held-member native exit-result observation implementation — 12 October 2026 Native opcode 0x64 requires actual current-local native member READ and exact original serial, reusing the complete NTO1 selection and a distinct NXR1 output. Factory, counterfeit/replaced binding, missing READ, stale serial/native association and group removal refuse. The bridge preserves status precedence and correlates original input, serial, flags and extent; hosted targets refuse locally without instructions or pointed-to access. Retained cleanup-only members may observe their original result through real native charge/backing refusal; last-thread finalization yields no departed result. Each repeat requires current READ and restores unchanged original custody. Observation grants no lookup, exclusive join, Start/stop/disposal authority and changes no shared inventory, mapping, result, charge or backing. An error or absent result never proves cleanup. The isolated actual CPL3 self-exit stream checks pending READ before Start, malformed register/output/span refusal and two full-width departed-result queries through the production path. Four separately supplied directed SEND/RECV rendezvous endpoints order custodian readiness, member notification/self-exit, result queries and creator/observer acknowledgements before process drain. The creator stays blocked/alive until actual result acknowledgement; each actor positively disposes its last-used rendezvous grants and final native oracles require absence. Hooks compare actual results/state and supply no runtime effect. Full ordinary factory provisioning/request dispatch, exclusive join/detach, libc/startup/sysroot, native ELF/TLS/module lifetime and imported consumers remain open and mandatory. Both full EriX guest generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed. ### Authenticated staged client factory producer implementation — 12 October 2026 Explicit private operation 0x445 takes exact 48-byte descriptive framing plus one independently received original stage GRANT. The existing independently empty pre-provision working column receives the native factory; no default thread grant or hidden scratch pool is added. Complete current Held descriptor correlation, actual local metadata and native READ/serial/scope/kind/minimal rights precede every publication. Rights are exactly READ/MINT/GRANT; no unused MANAGE is granted. The exact 104-byte response echoes original input and native descriptor data; failure has a zero tail and no grants. Parsed bytes and metadata authenticate no capability or cleanup. Positive owned COMPLETE uniquely returns the same stage GRANT then genuine factory. Transferred state rejects source access before slot queries, so replacement occupations cannot supply old authority. A new request cannot duplicate a transferred factory. Changed row/scope, uncertainty, failed READ or partial publication retains exact original child/delivery/prospective source/native intent through independent retirement. Full mediator configuration delivery, ordinary preparation/context/enrollment/Start dispatch, exclusive join/detach, libc/startup/sysroot, native ELF/TLS/module lifetime and imported consumers remain open and required. Full producer/consumer VM coverage remains required as that path is wired. Both complete EriX guest generations and external Rust/LLVM rebuilding inside EriX remain mandatory and unperformed. ### Counted Launchd client factory custody implementation — 12 October 2026 Superseded startup symbols/versions are removed without aliases; capacity and hashes confer no authority. Accepted/nonzero/unknown callers and prospective row columns remain retained; exact caller RELEASE/drain retirement precedes result acceptance. Complete original request,scope,capacity,intent,current Held descriptor and exact stage GRANT plus factory READ/MINT/GRANT roles must match. Actual inventory and native READ/serial/process/kind/rights/cleanup evidence precede Begin. Sticky cleanup refusal retains row quarantine even after the native caller drains. Sixteen controls are authored/unrun: literal capacity/budget/old-width, paired caller source/result/cancel/retirement, one/multiple-client provisioning/refusal/quarantine, default seal-to-Start and receiver-only unsupported admission. Posixd current receiver-only intake refuses positive factory descriptions while retaining prospective caller/source custody. Complete mediator factory delivery and ordinary preparation/context/enrollment/Start, exclusive join/detach, libc/startup/sysroot, native ELF/TLS/module lifetime and imported consumers remain open. Full producer/consumer VM coverage remains required as that path is wired. Both complete EriX guest generations and rebuilding external Rust/LLVM inside EriX remain mandatory and unperformed. ### Validation resumed in parallel — 12 October 2026 The user lifted restrictions on testing and CI monitoring and requires all repositories to pass CI. Test or CI failures must never block unrelated implementation progress. Existing waived source checkpoints remain historical source acceptance, not retrospective test proof; earlier “remain deferred” wording is superseded for ongoing work. Full native factory delivery, ordinary thread lifecycle/libc/TLS integration, both whole EriX guest generations and rebuilding external Rust/LLVM inside EriX remain required and unfinished. </details> <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | bootloader | [PR 3](https://git.erikinkinen.fi/erix/bootloader/pulls/3) | | docs | [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | dynlinkd | [PR 3](https://git.erikinkinen.fi/erix/dynlinkd/pulls/3) | | exsh | [issue 13](https://git.erikinkinen.fi/erix/exsh/issues/13) | | integration | [issue 103](https://git.erikinkinen.fi/erix/integration/issues/103), [PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12), [native-c-runtime-consumers.md](https://git.erikinkinen.fi/erix/integration/src/branch/feature/posix-compat/docs/native-c-runtime-consumers.md) | | kernel | [PR 3](https://git.erikinkinen.fi/erix/kernel/pulls/3), [creator-floating-environment.md](https://git.erikinkinen.fi/erix/kernel/src/branch/feature/posix-compat/docs/creator-floating-environment.md), [native-member-exit-observation.md](https://git.erikinkinen.fi/erix/kernel/src/branch/feature/posix-compat/docs/native-member-exit-observation.md), [native-thread-exit.md](https://git.erikinkinen.fi/erix/kernel/src/branch/feature/posix-compat/docs/native-thread-exit.md) | | launchd | [client-thread-factory.md](https://git.erikinkinen.fi/erix/launchd/src/branch/feature/posix-compat/docs/client-thread-factory.md) | | lib-cstd | [thread-runtime.md](https://git.erikinkinen.fi/erix/lib-cstd/src/branch/feature/posix-compat/docs/thread-runtime.md) | | lib-dynlink | [PR 3](https://git.erikinkinen.fi/erix/lib-dynlink/pulls/3), [tls-registry.md](https://git.erikinkinen.fi/erix/lib-dynlink/src/branch/feature/posix-compat/docs/tls-registry.md) | | lib-elf | [PR 2](https://git.erikinkinen.fi/erix/lib-elf/pulls/2) | | lib-ipc | [PR 2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2), [relocation-patches.md](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/relocation-patches.md) | | loaderd | [PR 2](https://git.erikinkinen.fi/erix/loaderd/pulls/2) | | posixd | [PR 5](https://git.erikinkinen.fi/erix/posixd/pulls/5) | | procd | [PR 2](https://git.erikinkinen.fi/erix/procd/pulls/2), [client-thread-factory.md](https://git.erikinkinen.fi/erix/procd/src/branch/feature/posix-compat/docs/client-thread-factory.md), [initial-tls-materialization.md](https://git.erikinkinen.fi/erix/procd/src/branch/feature/posix-compat/docs/initial-tls-materialization.md) | | rootd | [PR 2](https://git.erikinkinen.fi/erix/rootd/pulls/2) | </details>
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:43 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/lib-dynlink#4
No description provided.