PIE: A Dynamic TCB for Remote Systems with a Platform Isolation Environment

Moritz Schneider, Aritra Dhar, Ivan Puddu, Kari Kostiainen, Srdjan CapkunarXiv 2020 · DOI

Abstract

The ever-rising computation demand is forcing the move from the CPU to heterogeneous specialized hardware, which is readily available across modern datacenters through disaggregated infrastructure. On the other hand, trusted execution environments (TEEs), one of the most promising recent developments in hardware security, can only protect code confined in the CPU, limiting TEEs' potential and applicability to a handful of applications. We observe that the TEEs' hardware trusted computing base (TCB) is fixed at design time, which in practice leads to using untrusted software to employ peripherals in TEEs. Based on this observation, we propose composite enclaves with a configurable hardware and software TCB, allowing enclaves access to multiple computing and IO resources. Finally, we present two case studies of composite enclaves: i) an FPGA platform based on RISC-V Keystone connected to emulated peripherals and sensors, and ii) a large-scale accelerator. These case studies showcase a flexible but small TCB (2.5 KLoC for IO peripherals and drivers), with a low-performance overhead (only around 220 additional cycles for a context switch), thus demonstrating the feasibility of our approach and showing that it can work with a wide range of specialized hardware.

Introduction

Modern computing is shifting away from a CPU-centric model toward heterogeneous, disaggregated infrastructures. Today's workloads rely heavily on specialized accelerators such as GPUs, FPGAs, and ASICs, as well as remote sensors. However, existing security primitives like Intel SGX or ARM TrustZone are "CPU-bound," meaning they can only protect code and data within the CPU package.

When an enclave needs to interact with a peripheral, it typically must communicate through an untrusted Operating System (OS). This creates a security dilemma: developers must either trust the OS, defeating the purpose of a TEE, or include massive, complex drivers within the secure software stack. The latter approach significantly bloats the Trusted Computing Base (TCB) and expands the attack surface. This paper addresses the disconnect between high-performance system design and hardware-enforced security.

The Composite Enclave Architecture

The proposed architecture introduces a modular approach to trust through two core concepts: Unit Enclaves and Composite Enclaves. Unit enclaves are individual isolated environments running on specific hardware components (e.g., a CPU or a GPU). A Composite Enclave is a logical collection of these unit enclaves working in concert.

Overview of the Composite Enclave architecture showing multiple unit enclaves and external peripherals with chained attestation.

Key innovations include:

  • Configurable TCB: Unlike traditional TEEs with fixed hardware boundaries, Composite Enclaves allow users to define which hardware components are part of the trust boundary for a specific task.
  • Platform Awareness: New lifecycle events, connect and disconnect, allow an enclave to detect if a peripheral has been tampered with or swapped by the OS, triggering a re-attestation.
  • Chained Attestation: The attestation process is extended so a remote verifier receives a chain of reports covering every unit enclave and hardware device involved in the computation.

Secure Communication and Memory Isolation

To avoid the high performance costs of traditional TEE communication, the architecture utilizes a modified RISC-V Physical Memory Protection (PMP) mechanism. This modification allows for overlapping memory regions, enabling unit enclaves to communicate directly via shared memory without OS intervention.

Memory partitioning and shared regions between unit enclaves and accelerators using modified PMP.

This design also supports Asynchronous Disconnects. In disaggregated systems, a device might be reset or removed by the OS at any time. The architecture ensures that if a device disconnects, the remaining enclaves immediately gain sole ownership of the shared memory, preventing potential data leaks to the untrusted OS.

Evaluation and Results

The system was evaluated using two primary prototypes: an FPGA-based RISC-V core (Ariane) connected to emulated peripherals, and a simulation of the Manticore architecture (a 4096-core RISC-V accelerator).

  • Performance: Supporting composite enclaves added only approximately 220 cycles to a context switch (increasing it from ~4700 to ~4920 cycles), a negligible cost for most high-performance applications.
  • TCB Complexity: Modifications to the Keystone Security Monitor required only 600 lines of code (LoC). The IO drivers and firmware for the case studies were similarly compact, totaling approximately 2.5 KLoC.
  • Hardware Overhead: In the many-core accelerator case study, adding PMP hardware for security resulted in a total area overhead of only 0.7%, demonstrating that these features are commercially viable for dense silicon designs.

Conclusion

Composite Enclaves provide a path forward for securing heterogeneous systems without sacrificing performance or significantly increasing the TCB. By moving away from a fixed, CPU-only trust model, this architecture allows for secure, attested computation across the entire disaggregated data center. Future work will focus on protecting against local physical attackers and scaling the architecture to support more complex, monolithic GPU drivers.

Summary updated

BibTeX
@misc{schneider2020pie,
  author = {Moritz Schneider and Aritra Dhar and Ivan Puddu and Kari Kostiainen and Srdjan Capkun},
  title = {{PIE: A Dynamic TCB for Remote Systems with a Platform Isolation Environment}},
  year = {2020},
  eprint = {2010.10416},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.10416},
}
Figure