Available at: https://digitalcommons.calpoly.edu/theses/3424
Date of Award
8-2026
Degree Name
MS in Computer Science
Department/Program
Computer Science
College
College of Engineering
Advisor
Stephen R. Beard
Advisor Department
Computer Science
Advisor College
College of Engineering
Abstract
TrustGuard is a hardware architecture implementing a CAVO (Containment Architecture with Verified Output) model, which provides security guarantees by bootstrapping trust of a system to a hardware component known as the Sentry. Rather than verifying an entire system, TrustGuard re-executes trusted computation on the Sentry and validates the host system's execution before allowing values to pass to the outside world, thereby containing the effects of erroneous computation. Implementing this architecture in practice without hardware modifications to a host CPU requires a compiler toolchain capable of automatically generating instrumented binaries for both the untrusted host and the trusted Sentry from C source and managing communication between the two. The toolchain allows abstraction such that programmers need not understand the precise details of the architecture in order to write code that takes advantage of its security guarantees.
This thesis presents the design and implementation of a new TrustGuard toolchain based on LLVM and static binary translation utilizing the Capstone Disassembly Engine. The existing Python and GCC based toolchain is replaced with a simplified architecture built upon actively maintained compiler and disassembly infrastructure, reducing implementation complexity while improving maintainability and extensibility. LLVM was modified to provide a pragma to allow programmers to mark regions of code as security-critical and therefore requiring verification. The LLVM fork also provides C builtins that allow programmers to insert custom Sentry ISA instructions into their code directly. A custom static binary translator converts the resulting RISC-V executables into host native programs. The translator reconstructs program control flow, emulates the RISC-V execution environment, replaces external library functions with host-native implementations, and communicates execution traces to the Sentry through UNIX sockets.
The implemented toolchain successfully compiles, instruments, translates, and executes TrustGuard applications on host machines implementing any ISA while preserving compatibility with the TrustGuard architecture. Benchmarks demonstrate that the translated programs execute with acceptable overhead relative to native execution while reducing the complexity of the toolchain. Finally, this thesis discusses limitations of the current implementation and proposes future extensions, including possible additional runtime overhead optimizations, support for C++ applications, and modifications to the toolchain to further simplify maintenance.