[BUG] Finish capability-window consumers after native storage refactor #45

Closed
opened 2026-10-04 14:13:41 +02:00 by erikinkinen · 0 comments
Owner

Summary

The native process storage refactor at Kernel 18a15e8777346fac05bfecaef1873cb9453f4a75 removes capability-window fields from TcbRecord, but legacy capability transfer and two control-test modules still refer to those fields. These source references prevent coherent compilation of the affected native/test configurations. The issue was found by source audit; no compiler or test run was executed.

Reproduction

Read that exact revision's src/kobj/tcb/state.rs, src/kobj/endpoint/runtime_prelude.rs, src/ipc/control/tests/rootless_creation.rs and src/arch/x86_64/syscall/query_local_cap_tests.rs. Compare TcbRecord's declared fields with the latter modules' record.cspace_window_base/len and child.cspace_window_base/len references. This mismatch is deterministic at the listed revision. Reading immutable source is sufficient to observe it; compilation is currently deferred.

Expected and actual behavior

All TCB consumers must observe or enforce the sole original process window. Actual source still accesses removed per-TCB policy fields. Legacy transfer should call the validated original-owner predicate, rootless controls should observe the actual process window, and malformed-window controls should assert rejection without mutating a descriptive snapshot. Staged request-envelope window fields remain valid and must not be removed.

Environment and identity

  • Component repository/revision and Integration source graph: Kernel source, adopted by Integration.
  • Image profile, digest and build/runtime configuration: no new image built; legacy native transfer source and unit-test configurations are affected.
  • Hardware or VM, architecture, firmware and toolchain versions: x86_64 source, Rust edition 2021; no VM/compiler execution or firmware result.
  • Input/session route and granted authority relevant to reproduction: existing capability-transfer and caller-local introspection routes; no new authority or wire framing required.
  • Last known working revision, if known: before storage refactor still declares those fields.

Evidence and prior checks

The removed declaration and surviving field accesses are direct source observations. No compiler error text, successful compilation, unit/VM pass or CI result is claimed. Complete the full source consumer migration and update stale backing-lifetime documentation. Rustfmt application and source/reference bookkeeping remain separate from deferred product checks.

Tracking

Native implementation, Kernel review, process storage contract, and phase completion. The issue may close when all listed source consumers migrate and coherent signed adoption is published; execution validation remains deferred.

Resolution

Kernel's complete consumer migration replaces every remaining removed-TCB-window reference with original-owner admission or observation. Rootless and malformed-window controls retain exact refusal/ceiling coverage, and backing-lifetime documentation reflects the actual process owner. Integration adopts that signed revision in every applicable catalog; compiled helper and Rootd remain unchanged. Rustfmt is applied. Read-only source inventory confirms only valid staged request-envelope window fields remain. The source defect is resolved; compilation, tests, lint, VM/profiler execution and CI observation remain deferred.

## Summary The native process storage refactor at Kernel `18a15e8777346fac05bfecaef1873cb9453f4a75` removes capability-window fields from TcbRecord, but legacy capability transfer and two control-test modules still refer to those fields. These source references prevent coherent compilation of the affected native/test configurations. The issue was found by source audit; no compiler or test run was executed. ## Reproduction Read that exact revision's `src/kobj/tcb/state.rs`, `src/kobj/endpoint/runtime_prelude.rs`, `src/ipc/control/tests/rootless_creation.rs` and `src/arch/x86_64/syscall/query_local_cap_tests.rs`. Compare TcbRecord's declared fields with the latter modules' `record.cspace_window_base/len` and `child.cspace_window_base/len` references. This mismatch is deterministic at the listed revision. Reading immutable source is sufficient to observe it; compilation is currently deferred. ## Expected and actual behavior All TCB consumers must observe or enforce the sole original process window. Actual source still accesses removed per-TCB policy fields. Legacy transfer should call the validated original-owner predicate, rootless controls should observe the actual process window, and malformed-window controls should assert rejection without mutating a descriptive snapshot. Staged request-envelope window fields remain valid and must not be removed. ## Environment and identity - Component repository/revision and Integration source graph: [Kernel source](https://git.erikinkinen.fi/erix/kernel/commit/18a15e8777346fac05bfecaef1873cb9453f4a75), adopted by [Integration](https://git.erikinkinen.fi/erix/integration/commit/a75b241a5cb8772a1c5794f8412c662fb41405ae). - Image profile, digest and build/runtime configuration: no new image built; legacy native transfer source and unit-test configurations are affected. - Hardware or VM, architecture, firmware and toolchain versions: x86_64 source, Rust edition 2021; no VM/compiler execution or firmware result. - Input/session route and granted authority relevant to reproduction: existing capability-transfer and caller-local introspection routes; no new authority or wire framing required. - Last known working revision, if known: [before storage refactor](https://git.erikinkinen.fi/erix/kernel/commit/9660dacf70b80cfce387046e5df6e54232f8619e) still declares those fields. ## Evidence and prior checks The removed declaration and surviving field accesses are direct source observations. No compiler error text, successful compilation, unit/VM pass or CI result is claimed. Complete the full source consumer migration and update stale backing-lifetime documentation. Rustfmt application and source/reference bookkeeping remain separate from deferred product checks. ## Tracking [Native implementation](https://git.erikinkinen.fi/erix/kernel/issues/1), [Kernel review](https://git.erikinkinen.fi/erix/kernel/pulls/3), [process storage contract](https://git.erikinkinen.fi/erix/kernel/src/branch/feature/posix-compat/docs/process-lifetime-storage.md), and [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). The issue may close when all listed source consumers migrate and coherent signed adoption is published; execution validation remains deferred. ## Resolution [Kernel's complete consumer migration](https://git.erikinkinen.fi/erix/kernel/commit/3da30847eec90f47a346f020c45f35b7047b76f4) replaces every remaining removed-TCB-window reference with original-owner admission or observation. Rootless and malformed-window controls retain exact refusal/ceiling coverage, and backing-lifetime documentation reflects the actual process owner. [Integration adopts that signed revision](https://git.erikinkinen.fi/erix/integration/commit/4186b699edc25ac934d41177ef807e74e27924d8) in every applicable catalog; compiled helper and Rootd remain unchanged. Rustfmt is applied. Read-only source inventory confirms only valid staged request-envelope window fields remain. The source defect is resolved; compilation, tests, lint, VM/profiler execution and CI observation remain deferred.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:29 +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/kernel#45
No description provided.