[BUG] Physical range refusal can leave an untracked published prefix #36
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/kernel#36
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The original physical-range installer published one page before preparing the next. A later page failure could therefore leave earlier user leaves while the caller had not yet published its range row or installed-backing flag. The correction prepares every affected PT before any requested leaf publication, under one table lock and masked-interrupt scope.
Reproduction
Three controlled host tests use the exact original map_physical_range_pages loop from signed Kernel
2a4cbd2ef4d42aca62876da55fce33476912c620. An explicit fixture-owned page-effect adapter refuses the second page at0x40000000, a PT/PD boundary after first page0x3ffff000. Both WriteBack and WriteCombining tests fail their no-partial-publication assertion, retaining one successful page effect; the first-page-refusal control passes. The earlier abstract third-page refusal, which retained two effects without placing that refusal at a new table boundary, is also preserved separately. Original Rust test status is 101, with one pass and two failures. Source inspection places the caller's new range-row publication after complete loop success. All original sources, hashes and streams are retained without an unchanged failing-input retry.This is execution of the unchanged production loop with a controlled fallible-effect adapter. It does not establish an original native allocation-failure reproduction, practical userspace exploit, or cause of the separate ext4 CI deadlines.
Expected and actual behavior
Refusing a new range before inventory publication must not leave unaccounted user leaves. Complete preparation now reserves one compact descriptor per affected PT and retains its scoped entry key. Structural failure can leave equivalent table splits and ancestor-ceiling propagation, but publishes no requested backing or access. Once every span is ready, all requested stores complete without allocation, fallible traversal or callbacks. Structural errors and successful publication synchronize translations before exclusion ends; overwritten GLOBAL entries receive explicit invalidation.
Scalar, batch and range paths share one explicit physical-entry encoder, preserving read/write/execute and cache policy. No fixed range-count limit, capability, backing grant or activatable private root is added. Caller admission and post-success inventory publication remain unchanged. This correction does not establish atomicity across a whole multi-range VSpace activation.
Environment and identity
Original Kernel
2a4cbd2ef4d42aca62876da55fce33476912c620, Integration7aa451477c8ac5238bb6c334b69a466b2a94996b, Linux x86_64 host and Rust 1.97.1 with strict warnings. Original host effects use exclusive scalar fixture storage and touch no physical memory. Corrected native mapping validation uses original one-CPU TCG/OVMF settings, the 60-second deadline and unchanged grants. Last known working revision and original native exploit reachability are not established.Evidence and prior checks
Six new host controls cover all preparation-failure boundaries, no early leaf writes, exact cross-PT spans, outside leaves, cache/write policy, geometry rejection and GLOBAL invalidation. Four strict host configurations pass 860/884 tests with three existing ignored cases. Sixteen native build/Clippy profiles, formatting and host/native private rustdoc pass without warnings. An initial strict-Clippy complaint in a new test assertion is retained and corrected with explicit parentheses; no lint is suppressed. All 172 Integration helpers pass, while unchanged Rust and profiler sources retain their strict validation.
Six exact-source native executions satisfy seven maintained contracts, including both allocator scenarios and ordinary exec-successor across 73 original components. The new PHYSICAL_RANGE_PUBLICATION_OK witness retains exclusive RAM, verifies actual physical contiguity, exercises three identity aliases across a PT boundary, checks real bytes and write/NX policy, and restores every original alias before releasing backing. The RAM probe retains WriteBack cache policy; WriteCombining encoding is covered by host controls. Exact signed sources and retained packaged artifacts verify without image warnings or QEMU stderr. Every previous witness, grant and deadline remains required.
Integration regression acceptance remains open. Private registered/physical range population, whole-VSpace activation and external toolchain/EriX guest rebuilding remain open.
Tracking
Related owned address-space design, Kernel review, Integration review, corrected catalog and Phase 6 completion.
erikinkinen referenced this issue2026-09-23 14:29:10 +02:00
erikinkinen referenced this issue from erix/integration2026-09-23 14:29:20 +02:00
erikinkinen referenced this issue from erix/docs2026-09-23 14:29:24 +02:00