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 metadatas

Cited literature [39 references]  Display  Hide  Download

https://hal.inria.fr/hal-02389543
Contributor : Julia Lawall <>
Submitted on : Monday, December 2, 2019 - 3:34:04 PM
Last modification on : Wednesday, December 4, 2019 - 1:35:30 AM

File

paper.pdf
Files produced by the author(s)

Identifiers

Citation

Jia-Ju Bai, Julia 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⟩

Share

Metrics

Record views

12

Files downloads

96