paperbot · PL 论文追踪

全部论文 待读 收藏

P2 GIANTSAN: Efficient Memory Sanitization with Segment Folding

GIANTSAN:利用段折叠的高效内存消毒
ASPLOS Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 22024匹配度 2/10 · 该论文聚焦运行时内存消毒与阴影编码优化,属于动态分析/系统安全方向,不涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析。仅在广义的程序分析/PL工程实现层面有微弱关联。引用 14 inbox
Hao Ling, Heqing Huang, Chengpeng Wang, Yuandao Cai, Charles Zhang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出段折叠阴影编码,提高内存消毒保护密度并显著降低运行时开销。

基于位置的内存消毒方法兼容性好,但保护密度低:单个元数据守护的字节数有限,导致大量访存需要加载过多元数据,运行时开销高。本文提出段折叠(segment folding)阴影编码,将具有相同元数据的相邻字节汇总为折叠段,从而减少不必要的元数据加载,用更少元数据保护大块内存。作者实现 GiantSan,并在 SPEC CPU 2017 上评估:其运行时开销分别比 ASan 和 ASan- 低 59.10% 与 38.52%;在同一 redzone 设置下,测试真实项目 PHP 时比二者少 463 个假阴性。

问题
基于位置的内存消毒器保护密度低,每个元数据守护的字节数有限,导致大量元数据加载和较高运行时开销。
方法
提出段折叠阴影编码,将具有相同元数据的相邻字节汇总为折叠段,减少元数据加载,并用更少元数据保护大内存区域;实现为 GiantSan。
评估
在 SPEC CPU 2017 基准上与 ASan/ASan- 比较运行时开销,并在真实项目 PHP 上以相同 redzone 设置比较假阴性数量。
原文摘要(Abstract)

Memory safety sanitizers, the sharp weapon for detecting invalid memory operations during execution, employ runtime metadata to model the memory and help find memory errors hidden in the programs. However, location-based methods, the most widely deployed memory sanitization methods thanks to their high compatibility, face the low protection density issue: the number of bytes safeguarded by one metadata is limited. As a result, numerous memory accesses require loading excessive metadata, leading to a high runtime overhead. To address this issue, we propose a new shadow encoding with segment folding to increase the protection density. Specifically, we characterize neighboring bytes with identical metadata by building novel summaries, called folded segments, on those bytes to reduce unnecessary metadata loadings. The new encoding uses less metadata to safeguard large memory regions, speeding up memory sanitization. We implement our designed technique as GiantSan. Our evaluation using the SPEC CPU 2017 benchmark shows that GiantSan outperforms the state-of-the-art methods with 59.10% and 38.52% less runtime overhead than ASan and ASan-, respectively. Moreover, under the same redzone setting, GiantSan detects 463 fewer false negative cases than ASan and ASan- in testing the real-world project PHP.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{LingHWCZ24,
  title = {GIANTSAN: Efficient Memory Sanitization with Segment Folding},
  author = {Hao Ling and Heqing Huang and Chengpeng Wang and Yuandao Cai and Charles Zhang},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3620665.3640391}
}