OZZ: Identifying Kernel Out-of-Order Concurrency Bugs with In-Vivo Memory Access Reordering

DR Jeong, Y Choi, B Lee, I Shin, Y Kwon - Proceedings of the ACM …, 2024 - dl.acm.org
Proceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles, 2024dl.acm.org
Kernel concurrency bugs are notoriously difficult to identify, while their consequences
severely threaten the reliability and security of the entire system. Especially in the kernel,
developers should consider not only locks but also memory barriers to prevent out-of-order
execution from breaking the correctness of concurrent execution. Incorrect use of memory
barriers may cause non-intuitive concurrency bugs that manifest due to out-of-order
execution, which we refer to as OoO bugs. This paper aims to identify OoO bugs in the …
Kernel concurrency bugs are notoriously difficult to identify, while their consequences severely threaten the reliability and security of the entire system. Especially in the kernel, developers should consider not only locks but also memory barriers to prevent out-of-order execution from breaking the correctness of concurrent execution. Incorrect use of memory barriers may cause non-intuitive concurrency bugs that manifest due to out-of-order execution, which we refer to as OoO bugs.
This paper aims to identify OoO bugs in the kernel. We devise a mechanism to emulate out-of-order execution while kernel code is executed, called OEMU. Inspired by how a processor reorders memory accesses, OEMU makes the subtle and non-deterministic behavior of out-of-order execution systematically controllable. Based on OEMU, we propose Ozz, a new testing tool designed to effectively identify kernel OoO bugs. The key feature of Ozz is its ability to deterministically control both out-of-order execution and concurrent execution caused by thread interleavings, enabling comprehensive testing of their combined effects. Our evaluation shows that OEMU is effective in reproducing previously-reported kernel OoO bugs, demonstrating its strong capability of controlling out-of-order execution. Furthermore, with Ozz, we identify 11 new OoO bugs in the latest version of the Linux kernel, subsequently confirmed and patched by kernel developers.
ACM Digital Library
Showing the best result for this search. See all results