一句话:提出全自动鲁棒性验证工具 PMVerify,用符号编码、SMT 与 DPLL(T) 检测 NVM 程序的崩溃一致性缺陷。
非易失性内存(NVM)虽然能保证系统故障后的数据持久性,但其写提交顺序较弱,开发者需额外执行 flush 操作,导致崩溃一致性检查容易出错。现有方法多基于测试并依赖用户引导。本文提出一种全自动的 robustness 验证方法:观察到给定崩溃前执行下崩溃后非易失状态的可达性,可归约为带额外顺序约束的崩溃前执行的有效性。作者设计基于搜索的验证算法,探索所有部分执行与状态,检查是否存在某崩溃前执行下可达的非易失状态,并在内存一致性模型下进一步确认其可达性。该方法在原型工具 PMVerify 中实现,利用程序的符号编码和 SMT 求解器高效探索执行与状态,并集成到 DPLL(T) 框架中优化检查。在 PMDK 基准上的实验表明,PMVerify 在鲁棒性违反检测方面与最先进的动态工具 PSan 具有竞争力。
The emerging non-volatile memory (NVM) technologies provide competitive performance with DRAM and ensure data persistence in the event of system failure. However, it exhibits weak behaviour in terms of the order in which stores are committed to NVMs, and therefore requires extra efforts from developers to flush pending writes. To ensure correctness of this error-prone task, it is crucial to develop a rigid method to check crash consistency of programs running on NVM devices. Most existing solutions are testing-based and rely on user guidance to dynamically detect such deficiencies. In this paper, we present a fully automated method to verify robustness, a newly established property for ensuring crash consistency of such programs. The method is based on the observation that, reachability of a post-crash non-volatile state under a given pre-crash execution can be reduced to validity of the pre-crash execution with additional ordering constraints. Our robustness verification algorithm employs a search-based framework to explore all partial executions and states, and checks if any non-volatile state is reachable under certain pre-crash execution. Once a reachable non-volatile state is obtained, we further check its reachability under memory consistency model. The algorithm is implemented in a prototype tool PMVerify that leverages symbolic encoding of the program and utilizes an SMT solver to efficiently explore all executions and states. The method is integrated into the DPLL(T) framework to optimize the robustness checking algorithm. Experiments on the PMDK example benchmark show that PMVerify is competitive with the state-of-the-art dynamic tool, PSan, in terms of robustness violation detection.