• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2024, Vol. 46 ›› Issue (01): 21-27.

• High Performance Computing • Previous Articles     Next Articles

Fine-grained memory access monitoring based on memory protection keys

WANG Rui-bo,WU Zhen-wei,ZHANG Wen-zhe,WU Hui-jun,ZHANG-YU Shu-qing,LU Kai   

  1. (College of Computer Science and Technology,National University of Defense Technology,Changsha 410073,China)
  • Received:2022-12-18 Revised:2023-06-14 Accepted:2024-01-25 Online:2024-01-25 Published:2024-01-15

Abstract: Based on memory protection key hardware extensions, a lightweight and fine-grained page protection mechanism is proposed. This mechanism overcomes the technical limitations of traditional page protection methods that only support page-grained memory access monitoring, and achieves fine-grained page protection that can intercept each memory access operation. By fully utilizing the user-level thread-local page access permission control provided by memory protection keys, the performance overhead is reduced by more than 30% compared to traditional page protection. Through the integration of fine-grained page protection and compiler instrumentation, the limitations of traditional compiler instrumentation methods that cannot cover non-recompilable portions of programs are addressed.


Key words: memory access monitoring, memory protection keys, page protection, compiler instrumentation