| 引用本文: |
-
瞿艺飞,江旭,夏媛,吴兵,魏学亮,童薇.基于访问关联的安全元数据预取策略研究[J].信息安全学报,已采用 [点击复制]
- quyifei,jiangxu,xiayuan,wubing,weixueliang,tongwei.Research on Access-Associated Security Metadata Prefetching Strategy[J].Journal of Cyber Security,Accept [点击复制]
|
|
| 摘要: |
| 安全内存系统通过加密机制和完整性验证机制确保内存数据的机密性和完整性,但这些安全机制引入了大量安全元数据,其访问开销成为系统性能瓶颈。现有工作普遍采用安全元数据缓存降低访问开销,并使用预取策略提升缓存命中率。面向普通数据缓存的预取方法主要从历史访存地址流中提取跨步、空间关联或时间关联,以预测后续访问地址。与普通数据访问不同,安全元数据请求由片外数据读取、脏数据写回以及完整性验证和更新等多类操作共同触发。不同触发路径混合形成的安全元数据地址流难以呈现稳定的时空规律,因而直接采用传统预取方法容易出现覆盖率较低或过度预取。当数据物理地址和安全元数据布局确定后,相应计数器及完整性树结点的地址可以直接计算。因此,安全元数据预取无需从历史元数据地址流中预测目标地址,而可以利用数据访问路径中先行事件与后续安全元数据需求之间的访问关联发起预取。然而,数据访问路径只提供了提前计算元数据地址的机会,并不保证相应的安全元数据需求最终形成,也不保证可利用的提前时间足以覆盖安全元数据的读取与验证延迟;此外,提前返回的元数据如何放置,还会影响安全元数据缓存的驻留状态,并可能诱发额外访问。本文提出基于访问关联的安全元数据预取方法(Access-associated Security Metadata Prefetching,ASMP)。在读路径中,ASMP利用数据侧地址转换后备缓冲器(Translation Lookaside Buffer,TLB)未命中处理完成后获得的物理页号生成预取请求,并结合物理页的近期访问状态,对预取触发进行筛选;在写路径中,ASMP利用脏数据写回事件确定预取对象,并利用末级缓存替换阶段已经确定的脏块信息,在脏数据进入写缓冲区之前提前触发相应的安全元数据预取,使元数据读取与缺失请求处理、数据填充和写回过程相重叠。为避免预取结果直接进入安全元数据缓存造成污染,并沿完整性树触发不必要的链式访问,ASMP依据其不同的访问特征,对两类预取结果进行分类放置和独立管理。实验结果表明,ASMP将安全元数据缓存未命中次数平均减少34.71%,将每周期指令数(Instructions Per Cycle,IPC)平均提高13.47%,最高提高超过20%。 |
| 关键词: 内存安全 安全元数据 计数器模式加密 完整性验证 缓存优化 |
| DOI: |
| 投稿时间:2026-05-24修订日期:2026-09-22 |
| 基金项目:国家自然科学基金青年科学基金项目(C类) 62302182、62302179, 国家自然科学基金联合基金项目U25A20423和网络空间安全防御重点实验室开放课题 2024-ZD-02 |
|
| Research on Access-Associated Security Metadata Prefetching Strategy |
|
quyifei, jiangxu, xiayuan, wubing, weixueliang, tongwei
|
| (Huazhong University of Science and Technology) |
| Abstract: |
| Secure memory systems use encryption and integrity verification to protect the confidentiality and integrity of memory data. However, these mechanisms introduce substantial security metadata, whose access overhead has be-come a major performance bottleneck. Existing studies commonly use security metadata caches and prefetching to reduce this overhead. Conventional data-cache prefetchers predict future addresses by extracting stride, spatial, or temporal patterns from past memory accesses. Security metadata requests, however, are triggered by off-chip reads, dirty-data writebacks, and integrity verification and updates. The resulting mixed address stream often lacks stable spatial or temporal patterns, leading conventional prefetchers to low coverage or excessive prefetching. Given a physical data address and a fixed metadata layout, the addresses of the corresponding counters and integrity-tree nodes can be computed directly. Security metadata prefetching can therefore exploit access associations between earlier events in the data access path and subsequent metadata demands, rather than predict targets from metadata address history. However, an early event may not lead to an actual metadata request, the available lead time may be insufficient to hide retrieval and verification latency, and prefetched metadata may pollute the metadata cache or trigger extra accesses. This paper proposes Access-associated Security Metadata Prefetching (ASMP). On the read path, ASMP uses the physical page number obtained after a data-side Translation Lookaside Buffer (TLB) miss to generate prefetch requests and filters triggers using the page’s recent access state. On the write path, ASMP uses dirty-block information available during last-level cache replacement to prefetch metadata before the block enters the write buffer, overlapping metadata retrieval with miss handling, data filling, and writeback. ASMP also sepa-rately places and manages prefetched counters and integrity-tree nodes to avoid cache pollution and unnecessary chained accesses. ASMP reduces security metadata cache misses by 34.71% on average and improves instructions per cycle (IPC) by 13.47% on average, with a maximum improvement of over 20%. |
| Key words: memory security security metadata counter-mode encryption integrity verification cache optimization |