arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1610.03052cs.LOcs.DCcs.OScs.SE
收藏

Linux内核中基于树的层次化读-复制更新的验证

Verification of the Tree-Based Hierarchical Read-Copy Update in the Linux Kernel

Lihao Liang, Paul E. McKenney, Daniel Kroening, Tom Melham

摘要:

Read-Copy Update(RCU)是一种可伸缩的高性能Linux内核同步机制,它可以同时运行低开销的读取器和更新器。多核系统的生产质量RCU实现绝对是不平凡的。鉴于Linux的普遍性,一个罕见的“百万年”错误每天可能在安装的基础上发生几次。因此,严格验证RCU的复杂行为至关重要。由于可能执行的指数数量,因此穷举测试是不可行的,这建议使用形式化验证。以前对RCU的验证工作要么集中在简单的实现上,要么使用建模语言,后者需要容易出错的手动翻译,由于Linux内核的RCU实现经常发生变化,因此必须频繁重复。在本文中,我们首先描述了树RCU在Linux内核中的实现。然后,我们讨论了如何直接从Tree RCU的源代码中构造一个模型,并使用CBMC模型检查器来验证其安全性和活性。据我们所知,这是对RCU源代码重要部分的首次验证,也是将形式化验证集成到Linux内核回归测试套件中的重要一步。

英文摘要:

Read-Copy Update (RCU) is a scalable, high-performance Linux-kernel synchronization mechanism that runs low-overhead readers concurrently with updaters. Production-quality RCU implementations for multi-core systems are decidedly non-trivial. Giving the ubiquity of Linux, a rare "million-year" bug can occur several times per day across the installed base. Stringent validation of RCU's complex behaviors is thus critically important. Exhaustive testing is infeasible due to the exponential number of possible executions, which suggests use of formal verification. Previous verification efforts on RCU either focus on simple implementations or use modeling languages, the latter requiring error-prone manual translation that must be repeated frequently due to regular changes in the Linux kernel's RCU implementation. In this paper, we first describe the implementation of Tree RCU in the Linux kernel. We then discuss how to construct a model directly from Tree RCU's source code in C, and use the CBMC model checker to verify its safety and liveness properties. To our best knowledge, this is the first verification of a significant part of RCU's source code, and is an important step towards integration of formal verification into the Linux kernel's regression test suite.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑