CheriBSD
CheriBSD adapts FreeBSD for CHERI-RISC-V and Morello, providing a complete environment for pure-capability software and compartment research.
Testing CHERI with real software requires more than a small runtime. The operating system must save capability registers, preserve tags, load capability-aware binaries, map memory with suitable authority, deliver faults, and expose system calls through a compatible application binary interface (ABI).
CheriBSD provides that full-system environment. It is FreeBSD adapted for CHERI-RISC-V and Arm Morello.
What CheriBSD includes
CheriBSD integrates CHERI across:
- kernel memory and process management
- hybrid and pure-capability ABIs
- program loading and dynamic linking
- system calls and signals
- C and C++ libraries
- debuggers, tracing, and core dumps
- QEMU and hardware targets
- a ports collection containing adapted third-party software
- compartmentalisation mechanisms and evaluations
Because it is derived from FreeBSD, developers can work with familiar Unix tools, source layouts, network stacks, filesystems, and application interfaces.
Supported development routes
CHERI-RISC-V in QEMU
This is the most accessible application-class route. cheribuild builds the CHERI compiler, QEMU, CheriBSD, and a disk image, then boots the pure-capability system.
git clone https://github.com/CTSRD-CHERI/cheribuild.git
cd cheribuild
./cheribuild.py --include-dependencies run-riscv64-purecap
Use current cheribuild documentation for prerequisites and target changes.
Morello
CheriBSD runs on the Morello board and supports Morello-specific hybrid and pure-capability software. This route is useful for hardware evaluation and existing Morello projects. Firmware, operating-system image, software development kit (SDK), and board revision must remain compatible.
FPGA and other CHERI-RISC-V implementations
CheriBSD can support additional processors when they implement a compatible application-class CHERI architecture and the required platform devices. Confirm the exact processor, instruction-set architecture (ISA) revision, and board support rather than assuming every CHERI-RISC-V core boots the same image.
Pure-capability user space
The CheriABI work established a process environment where language-visible pointers use capabilities. This enables large C and C++ codebases to receive capability bounds and permissions through normal compilation.
The pure-capability environment has been used to port operating-system utilities, libraries, servers, databases, language runtimes, and other applications. The ports tree records many of the compatibility changes required by real software.
Why developers use CheriBSD
- Learn CHERI in a complete Unix environment.
- Port and test existing C and C++ applications.
- Compare conventional, hybrid, and pure-capability modes where supported.
- Develop compiler, linker, runtime, and kernel features.
- Evaluate capability faults and debugging tools.
- Prototype application and operating-system compartments.
- Produce reproducible full-stack evidence through QEMU or Morello.
Relationship to FreeBSD
CheriBSD tracks and adapts FreeBSD rather than defining an unrelated operating system. Some generally useful changes can move into the main FreeBSD project, while CHERI-specific architecture and ABI work remains in the CheriBSD repositories until a suitable contribution path exists.
A stock FreeBSD release does not include complete CHERI support by default. A CheriBSD package also needs to be built for the correct architecture and ABI.
Constraints
- CheriBSD is not Linux, so a Linux-specific product may still require CHERI Linux work.
- Morello and CHERI-RISC-V binaries are architecture-specific.
- Pure-capability ports can expose pointer and ABI assumptions in dependencies.
- Temporal-safety guarantees depend on the allocator and system configuration in use.
- QEMU is suitable for functionality, not final hardware performance.
- Release, branch, and package maturity vary, so pin the complete environment.
Getting started and contributing
- Build automation:
cheribuild - Operating-system source: CTSRD-CHERI/cheribsd
- Versioned guides: CheriBSD Getting Started
- Ports collection: CTSRD-CHERI/cheribsd-ports
Begin with QEMU, build a small pure-capability program, and record the CheriBSD, compiler, and architecture revisions before attempting a larger port.
