Skip to Main content Skip to Navigation
Conference papers

DCNS: Automated Detection of Conservative Non-Sleep Defects in the Linux Kernel

Abstract : For waiting, the Linux kernel offers both sleep-able and non-sleep operations. However, only non-sleep operations can be used in atomic context. Detecting the possibility of execution in atomic context requires a complete inter-procedural flow analysis, often involving function pointers. Developers may thus conservatively use non-sleep operations even outside of atomic context, which may damage system performance, as such operations unproductively monopolize the CPU. Until now, no systematic approach has been proposed to detect such conservative non-sleep (CNS) defects. In this paper, we propose a practical static approach, named DCNS, to automatically detect conservative non-sleep defects in the Linux kernel. DCNS uses a summary-based analysis to effectively identify the code in atomic context and a novel file-connection-based alias analysis to correctly identify the set of functions referenced by a function pointer. We evaluate DCNS on Linux 4.16, and in total find 1629 defects. We manually check 943 defects whose call paths are not so difficult to follow, and find that 890 are real. We have randomly selected 300 of the real defects and sent them to kernel developers, and 251 have been confirmed.
Document type :
Conference papers
Complete list of metadata

Cited literature [39 references]  Display  Hide  Download
Contributor : Julia Lawall Connect in order to contact the contributor
Submitted on : Monday, December 2, 2019 - 3:34:04 PM
Last modification on : Thursday, June 9, 2022 - 3:41:03 AM
Long-term archiving on: : Tuesday, March 3, 2020 - 7:14:50 PM


Files produced by the author(s)



Jia-Ju Bai, Julia L. Lawall, Wende Tan, Shi-Min Hu. DCNS: Automated Detection of Conservative Non-Sleep Defects in the Linux Kernel. ASPLOS 2019 - The 24th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Apr 2019, Providence, Rhode Island, United States. pp.287-299, ⟨10.1145/3297858.3304065⟩. ⟨hal-02389543⟩



Record views


Files downloads