libmpk:英特尔内存保护密钥的软件抽象
libmpk: Software Abstraction for Intel Memory Protection Keys
摘要:
英特尔内存保护密钥(MPK)是一项新的硬件功能,支持对页面组进行线程本地权限控制,而无需修改页表。不幸的是,其当前的硬件实现和软件支持受到安全性、可扩展性和语义缺口问题的影响:(1)MPK容易受到保护密钥释放后使用和保护密钥损坏的影响;(2)MPK由于硬件限制而无法扩展;(3)MPK与mprotect()不完全兼容,因为它不支持跨线程的权限同步。在本文中,我们提出了libmpk,MPK的软件抽象。libmpk虚拟化保护密钥以消除释放后使用保护密钥和保护密钥损坏问题,同时支持大量存储器页组。libmpk还防止对其元数据的未授权写入,并支持线程间密钥同步。我们将libmpk应用于三个真实世界的应用程序:OpenSSL,JavaScript JIT编译器和Memcached用于内存保护和隔离。评估表明,与不安全的版本相比,libmpk引入的性能开销可以忽略不计(<1%),并且与使用mprotect()的安全等效版本相比,其性能提高了8.1倍。libmpk的源代码将作为一个开源项目公开提供和维护。
英文摘要:
Intel memory protection keys (MPK) is a new hardware feature to support thread-local permission control on groups of pages without requiring modification of page tables. Unfortunately, its current hardware implementation and software supports suffer from security, scalability, and semantic-gap problems: (1) MPK is vulnerable to protection-key-use-after-free and protection-key corruption; (2) MPK does not scale due to hardware limitations; and (3) MPK is not perfectly compatible with mprotect() because it does not support permission synchronization across threads. In this paper, we propose libmpk, a software abstraction for MPK. libmpk virtualizes protection keys to eliminate the protection-key-use-after-free and protection-key corruption problems while supporting a tremendous number of memory page groups. libmpk also prevents unauthorized writes to its metadata and supports inter-thread key synchronization. We apply libmpk to three real-world applications: OpenSSL, JavaScript JIT compiler, and Memcached for memory protection and isolation. An evaluation shows that libmpk introduces negligible performance overhead (<1%) compared with insecure versions, and improves their performance by 8.1x over secure equivalents using mprotect(). The source code of libmpk will be publicly available and maintained as an open source project.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。