Effective Detection of Sleep-in-atomic-context Bugs in the Linux Kernel

Author:

Bai Jia-Ju1,Lawall Julia2,Hu Shi-Min1ORCID

Affiliation:

1. Tsinghua University, Beijing, China

2. Sorbonne University/Inria/LIP6, Paris, France

Abstract

Atomic context is an execution state of the Linux kernel in which kernel code monopolizes a CPU core. In this state, the Linux kernel may only perform operations that cannot sleep, as otherwise a system hang or crash may occur. We refer to this kind of concurrency bug as a sleep-in-atomic-context (SAC) bug. In practice, SAC bugs are hard to find, as they do not cause problems in all executions. In this article, we propose a practical static approach named DSAC to effectively detect SAC bugs in the Linux kernel. DSAC uses three key techniques: (1) a summary-based analysis to identify the code that may be executed in atomic context, (2) a connection-based alias analysis to identify the set of functions referenced by a function pointer, and (3) a path-check method to filter out repeated reports and false bugs. We evaluate DSAC on Linux 4.17 and find 1,159 SAC bugs. We manually check all the bugs and find that 1,068 bugs are real. We have randomly selected 300 of the real bugs and sent them to kernel developers. 220 of these bugs have been confirmed, and 51 of our patches fixing 115 bugs have been applied.

Funder

China Postdoctoral Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

General Computer Science

Reference59 articles.

1. Allocation 2018. Linux kernel documentation for memory allocation. Retrieved from https://www.kernel.org/doc/htmldocs/kernel-api/API-kmalloc.html. Allocation 2018. Linux kernel documentation for memory allocation. Retrieved from https://www.kernel.org/doc/htmldocs/kernel-api/API-kmalloc.html.

2. Automatic verification of active device drivers

3. DCNS

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. SPATA: Effective OS Bug Detection with Summary-Based, Alias-Aware and Path-Sensitive Typestate Analysis;ACM Transactions on Computer Systems;2024-09-06

2. Path-sensitive and alias-aware typestate analysis for detecting OS bugs;Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems;2022-02-22

3. Hawkeye: Eliminating Kernel Address Leakage in Normal Data Flows;IEEE Transactions on Dependable and Secure Computing;2022

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3