App Developer Centric Trusted Execution Environment

Lizhi Sun, Shuocheng Wang, Hao Wu, Yuhang Gong, Fengyuan Xu, Yunxin Liu, Hao Han, Sheng ZhongarXiv 2021 · arXiv · OpenReview

Abstract

ARM TrustZone is the de-facto hardware TEE implementation on mobile devices like smartphones. As a vendor-centric TEE, TrustZone greatly overlooks the strong protection demands and requirements from the App developers. Several security solutions have been proposed to enable the TEE-assisted isolation in the Normal World of ARM, attempting to balance the security and usability. However, they are still not full-fledged in serving Apps' needs. In this paper, we introduce LEAP, which is a lightweight App developer Centric TEE solution in the Normal World. LEAP offers the auto DevOps tool to help developers to prepare the codes running on it, enables isolated codes to execute in parallel and access peripheral (e.g. mobile GPUs) with ease, and dynamically manage system resources upon Apps' requests. We implement the LEAP prototype on the off-the-shelf ARM platform without any hardware change. We perform the comprehensive analyses and experiments to demonstrate that LEAP is efficient in design, comprehensive in support, and convenient in adoption.

Introduction

Modern mobile applications increasingly rely on proprietary intellectual property, such as deep learning (DL) models, which require both high performance and robust protection. While ARM TrustZone is the industry standard for hardware security, it is primarily designed for device vendors rather than third-party developers. TrustZone's limitations are significant: it restricts applications to a single thread, limits memory to approximately 16MB, and lacks secure access to hardware accelerators like GPUs.

Existing research has attempted to bridge this gap by creating secure environments in the "Normal World" (NW) of ARM. However, as shown in Figure 1, prior solutions like TrustICE, PrivateZone, and SANCTUARY fail to simultaneously provide parallel execution environments, lightweight operation, secure I/O, and flexible resource management. LEAP is designed to address these shortcomings by providing a developer-centric TEE that supports parallel sandboxing and hardware acceleration.

Comparison of TEE solutions across key developer-centric requirements.

System Design and Methods

LEAP achieves strong isolation in the Normal World without the performance overhead of a traditional hypervisor. It employs several novel techniques to balance security and usability:

Isolation via Stage-2 Page Tables

Rather than using virtualization, LEAP manages ARM's stage-2 page tables to enforce boundaries between the main OS (Rich OS) and secure sandboxes. By dedicating physical CPU cores and memory directly to a sandbox, LEAP achieves VM-level security. This approach is compared to the TZASC-based isolation of SANCTUARY in Figure 2, highlighting LEAP's use of memory-translation level enforcement.

Comparison of isolation mechanisms between SANCTUARY and LEAP.

Secure Peripheral Management and GPU Acceleration

To support AI workloads, LEAP allows sandboxes to securely access peripherals like the GPU. Because mobile OSes constantly use the GPU for rendering, simply blocking access would cause system crashes. LEAP introduces a "GPU suspension" mechanism that briefly pauses the OS's GPU driver, executes the secure computation, and then resumes the OS. This allows for hardware-accelerated inference without compromising system stability.

Dynamic Resource Adjustment and DevOps Support

LEAP supports dynamic scaling of CPU cores and memory to handle bursty workloads. It uses an optimized CPU hotplugging technique to minimize latency during resource reallocation. To simplify adoption, LEAP includes an automated "App Adapter" tool. Developers can flag sensitive code entry points, and the tool automatically slices the application and repackages it for the LEAP environment.

Evaluation and Results

The effectiveness of LEAP was evaluated using standard DL benchmarks (e.g., MobileNetv2, ResNet) across various inference frameworks.

  • Performance Gains: By enabling secure GPU access, LEAP achieves a 3.57x average speedup for DL inference compared to CPU-only solutions like SANCTUARY.
  • Efficiency: Dynamic memory management improves utilization by 21.74% over static allocation. The overhead from stage-2 translation is negligible, peaking at 2%.
  • Switching Latency: The time required to map or unmap a peripheral between the OS and a sandbox is less than 200ms, ensuring a relatively smooth user experience.

Conclusion and Future Work

LEAP demonstrates that a lightweight, developer-centric TEE can provide the security and performance required for modern mobile AI. While current limitations include exclusive peripheral access (causing brief UI freezes) and core-count-limited sandbox density, future work will focus on fine-grained peripheral sharing and expanding the DevOps tool to support a wider range of application architectures.

Summary updated

Abstract

ARM TrustZone is the de-facto hardware TEE implementation on mobile devices like smartphones. As a vendor-centric TEE, TrustZone greatly overlooks the strong protection demands and requirements from the App developers. Several security solutions have been proposed to enable the TEE-assisted isolation in the Normal World of ARM, attempting to balance the security and usability. However, they are still not full-fledged in serving Apps' needs. In this paper, we introduce LEAP, which is a lightweight App developer Centric TEE solution in the Normal World. LEAP offers the auto DevOps tool to help developers to prepare the codes running on it, enables isolated codes to execute in parallel and access peripheral (e.g. mobile GPUs) with ease, and dynamically manage system resources upon Apps' requests. We implement the LEAP prototype on the off-the-shelf ARM platform without any hardware change. We perform the comprehensive analyses and experiments to demonstrate that LEAP is efficient in design, comprehensive in support, and convenient in adoption.
BibTeX
@misc{sun2021app,
  author = {Lizhi Sun and Shuocheng Wang and Hao Wu and Yuhang Gong and Fengyuan Xu and Yunxin Liu and Hao Han and Sheng Zhong},
  title = {{App Developer Centric Trusted Execution Environment}},
  year = {2021},
  eprint = {2102.02465},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.02465},
}
Figure