WIP: Retain native capability access through transfer settlement #132

Draft
erikinkinen wants to merge 22 commits from feature/native-capability-exclusion into feature/native-reply-acceptance
Owner

Hold one native capability-access owner from source admission through transfer publication or rollback. Keep unpublished destinations, source bindings, rights and revocation lineage under that same exclusion. Same-CPU reentry refuses before taking object locks instead of borrowing another operation's authority.

Depends on #131; implements part of #11. See the capability-access contract. Private-root activation and native multi-process acceptance remain required by the owning work.

  • Retain original capability-access ownership through admission and settlement.
  • Cover exclusion, refused reentry, source preservation and rollback.
  • Pass all eleven original local component gates without compiler warnings.
  • Complete current-head public CI and required native integration acceptance.
Hold one native capability-access owner from source admission through transfer publication or rollback. Keep unpublished destinations, source bindings, rights and revocation lineage under that same exclusion. Same-CPU reentry refuses before taking object locks instead of borrowing another operation's authority. Depends on #131; implements part of #11. See [the capability-access contract](https://git.erikinkinen.fi/erix/kernel/src/branch/feature/native-capability-exclusion/docs/native-capability-access.md). Private-root activation and native multi-process acceptance remain required by the owning work. - [x] Retain original capability-access ownership through admission and settlement. - [x] Cover exclusion, refused reentry, source preservation and rollback. - [x] Pass all eleven original local component gates without compiler warnings. - [ ] Complete current-head public CI and required native integration acceptance.
erikinkinen added this to the Alpha 1 milestone 2026-11-13 06:04:10 +01:00
Retain actual unique source records and reserve destination storage before publishing native aliases, lineage and capability slots. Borrow one operation exclusion through defining CSpace and binding operations; refuse native contention before admission instead of waiting with interrupts masked.

This private checkpoint remains incomplete: legacy lifecycle and terminal observers still require explicit outer exclusion threading. It is not ready for composition or publication and does not establish native SMP progress or accepted compiler provenance.

(cherry picked from commit b31d18141c077396f8fbae28bc61a29c5bce70ed)
Admit the real operation exclusion before lifecycle and terminal effects, then borrow it through lifetime preflight, exact receiver retirement and root capability removal. Remove the old production void retirement and raw lineage notification routes rather than acquiring access after terminal effects.

This private continuation remains incomplete while native carrier and other legacy observer boundaries are migrated; it is not a publication or native progress checkpoint.

(cherry picked from commit 07e05c2a0720a70768479f29983113889e048418)
Exercise abort and allocation-free commit with an independently prepared original native factory. Require the same real native record and process association to survive abort or move with exactly the attenuated rights; copied metadata cannot satisfy these controls.

(cherry picked from commit 1b5c2c25592f99f948f1d71eb3081eedbb1a82fa)
Admit access before one-way process cleanup custody and borrow it through remote carrier retirement, install-grant invalidation, CSpace destruction and the original VSpace release. Direct VSpace retirement now has a defining already-held route so callers do not reacquire below native locks.

This private source remains incomplete until native registration reuse and remaining observer/admission routes are accounted for; publication and native progress acceptance remain open.

(cherry picked from commit 93863744e7fe996a25d984868c2ab74efb589704)
Retain occupied native storage when an unpublished preparation takes the original install or revocation record. Defining producers now distinguish empty cells from pending reservations, and the actual owner alone restores its original reserved cell on commit or abort.

This closes native row reuse without treating a descriptor, slot index or reserved marker as source authority. Remaining admission and observer migrations keep the overall private capability-transfer feature incomplete.

(cherry picked from commit 104a0662b776ae12cb422a52a54617d6d2fed6cb)
Hold the actual original grant for a real Created child while the defining native table inserts an independent record. Require occupied reservation storage, a distinct new registration and restoration of the original child scope before its final removal.

(cherry picked from commit edfeaf0ff47bca57a2803a25afc9e009286d7059)
Admit capability access before native lifecycle entry and pass the same owner through factory and member creation, context, enrollment, Start, observation, execution watches and initial TLS. Keep genuine source stage and factory admissions borrowed from that exclusion until their native construction completes.

Creator claims resolve their actual retained delivery and native route through already-held operations. Wider invocation observers and legacy relocation still require migration before this private feature can be composed or published.

(cherry picked from commit d3ed2bf4091d2cbbb5145d985dcdefe0ab9c228f)
Pass one actual capability exclusion through native request admission, packet access, route checks, delivery, collection and accounted disposal. Capability transitions now prepare real unpublished owners, and native terminal retirement borrows the same exclusion instead of recursively acquiring it.

Use a defining current-local carrier admission for relocation without delegation rights, preserving actual ownership and exact masks. Wider control and typed observer migration remains private work before this feature can be composed or published.

(cherry picked from commit e67e54ba8754b3dcf1c048eb4267edf79d599528)
Borrow the actual capability and native-registration owner through grant creation, derivation, census, child installation and endpoint attenuation. Retain the defining source registration until the operation ends instead of allowing a copied grant observation to survive revocation before use.

Explicit already-held routes support native control composition without reacquiring below lifecycle or TCB locks. Remaining control dispatch and typed binding observers keep this private feature unfinished.

(cherry picked from commit 656cca2b22699011294eba84f6c58e0c1b0cd144)
Borrow original capability access through RAM frame allocation, VSpace map and unmap operations, mapping observations and device-frame binding publication. Resolve identity and rights under the same owner that remains live through the native effect, rather than retaining only a copied slot observation.

Remove the unused staged-capability observation helper. Native control and ordinary endpoint entry still need their explicit outer-access propagation before the complete private transfer feature can be reviewed.

(cherry picked from commit 38710ccc75e84dc8284d399695fdd8c719e3d40d)
Pass original capability exclusion through native control checks, process construction and backend effects. Separate registration and memory dispatch by purpose, and retain the actual access through native registration and removal callbacks.

Admit late cleanup before inspecting pending duties, preserving their original ownership and first failures on Busy. Expose the existing lifecycle lock through its actual noncopy owner for response callback composition. Native return placement and the genuine response-owner join remain open private implementation work.

(cherry picked from commit 3facda86d9b8078f986b272e667df5de534e553d)
Keep root and sealed-source authentication, one-shot consumption and endpoint removal under original capability exclusion. Standalone retirement admits before authentication; held control dispatch never reacquires below its source checks.

(cherry picked from commit 8594ea62aa895aefb921fbeef5a7d432b0f25b31)
Document the actual exclusion owner, immediate native contention, borrowed participants and unpublished transfer publication or rollback. Distinguish synchronization admission from object authority and from hardware private-root activation.
Keep the borrowed-access product operations and remove unused access-free forwarding functions. Retain only genuine host or native diagnostic entry points under their actual configurations, preserve lexical exclusion witnesses, and reuse the staged constructor request without changing refusal order.
Keep the revocation lifetime controls independent of unused product imports and remove redundant test reexports. Preserve the same real CSpace operations and refusal assertions.
Propagate rejected control arguments directly while preserving the existing error and admission order.
Keep the standalone lookup for its host controls and native lifetime and allocator diagnostics. Product mapping and invocation paths already borrow their actual outer capability admission.
Export the interrupt mask once and keep terminal helpers inside their defining module until an external native control route consumes them.
Native capability operations use immediate admission and retain no queued ticket. Compile the blocking FIFO acquisition only for the host implementation that actually consumes it.
Use the control operation’s existing capability exclusion for installing, binding and rolling back the derived frame. Reentering standalone admission under the same operation deadlocked hosted dispatch and refused native construction.
Keep standalone device binding for its existing host controls and native lifetime witness. Product PCI construction now retains its original outer capability admission.
test: Enter native packet lifecycle exactly once
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 6m19s
e3933b2080
The packet fixture already acquires original capability and lifecycle admission. Remove the redundant outer lifecycle calls that recursively locked the same exclusion before the fixture could execute its assertions.
All checks were successful
CI / test (pull_request) Has been skipped
CI / markdown (pull_request) Has been skipped
CI / markdown (push) Successful in 3s
CI / test (push) Successful in 6m19s
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feature/native-capability-exclusion:feature/native-capability-exclusion'
git switch 'feature/native-capability-exclusion'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'feature/native-reply-acceptance'
git merge --no-ff 'feature/native-capability-exclusion'
git switch 'feature/native-capability-exclusion'
git rebase 'feature/native-reply-acceptance'
git switch 'feature/native-reply-acceptance'
git merge --ff-only 'feature/native-capability-exclusion'
git switch 'feature/native-capability-exclusion'
git rebase 'feature/native-reply-acceptance'
git switch 'feature/native-reply-acceptance'
git merge --no-ff 'feature/native-capability-exclusion'
git switch 'feature/native-reply-acceptance'
git merge --squash 'feature/native-capability-exclusion'
git switch 'feature/native-reply-acceptance'
git merge --ff-only 'feature/native-capability-exclusion'
git switch 'feature/native-reply-acceptance'
git merge 'feature/native-capability-exclusion'
git push origin 'feature/native-reply-acceptance'
Sign in to join this conversation.
No description provided.