[BUG] Reject legitimate compiler-runtime trait imports during dynamic Kernel loading #35

Closed
opened 2026-11-13 16:10:39 +01:00 by erikinkinen · 1 comment
Owner

Summary

A genuine dynamically linked Kernel image cannot load LibIPC because the loader rejects a compiler-runtime trait implementation that the linked Kernel exports. The runtime-provider policy recognizes a few mangled-name prefixes rather than the complete explicitly selected runtime provider.

Reproduction

Build Kernel #141 at 2283a3821a2bb4fd94ab7310fedd05405976dd05 using Integration's real registry-backed producer at 5bb91d1e59c92f83efe79774c897431bf3e13615, Handoff #11 and IPC #194. Package the generated Kernel, eight shared objects, boot store, image manifest and early manifest through Bootloader #32's authenticated fixture producer. Boot with x86-64 QEMU/OVMF and one vCPU.

Expected and actual behavior

The loader should resolve explicitly declared compiler-runtime imports from the original selected Kernel runtime provider and reject unrelated Kernel symbols. Instead it stops before Kernel entry with ERIX_BOOTLOADER:KERNEL_DYNLINK_UNRESOLVED_SYMBOL.

The observed missing import is core's bool implementation of fmt::Display. It is defined in the real Kernel dynamic symbol table, but the loader's prefix rules reject its trait-implementation spelling.

Environment and identity

  • Bootloader: 8d98cb73393b5d104418eae4549f2859c2d29307, console release.
  • Kernel: #141; LibIPC #194; LibHandoff #11; Rust 1.93.1.
  • Reference platform: x86-64 QEMU/OVMF, TCG, 1 vCPU, 1 GiB RAM.
  • Authenticated component image uses the public fixture key and explicit dynamic-store blobs; no ambient object search.
  • No known working revision of this exact source graph.

Evidence and prior checks

The original producers completed: eight real shared objects, genuine ET_DYN Kernel with erix_dynlink_entry, generated manifests, signed image verification and authenticated Kernel extraction. The guest verifies the image and captures one processor before the dynamic loader error. Offline symbol inspection finds the rejected import in the Kernel provider; no symbol in this graph is globally missing.

An earlier input omitted the early manifest and stopped with KERNEL_DYNLINK_MISSING_OBJECT; adding the actual generated manifest reaches the distinct symbol-policy failure. Neither run reached Kernel entry or establishes native acceptance.

Tracking

  • Replace guessed mangled-name rules with a versioned explicit runtime-provider export contract derived from the actual selected runtime inputs.
  • Check exact definitions, duplicate/undefined symbols, malformed declarations and unrelated Kernel-symbol refusal.
  • Exercise real trait-implementation imports without widening object lookup scope.
  • Repeat the coherent native topology component cases after the producer and consumer agree.

Related: #32, #34 and Kernel #142.

## Summary A genuine dynamically linked Kernel image cannot load LibIPC because the loader rejects a compiler-runtime trait implementation that the linked Kernel exports. The runtime-provider policy recognizes a few mangled-name prefixes rather than the complete explicitly selected runtime provider. ## Reproduction Build Kernel #141 at `2283a3821a2bb4fd94ab7310fedd05405976dd05` using Integration's real registry-backed producer at `5bb91d1e59c92f83efe79774c897431bf3e13615`, Handoff #11 and IPC #194. Package the generated Kernel, eight shared objects, boot store, image manifest and early manifest through Bootloader #32's authenticated fixture producer. Boot with x86-64 QEMU/OVMF and one vCPU. ## Expected and actual behavior The loader should resolve explicitly declared compiler-runtime imports from the original selected Kernel runtime provider and reject unrelated Kernel symbols. Instead it stops before Kernel entry with `ERIX_BOOTLOADER:KERNEL_DYNLINK_UNRESOLVED_SYMBOL`. The observed missing import is core's `bool` implementation of `fmt::Display`. It is defined in the real Kernel dynamic symbol table, but the loader's prefix rules reject its trait-implementation spelling. ## Environment and identity - Bootloader: `8d98cb73393b5d104418eae4549f2859c2d29307`, console release. - Kernel: #141; LibIPC #194; LibHandoff #11; Rust 1.93.1. - Reference platform: x86-64 QEMU/OVMF, TCG, 1 vCPU, 1 GiB RAM. - Authenticated component image uses the public fixture key and explicit dynamic-store blobs; no ambient object search. - No known working revision of this exact source graph. ## Evidence and prior checks The original producers completed: eight real shared objects, genuine ET_DYN Kernel with `erix_dynlink_entry`, generated manifests, signed image verification and authenticated Kernel extraction. The guest verifies the image and captures one processor before the dynamic loader error. Offline symbol inspection finds the rejected import in the Kernel provider; no symbol in this graph is globally missing. An earlier input omitted the early manifest and stopped with `KERNEL_DYNLINK_MISSING_OBJECT`; adding the actual generated manifest reaches the distinct symbol-policy failure. Neither run reached Kernel entry or establishes native acceptance. ## Tracking - [x] Replace guessed mangled-name rules with a versioned explicit runtime-provider export contract derived from the actual selected runtime inputs. - [x] Check exact definitions, duplicate/undefined symbols, malformed declarations and unrelated Kernel-symbol refusal. - [x] Exercise real trait-implementation imports without widening object lookup scope. - [x] Repeat the coherent native topology component cases after the producer and consumer agree. Related: #32, #34 and [Kernel #142](https://git.erikinkinen.fi/erix/kernel/pulls/142).
erikinkinen added this to the Alpha 1 milestone 2026-11-13 16:10:39 +01:00
Author
Owner

Implemented in Bootloader #36 and Integration #783, with the manual in Docs #101. The genuine rebuilt Kernel declares 30 runtime exports from its selected inputs; the previously rejected trait import resolves without prefix exceptions. Authenticated images now reach Kernel entry and pass the topology data diagnostic on 1, 2 and 4 vCPUs. The repair remains under review; loaded-image ownership and AP execution are separate requirements.

Implemented in [Bootloader #36](https://git.erikinkinen.fi/erix/bootloader/pulls/36) and [Integration #783](https://git.erikinkinen.fi/erix/integration/pulls/783), with the manual in [Docs #101](https://git.erikinkinen.fi/erix/docs/pulls/101). The genuine rebuilt Kernel declares 30 runtime exports from its selected inputs; the previously rejected trait import resolves without prefix exceptions. Authenticated images now reach Kernel entry and pass the topology data diagnostic on 1, 2 and 4 vCPUs. The repair remains under review; loaded-image ownership and AP execution are separate requirements.
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/bootloader#35
No description provided.