Definition
Capability hardware security is the class of processor designs that enforce memory safety and authority at the hardware level by requiring code to possess and present a capability (an unforgeable, hardware-protected token) for every memory access. Rather than relying solely on virtual-memory-based privilege rings, the capability itself carries the address, bounds, and permissions that the hardware checks on use. The defining property is that the intended capability must be quoted on access, so the executing code's authority is explicit and decentralised, rather than inferred from a global configuration.
CHERI as the Canonical Example
The CHERI ISA is the reference implementation of capability hardware security. In CHERI, ordinary pointers are replaced (or augmented) by capabilities that include bounds and permission bits, and the hardware traps any access that violates those fields. The thesis document UCAM-CL-TR-984 frames CHERI as "hardware enforcing properties inferred from the programmer's code".
CHERI was first demonstrated on a MIPS processor, but UCAM-CL-TR-984 adapts it to RISC-V, motivated by RISC-V's openness and growing research adoption. In parallel, Arm's Morello program produced a research prototype of a CHERI-augmented high-performance core, indicating that capability hardware security is being explored across multiple contemporary ISAs. Three concrete RISC-V instantiations are discussed in the hypotheses section: Piccolo (microcontroller class), Flute (mid-range), and Toooba (application class, out-of-order superscalar), which together span the microcontroller-to-server spectrum.
Comparison with Physical Memory Protection (PMP / MPU)
Capability hardware security is most usefully understood in contrast to the Physical Memory Protection (PMP) mechanism found on RISC-V and the more general Memory Protection Unit (MPU) used on MMU-less embedded cores. The key contrasts drawn in UCAM-CL-TR-984 §2.2.1.2 are:
- Granularity. A PMP exposes a fixed set of regions (16 or 64 entries depending on implementation) configured through Control and Status Registers (CSRs). Capabilities, by contrast, can be created with arbitrary bounds and can be as fine-grained as the application requires.
- Intentionality. PMP performs no check that the executing code intended to access a region; it enforces a global set of permitted regions. Capabilities require the intended capability to be quoted, so accesses are bound to the authority the calling code actually holds.
- Delegation and compartmentalisation. Different access rights to the same physical region cannot be delegated to different compartments under PMP without reconfiguring the PMP on every context switch, because access control is global. Capabilities can be copied and narrowed to grant per-compartment views without disturbing other compartments.
- Privilege of reconfiguration. PMP entries can only be modified in machine mode, so user code cannot protect itself. Capabilities can be manipulated by user code within the bounds of its existing authority.
- Lookup cost. PMP performs an associative lookup across all configured regions on every access, and its area and power cost scale linearly with the number of PMP registers. Capabilities avoid associative lookups because the relevant authority is named by the capability being used.
- Revocation. Revocation is simpler under PMP — one need only add a PMP entry that denies the region. In a capability system, revocation requires guaranteeing that no outstanding capability to the region exists, typically by scanning or maintaining a global invariant, because authority is decentralised.
- Compatibility with existing code. PMP can protect existing binaries unchanged. Capabilities, in their full form, require at least recompilation (and often source modification) to provide their strongest guarantees.
- Authority centralisation. PMP centralises authority in a small set of configuration CSRs, which is why reasoning about security and revocation is straightforward but expressive power is limited. Capability hardware decentralises authority, which is more expressive but can make global security reasoning and revocation harder.
The document concludes that the security offered by PMP is a subset of what capabilities provide: PMP can restrict which regions are accessible, but it cannot express per-compartment authority at fine granularity.
Relationship to Spatial Safety and Language-Level Approaches
Capability hardware security is presented as one of three strategies for achieving spatial safety in systems written in C and C++. The other two are:
- Hardware memory protection (MMU, MPU, PMP). Provides isolation between processes but, on its own, does not give fine-grained, per-pointer spatial safety inside a single process.
- Safe languages. Languages such as Java, C#, and Python obtain spatial safety through dynamic bounds checks, runtime length metadata, and managed-runtime pointer treatment. UCAM-CL-TR-984 notes that even if a universally adopted safe language emerged, billions of lines of critical C and C++ code are already deployed and will continue to be relied upon until replaced, which motivates retrofitting safety onto C/C++ rather than waiting for language change.
Capability hardware security is positioned as a way to obtain language-like spatial safety guarantees for existing C and C++ code by changing the hardware and compiler, leaving source code largely unchanged in style.
Stated Hypotheses About Capability Hardware Security
UCAM-CL-TR-984 articulates four working hypotheses about the feasibility and cost of capability hardware security when retargeted to RISC-V:
- H.1. CHERI can provide spatial safety for RISC-V microcontrollers with small area, power, clock-frequency, and performance impact.
- H.2. CHERI can provide spatial safety for RISC-V out-of-order superscalar application-class cores, with small area, power, clock-frequency, and performance impact, despite the need to integrate with load/store queues, reorder buffers, multiple pipelines, and deep speculation.
- H.3. The area, power, and performance impact of CHERI becomes less significant for larger cores, because capability-related structures (register file, datapath) are a smaller fraction of the core, while unmodified structures (floating point, caches, branch prediction) dominate.
- H.4. Temporal safety (a class of memory safety less naturally addressed by capabilities alone) can be implemented efficiently atop CHERI for RISC-V.
These hypotheses frame capability hardware security as a scalable design point: cheap enough for microcontrollers, expressive enough for application-class cores, and a useful substrate for additional safety properties beyond pure capability checks.
Implications for Microarchitecture
Because capability hardware security changes the meaning and width of pointer-like values, it interacts with several microarchitectural structures. UCAM-CL-TR-984 notes that adapting CHERI to RISC-V raises open questions about composition with advanced microarchitectural techniques used in contemporary processors, including load/store queues, reorder buffers, and deep speculation in out-of-order designs, where the speculative nature of accesses may diminish CHERI's effectiveness. Conversely, on microcontroller-class cores the central design question is whether the additional logic (tag bits, bounds checks, capability ALU paths) fits within the area, power, and timing budget of small embedded designs.