arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.17780cs.DCcs.SYeess.SY
收藏

GPUArmor:面向GPU的高效可扩展内存安全的软硬件协同设计

GPUArmor: A Hardware-Software Co-design for Efficient and Scalable Memory Safety on GPUs

Mohamed Tarek Ibn Ziad, Sana Damani, Mark Stephenson, Stephen W. Keckler, Aamer Jaleel

AI总结:

GPUArmor提出软硬件协同设计,利用编译器分析与小型内存旁路转换缓冲(MLB)实现GPU内存安全,平均运行时开销仅2.3%,存储需求可忽略,并扩展至无需重编译的变体。

摘要:

内存安全错误持续对当前计算系统构成重大威胁,图形处理单元(GPU)也不例外。一类突出的内存安全算法是基于分配的解决方案。其核心思想是将每个分配对象的元数据(基地址和大小)维护在一个独立的表中,并在运行时检索以验证内存访问。虽然此前已有多种解决方案采用基于分配的算法(例如cuCatch和GPUShield),但它们通常面临高内存开销或可扩展性问题。在本工作中,我们研究了真实世界GPU工作负载的关键特征,并观察到GPU与CPU应用在内存访问模式、内存占用、活跃分配数量以及活跃分配工作集方面的若干差异。我们的观察促成了GPUArmor,一个用于GPU内存安全的软硬件协同设计框架。我们表明,简单的编译器分析结合使用小型内存旁路转换缓冲(MLB)的轻量级硬件支持,可以帮助在现代GPU工作负载上防止空间和时间内存违规,平均运行时开销为2.3%。更重要的是,GPUArmor以可忽略的存储需求实现了速度极限性能。这一结果同时惠及基址和界限解决方案以及内存标记技术,我们通过GPUArmor-HWOnly(GPUArmor的一个变体,不需要重新编译)展示了这一点,该变体实现了2.2%的减速,同时显著降低了存储开销,超越了传统内存标记方法。

英文摘要:

Memory safety errors continue to pose a significant threat to current computing systems, and graphics processing units (GPUs) are no exception. A prominent class of memory safety algorithms is allocation-based solutions. The key idea is to maintain each allocation's metadata (base address and size) in a disjoint table and retrieve it at runtime to verify memory accesses. While several previous solutions have adopted allocation-based algorithms (e.g., cuCatch and GPUShield), they typically suffer from high memory overheads or scalability problems. In this work, we examine the key characteristics of real-world GPU workloads and observe several differences between GPU and CPU applications regarding memory access patterns, memory footprint, number of live allocations, and active allocation working set. Our observations motivate GPUArmor, a hardware-software co-design framework for memory safety on GPUs. We show that a simple compiler analysis combined with lightweight hardware support using a small Memory Lookaside Buffer (MLB) can help prevent spatial and temporal memory violations on modern GPU workloads with 2.3% average run time overheads. More importantly, GPUArmor achieves speed-of-light performance with negligible storage requirements. This result benefits both base and bounds solutions and memory tagging techniques, which we showcase with GPUArmor-HWOnly, a variation of GPUArmor that does not require recompilation, and achieves 2.2% slowdowns while significantly reducing storage overheads beyond traditional memory tagging approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑