Expand description
Capability system for the RVM coherence-native microhypervisor.
Implements the three-layer proof system specified in ADR-135:
| Layer | Name | Budget | v1 Status |
|---|---|---|---|
| P1 | Capability Check | < 1 us | Ship |
| P2 | Policy Validation | < 100 us | Ship |
| P3 | Deep Proof | < 10 ms | Deferred |
§Core Concepts
- Capability: Unforgeable kernel-managed token with rights bitmap.
- Derivation Tree: Parent-child relationships with monotonic attenuation.
- Delegation Depth: Max 8 levels to prevent unbounded chains.
- Epoch-based revocation: Stale handles detected via epoch counter.
§Design Principles (ADR-135)
- A partition can only grant capabilities it holds
- Granted rights must be equal or fewer than held rights
- Revocation propagates through the derivation tree
GRANT_ONCEprovides non-transitive delegation- Epoch-based invalidation detects stale handles
Structs§
- CapManager
Config - Configuration for the capability manager.
- CapRights
- Access rights bitmap carried by a capability (ADR-132, DC-3/DC-8).
- CapSlot
- A slot in the capability table.
- CapToken
- An unforgeable capability token.
- Capability
Manager - The main capability manager.
- Capability
Table - Fixed-size capability table for a partition.
- Derivation
Node - A node in the derivation tree.
- Derivation
Tree - Derivation tree for tracking parent-child capability relationships.
- Grant
Policy - Policy configuration for capability grants.
- Manager
Stats - Statistics about capability manager operations.
- Proof
Verifier - Three-layer proof verifier.
- Revoke
Result - Result of a revocation operation.
Enums§
- CapError
- Errors from capability table and derivation operations.
- CapType
- The type of resource a capability refers to.
- Proof
Error - Errors from proof verification (ADR-135 three-layer system).
Constants§
- DEFAULT_
CAP_ TABLE_ CAPACITY - Default capability table capacity per partition.
- DEFAULT_
MAX_ DELEGATION_ DEPTH - Default maximum delegation depth (ADR-135 Section: Capability Derivation Tree).
Functions§
- revoke_
single - Revokes a single capability without propagation.
Type Aliases§
- CapResult
- Shorthand result type for capability operations.