Safe and Practical GPU Computation in TrustZone

Safe and Practical GPU Computation in TrustZone
复制标题

DOI:
10.1145/3552326.3567483
复制
发表时间:
2023-05
期刊:
Proceedings of the Eighteenth European Conference on Computer Systems
影响因子:
--
通讯作者:
Heejin Park;F. Lin
Heejin Park;F. Lin
中科院分区:
其他
文献类型:
--
作者:
Heejin Park;F. Lin

文献摘要

相似文献

对于移动设备来说,在 TrustZone 可信执行环境 (TEE) 中运行敏感的 GPU 计算是非常有吸引力的。为了最大限度地减少 TEE 中部署的 GPU 软件,重播方法很有前途:在 TEE 外部的完整 GPU 堆栈上记录 CPU/GPU 交互;在没有 GPU 堆栈的情况下重放 TEE 内的交互。一个关键的困境是,录制过程必须 (1) 在安全环境中进行,并且 (2) 访问用于回放的确切 GPU 模型。为此,我们提出了一种名为 GR-T 的新颖录制架构:拥有 GPU 硬件的移动设备与运行 GPU 软件的无 GPU 云服务协作;双方共同使用GPU硬件/软件进行录制。为了克服由此产生的网络延迟,GR-T 提供了优化:寄存器访问延迟、推测和仅元同步。这些技术将记录延迟减少了 20 倍,从数百秒减少到数十秒。与 TEE 之外的本机执行相比,基于重放的 GPU 计算的延迟降低了 25%。该代码可在 https://github.com/bakhi/GPUReplay 获取。
For mobile devices, it is compelling to run sensitive GPU computation within a TrustZone trusted execution environment (TEE). To minimize GPU software deployed in TEE, the replay approach is promising: record CPU/GPU interactions on a full GPU stack outside the TEE; replay the interactions inside the TEE without the GPU stack. A key dilemma is that the recording process must both (1) occur in a safe environment and (2) access the exact GPU models to be used for replay. To this end, we present a novel recording architecture called GR-T: a mobile device possessing the GPU hardware collaborates with a GPU-less cloud service which runs the GPU software; the two parties exercise the GPU hardware/software jointly for recording. To overcome the resultant network delays, GR-T contributes optimizations: register access deferral, speculation, and meta-only synchronization. These techniques reduce the recording delay by 20x, from hundreds of seconds to tens of seconds. Replay-based GPU computation incurs 25% lower delays compared to native execution outside TEE. The code is available at https://github.com/bakhi/GPUReplay.