一句话:提出模态断言 [r]P 与虚拟 points-to 断言,在 Rocq 中验证多地址空间 x86-64 虚拟内存管理代码。
虚拟内存管理(VMM)是 OS 内核关键部分,但验证困难:页表通过写入内存更新,而所用地址本身虚拟化。已有工作要么只处理单地址空间,要么信任大量汇编。本文提出模态抽象 [r]P,表示断言 P 在根为 r 的地址空间中成立,使不同地址空间能相互引用,从而完整验证操作多地址空间的指令序列。作者还定义虚拟 points-to 断言,按页表根模拟硬件地址转换,并处理其对地址空间的隐式依赖。论文用困难 VMM 代码片段展示该方法能处理先前工作无法覆盖的示例,包括随指令序列切换地址空间进行推理。结果在 Rocq 中形式化为类 RISC 的 x86-64 汇编片段。
Virtual memory management (VMM) code is a critical piece of general-purpose OS kernels, but verification of this functionality is challenging due to the complexity of the hardware interface (the page tables are updated via writes to those memory locations, using addresses which are themselves virtualized). Prior work on verification of VMM code has either only handled a single address space, or trusted significant pieces of assembly code. In this paper, we introduce a modal abstraction to describe the truth of assertions relative to a specific virtual address space: [r]P indicating that P holds in the virtual address space rooted at r. Such modal assertions allow different address spaces to refer to each other, enabling complete verification of instruction sequences manipulating multiple address spaces. Using them effectively requires working with other assertions, such as points-to assertions about memory contents — which implicitly depend on the address space they are used in. We therefore define virtual points-to assertions to definitionally mimic hardware address translation, relative to a page table root. We demonstrate our approach with challenging fragments of VMM code showing that our approach handles examples beyond what prior work can address, including reasoning about a sequence of instructions as it changes address spaces. Our results are formalized for a RISC-like fragment of x86-64 assembly in Rocq.
@article{paperbot2986,
title = {Modal Abstractions for Virtualizing Memory Addresses},
author = {Ismail Kuru and Colin S. Gordon},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA2},
year = {2025},
doi = {10.1145/3763134}
}