[BUG] Preserve scope cleanup identity through native Close disposal #10
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/vfsd#10
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
Implemented in the coordinated signed VFS and Launchd correction. Original cleanup identity now survives provider closure through native delivery and receiver disposal; correlated pending disposal retains Launchd custody for later turns. Eight regression controls are authored and unrun.
Historical source-observed defect:
Acquisition-scope Close clears its original private cleanup key after provider retirement, before a retained native Close delivery finishes receiver disposal. A private cleanup query can therefore acknowledge an absent key while that original receiver still has a counted disposal obligation. The native delivery row remains retained and ordinary scope operations are already disabled; this report concerns premature cleanup acknowledgment, not a demonstrated access bypass.
Reproduction
Source-derived, unexecuted sequence: admit an owned exact-endpoint Close on a live acquisition scope. The first serving turn invokes
close_exact_object, retires its provider owners, clears the scope key and removes descriptive metadata. Native completion and receiver DROP occur in a subsequentfinish_exact_invocationturn. Query private retirement using the original scope key during this interval, or while receiver disposal is still pending.scope_indexsees no scope owner andretire_acquisition_scopereturns OK immediately.This sequence has been identified by source inspection only. No test, image or CI execution has been performed, and an observed runtime failure is not claimed.
Expected and actual behavior
Expected: original-key cleanup must retain and account for receiver/native-delivery obligations until they are positively settled. Provider Close alone cannot establish complete scope cleanup. The counted key, original delivery and receiver must survive delayed or failed completion without admitting new use or permitting row reuse.
Actual in source: the delivery remains counted, but its original scope key is cleared before the native disposal barrier. Private key absence is then treated as complete cleanup. Preserve original key correlation through native completion and receiver disposal, including failure and concurrent authorized cleanup paths.
Environment and identity
764a6a762465caf3d8e5abce24402720e2192ae4onfeature/posix-compat.590c5e77587765af76f1e7c9fd039330a3dcb9ec.Evidence and prior checks
The scope Close lifetime defect is corrected and closed: vfsd
e10522c0, launchd2690e09e, integration4f2aff8e, docsd963ebc5.VFS retains the original private cleanup key after provider Close and descriptive metadata removal. The counted owner prevents row reuse through delayed delivery retirement and failed receiver disposal. Ordinary owned Close attempts its original completion at most once and keeps the key until native custody and receiver disposal settle. Legacy Close preserves its reply and disposal boundary as well.
Private revocation can supersede a pending Close reply. It suppresses that reply, invalidates the receiver and returns fully correlated BUSY while original delivery remains counted; subsequent exact turns relinquish that original owner. Launchd retains its cleanup obligation and retries on later scheduler turns. BUSY no longer poisons retirement, while wrong keys, generations, request correlations and contradictory result layers remain errors. No provider effect or native completion is replayed.
Five VFS and three Launchd regression controls are authored and unrun. They cover delayed native drain, positive completion followed by failed receiver disposal, private revocation during Close or an ordinary pending reply, stale cleanup after row reuse, and complete pending-result correlation. Existing native controls share the same independent fixture. Rustfmt was applied; component contracts and maintained manual TeX are updated.
Full realm open/openat, complete path/permission mediation, parent/symlink/mount transitions, conditional creation/append, descriptor publication/serving and native workloads remain unfinished. Both EriX guest-build generations and the external Rust/LLVM guest rebuild remain required. No runtime checklist acceptance is added: 16.91% weighted, 21/460 parents and 441/902 sub-items. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred; no execution pass is claimed.
Earlier evidence (historical; superseded where the current checkpoint above advances it):
Native scoped component dispatch is implemented and published: lib-ipc
c0d3bec1, vfsd764a6a76, integration590c5e77, docsdf1fb3c2.Actual acquisition endpoints now select original root, cwd or counted candidates for permission evidence, complete ACL pages, conditional no-follow pinning and original-key retirement. Root and cwd descendants retain distinct original provider branches; no request supplies provider handles, mounts or replacement routes. The consumer retains its candidate key before submission. VFS counts the original owner and reserves both provider correlations before effects, fences replay across the complete nonzero key domain and preserves unknown outcomes for cleanup.
Native write ceilings precede permission observation. Every ACL page retains full target/object/revision/ordinal correlation and forwards its entries in place. Cleanup uses the original pre-reserved correlation without needing a returned handle. Private whole-scope revocation disables new use and attempts every child before disposing either anchor, so consumer loss cannot strand independently owned candidates. Public Close refuses live children; native delivery and receiver custody still settle independently.
Five shared-wire and seven actual VFS dispatch/state controls are authored and unrun. They cover literal framing, raw names, scope/branch isolation, lost replies, uncertain cleanup, exhaustion, ACL pages and whole-scope revocation. Existing custody regressions remain; fixture-only acquisition helpers are removed from production builds. Refused owner insertion leaves incoming custody with its original caller. Native adapter code is split by responsibility. Rustfmt was applied and component contracts/manual TeX are updated.
A further source audit identified premature scope-cleanup acknowledgment during native Close. The original delivery remains counted, but its scope cleanup key is cleared before receiver disposal finishes. This non-security lifecycle report is open for implementation; no observed runtime failure or access bypass is claimed. Fixing that ordering is the next priority.
Full realm open/openat remains open. Posixd still needs complete retained path walking, parent/symlink/mount transitions, sealed credential mediation, conditional creation/append, final descriptor publication and ordinary fd serving. Native open/openat workloads and both full EriX guest-build generations plus the Rust/LLVM guest rebuild remain unfinished. This checkpoint adds no full-item acceptance: 16.91% weighted, 21/460 parents and 441/902 sub-items. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred; no execution pass or measured speedup is claimed.
Earlier evidence (historical; superseded where the current checkpoint above advances it):
Inspect
src/exact_objects.rs(close_exact_object),src/exact_invocation/serving.rs(advance_exact_invocationandfinish_exact_invocation),src/handles/scope.rs(scope_index) andsrc/acquisition_scope.rs(retire_acquisition_scope) at the component revision above. Provider custody and native delivery custody remain separate, but the original cleanup selector currently disappears between their barriers. Add explicit delayed-completion, receiver-disposal failure and private-cleanup controls while preserving the existing counted owner.Tracking
Related Vfsd implementation PR, realm open/openat, and Phase 6 master issue.
erikinkinen referenced this issue from erix/blockd2026-09-29 22:32:25 +02:00
erikinkinen referenced this issue from erix/coreutils2026-09-29 22:32:26 +02:00
erikinkinen referenced this issue from erix/crashd2026-09-29 22:32:27 +02:00
erikinkinen referenced this issue from erix/deviced2026-09-29 22:32:27 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 22:32:28 +02:00
erikinkinen referenced this issue from erix/drv-acpi2026-09-29 22:32:29 +02:00
erikinkinen referenced this issue from erix/drv-i80422026-09-29 22:32:29 +02:00
erikinkinen referenced this issue from erix/drv-ps2-keyboard2026-09-29 22:32:30 +02:00
erikinkinen referenced this issue from erix/drv-ps2-mouse2026-09-29 22:32:30 +02:00
erikinkinen referenced this issue from erix/drv-rtc-cmos2026-09-29 22:32:31 +02:00
erikinkinen referenced this issue from erix/drv-serial2026-09-29 22:32:31 +02:00
erikinkinen referenced this issue from erix/drv-virtio-block2026-09-29 22:32:32 +02:00
erikinkinen referenced this issue from erix/dynlinkd2026-09-29 22:32:33 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-09-29 22:32:33 +02:00
erikinkinen referenced this issue from erix/exsh2026-09-29 22:32:34 +02:00
erikinkinen referenced this issue from erix/extop2026-09-29 22:32:35 +02:00
erikinkinen referenced this issue from erix/fatd2026-09-29 22:32:35 +02:00
erikinkinen referenced this issue from erix/fbcond2026-09-29 22:32:36 +02:00
erikinkinen referenced this issue from erix/hotplugd2026-09-29 22:32:36 +02:00
erikinkinen referenced this issue from erix/inputd2026-09-29 22:32:37 +02:00
erikinkinen referenced this issue from erix/integration2026-09-29 22:32:38 +02:00
erikinkinen referenced this issue from erix/irqd2026-09-29 22:32:39 +02:00
erikinkinen referenced this issue from erix/kernel2026-09-29 22:32:40 +02:00
erikinkinen referenced this issue from erix/keyd2026-09-29 22:32:40 +02:00
erikinkinen referenced this issue from erix/launchd2026-09-29 22:32:41 +02:00
erikinkinen referenced this issue from erix/lib-block2026-09-29 22:32:41 +02:00
erikinkinen referenced this issue from erix/lib-bootstrap2026-09-29 22:32:42 +02:00
erikinkinen referenced this issue from erix/lib-capabi2026-09-29 22:32:43 +02:00
erikinkinen referenced this issue from erix/lib-driver2026-09-29 22:32:44 +02:00
erikinkinen referenced this issue from erix/lib-input2026-09-29 22:32:44 +02:00
erikinkinen referenced this issue from erix/lib-interrupt2026-09-29 22:32:45 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-29 22:32:46 +02:00
erikinkinen referenced this issue from erix/lib-log2026-09-29 22:32:47 +02:00
erikinkinen referenced this issue from erix/lib-posixabi2026-09-29 22:32:47 +02:00
erikinkinen referenced this issue from erix/lib-service2026-09-29 22:32:48 +02:00
erikinkinen referenced this issue from erix/lib-stdio2026-09-29 22:32:49 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-29 22:32:49 +02:00
erikinkinen referenced this issue from erix/lib-tty2026-09-29 22:32:50 +02:00
erikinkinen referenced this issue from erix/lib-vfs2026-09-29 22:32:50 +02:00
erikinkinen referenced this issue from erix/loaderd2026-09-29 22:32:51 +02:00
erikinkinen referenced this issue from erix/logd2026-09-29 22:32:51 +02:00
erikinkinen referenced this issue from erix/memd2026-09-29 22:32:52 +02:00
erikinkinen referenced this issue from erix/named2026-09-29 22:32:52 +02:00
erikinkinen referenced this issue from erix/pagerd2026-09-29 22:32:53 +02:00
erikinkinen referenced this issue from erix/posixd2026-09-29 22:32:53 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-09-29 22:32:54 +02:00
erikinkinen referenced this issue from erix/probed2026-09-29 22:32:54 +02:00
erikinkinen referenced this issue from erix/procd2026-09-29 22:32:55 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-09-29 22:32:55 +02:00
erikinkinen referenced this issue from erix/rootd2026-09-29 22:32:56 +02:00
erikinkinen referenced this issue from erix/seriald2026-09-29 22:32:56 +02:00
erikinkinen referenced this issue from erix/timed2026-09-29 22:32:57 +02:00
erikinkinen referenced this issue from erix/ttyd2026-09-29 22:32:57 +02:00
erikinkinen referenced this issue2026-09-29 22:32:58 +02:00
erikinkinen referenced this issue from erix/vspaced2026-09-29 22:32:58 +02:00