当前位置: X-MOL 学术IEEE Trans. Parallel Distrib. Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Efficient Buffer Overflow Detection on GPU
IEEE Transactions on Parallel and Distributed Systems ( IF 5.6 ) Pub Date : 2021-05-01 , DOI: 10.1109/tpds.2020.3042965
Bang Di , Jianhua Sun , Hao Chen , Dong Li

Rich thread-level parallelism of GPU has motivated co-running GPU kernels on a single GPU. However, when GPU kernels co-run, it is possible that one kernel can leverage buffer overflow to attack another kernel running on the same GPU. There is very limited work aiming to detect buffer overflow for GPU. Existing work has either large performance overhead or limited capability in detecting buffer overflow. In this article, we introduce GMODx, a runtime software system that can detect GPU buffer overflow. GMODx performs always-on monitoring on allocated memory based on a canary-based design. First, for the fine-grained memory management, GMODx introduces a set of byte arrays to store buffer information for overflow detection. Techniques, such as lock-free accesses to the byte arrays, delayed memory free, efficient memory reallocation, and garbage collection for the byte arrays, are proposed to achieve high performance. Second, for the coarse-grained memory management, GMODx utilizes unified memory to delegate the always-on monitoring to the CPU. To reduce performance overhead, we propose several techniques, including customized list data structure and specific optimizations against the unified memory. For micro-benchmarking, our experiments show that GMODx is capable of detecting buffer overflow for the fine-grained memory management without performance loss, and that it incurs small runtime overhead (4.2 percent on average and up to 9.7 percent) for the coarse-grained memory management. For real workloads, we deploy GMODx on the TensorFlow framework, it only causes 0.8 percent overhead on average (up to 1.8 percent).

中文翻译:

GPU 上的高效缓冲区溢出检测

GPU 丰富的线程级并行性促使在单个 GPU 上共同运行 GPU 内核。但是,当 GPU 内核共同运行时,一个内核可能会利用缓冲区溢出来攻击在同一 GPU 上运行的另一个内核。旨在检测 GPU 缓冲区溢出的工作非常有限。现有的工作要么有很大的性能开销,要么在检测缓冲区溢出方面的能力有限。在本文中,我们将介绍 GMODx,一个可以检测 GPU 缓冲区溢出的运行时软件系统。GMODx 基于 Canary 设计对分配的内存执行永远在线监控。首先,对于细粒度的内存管理,GMODx 引入了一组字节数组来存储用于溢出检测的缓冲区信息。技术,例如对字节数组的无锁访问、延迟释放内存、有效的内存重新分配、和字节数组的垃圾收集,被提议实现高性能。其次,对于粗粒度的内存管理,GMODx 利用统一内存将永远在线的监控委托给 CPU。为了减少性能开销,我们提出了几种技术,包括自定义列表数据结构和针对统一内存的特定优化。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。建议实现高性能。其次,对于粗粒度的内存管理,GMODx 利用统一内存将永远在线的监控委托给 CPU。为了减少性能开销,我们提出了几种技术,包括自定义列表数据结构和针对统一内存的特定优化。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。建议实现高性能。其次,对于粗粒度的内存管理,GMODx 利用统一内存将永远在线的监控委托给 CPU。为了减少性能开销,我们提出了几种技术,包括自定义列表数据结构和针对统一内存的特定优化。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。GMODx 利用统一内存将永远在线的监控委托给 CPU。为了减少性能开销,我们提出了几种技术,包括自定义列表数据结构和针对统一内存的特定优化。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。GMODx 利用统一内存将永远在线的监控委托给 CPU。为了减少性能开销,我们提出了几种技术,包括自定义列表数据结构和针对统一内存的特定优化。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。对于微基准测试,我们的实验表明 GMODx 能够检测细粒度内存管理的缓冲区溢出而不会造成性能损失,并且它会为粗粒度内存带来很小的运行时开销(平均 4.2%,高达 9.7%)内存管理。对于实际工作负载,我们在 TensorFlow 框架上部署 GMODx,它平均只产生 0.8% 的开销(高达 1.8%)。
更新日期:2021-05-01
down
wechat
bug