References:
[1] CHERI programmer’s guide, UCAM-CL-TR-877, 2015.
system call permission:
$PCC register does not have CHERI_PERM_SYSCALL user-defined permission bit, preventing sandboxes from directly invoking system services;ccall and creturn fast exception handers:
ktrace facility: allow object invocation/return to be traced.
cap faults:
extended to allow processes to export class, method, and object statistics.
supports CheriABI: a new ABI and system call interface:
src/sys/mips/cheri/ and src/sys/mips/include contains the majority of CHERI-specific code:
- coprocessor 2 initialization
- context management
cheri.h: C-language definitions relating to capabilities
cheri_kframe, cheri_signal;cheri_frame, cheri_stack;cheriasm.h: definitions for CHERI-aware assembly
cheric.h: compiler builtin wrapper for register access, such as cheri_getbase(), cheri_andperm(). This is used only in userpsace due to dependencies on CHERI-aware Clang/LLVM.
cherireg.h: C macros suitable for use in both C and assembly that specify low-level CHERI constants, such as permission-mask values. For both kernel and userspace.
sys/sys/cheri_serial.h: provides a structure and definitions supporting serialization of capabilities independent of their size and micro-architectural details.
ccall.S: fast exception handlers for ccall and creturn. Errors go to a regular MipsUserGenException hander.
ccall_ktrace.S: a slow path exception handlers used to trace ccall and creturn invocations.
cheri.c: majority of CHERI-specific C code including:
sysctls;fork;cheri_bcopy.S: CHERI version of memcpy and bcopy
copyin and copyout do not use them? [ch 8.1, p49]cheri_debug.c: CHERI commands for in-kenrel debugger.
cheri_exception.c: reporting CHERI exceptions and registers on the system console.
cheri_signal.c: CHERI signal handling infrastructure.
cheri_stack.c: CHERI trusted-stack initialization, copying, and unwinding, and sysarch system calls to get/set current trusted stack.
cheri_syscall.c: CHERI related system-call infrastructure.
cheriabi_machdep.c: ISA dependent CheriABI support including
sys/compat/cheriabit/* CheriABI ISA-independent implementation. The implementation is modelled on the support for 32-bit binaries in sys/compat/freebsd32.
Todo list:
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?