Capability-Based Computer Architecture
A capability combines an address with authority to use it. CHERI bounds and permissions make many spatial safety checks part of the instruction semantics.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 1 min
In this article3 chapters
Authority must survive derivation safely
A capability can describe an accessible address range, allowed operations and additional validity information. Derivation should not increase authority. A simplified invariant for a restricted capability is
\[ R'\subseteq R,\qquad P'\subseteq P . \]
The first inclusion restricts the address range, and the second restricts permissions. A hardware tag distinguishes capability values from ordinary bit patterns. Ordinary stores therefore cannot freely manufacture a valid capability with broader rights. Architectures using compressed metadata define which bounds are exactly representable and what a bounds-setting operation guarantees.
A capability combines designation and authority. For memory, the bounds and lifetime contract still determines which subset of accesses is valid under that authority.
A slice demonstrates delegated authority
An allocator returns a capability for a buffer. Code can derive a read-only capability for a subrange and pass it to a parser. The recipient can inspect that slice through the supplied authority. It cannot widen it back to the original buffer merely by changing the address field. This protects spatial bounds only if the rest of the invocation does not provide broader capabilities through another path. Compartment interfaces must therefore account for all authority available to their recipients.
Lifetime remains a separate property
A tagged capability may still exist after its allocation is no longer intended for use. Temporal safety then needs an additional mechanism such as revocation, controlled reuse or a lifetime discipline. Memory permissions also do not characterize speculative observations by themselves. Compare software linear types and ownership, separation logic, and defenses for speculative execution.[1][2]