When Threads Meet Interrupts: Effective Static Detection of Interrupt-Based Deadlocks in Linux

被引:0
|
作者
Ye, Chengfeng [1 ]
Cai, Yuandao [1 ]
Zhang, Charles [1 ]
机构
[1] Hong Kong Univ Sci & Technol, Hong Kong, Peoples R China
关键词
D O I
暂无
中图分类号
学科分类号
摘要
Deadlocking is an unresponsive state of software that arises when threads hold locks while trying to acquire other locks that are already held by other threads, resulting in a circular lock dependency. Interrupt-based deadlocks, a specific and prevalent type of deadlocks that occur within the OS kernel due to interrupt preemption, pose significant risks to system functionality, performance, and security. However, existing static analysis tools focus on resource-based deadlocks without characterizing the interrupt preemption. In this paper, we introduce Archerfish, the first static analysis approach for effectively identifying interrupt-based deadlocks in the large-scale Linux kernel. At its core, Archerfish utilizes an Interrupt-Aware Lock Graph (ILG) to capture both regular and interrupt-related lock dependencies, reducing the deadlock detection problem to graph cycle discovery and refinement. Furthermore, Archerfish incorporates four effective analysis components to construct ILG and refine the deadlock cycles, addressing three core challenges, including the extensive interrupt-involving concurrency space, identifying potential interrupt handlers, and validating the feasibility of deadlock cycles. Our experimental results show that Archerfish can precisely analyze the Linux kernel (19.8 MLoC) in approximately one hour. At the time of writing, we have discovered 76 previously unknown deadlocks, with 53 bugs confirmed, 46 bugs already fixed by the Linux community, and 2 CVE IDs assigned. Notably, those found deadlocks are long-latent, hiding for an average of 9.9 years.
引用
收藏
页码:6167 / 6184
页数:18
相关论文
共 4 条
  • [1] When threads meet events: Efficient and precise static race detection with origins
    Liu, Bozhen
    Liu, Peiming
    Li, Yanze
    Tsai, Chia-Che
    Da Silva, Dilma
    Huang, Jeff
    Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2021, : 725 - 739
  • [2] When Threads Meet Events: Efficient and Precise Static Race Detection with Origins
    Liu, Bozhen
    Liu, Peiming
    Li, Yanze
    Tsai, Chia-Che
    Da Silva, Dilma
    Huang, Jeff
    PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21), 2021, : 725 - 739
  • [3] DLOS: Effective Static Detection of Deadlocks in OS Kernels
    Bai, Jia-Ju
    Li, Tuo
    Hu, Shi-Min
    PROCEEDINGS OF THE 2022 USENIX ANNUAL TECHNICAL CONFERENCE, 2022, : 367 - 381
  • [4] Deep Learning-Based Joint Activity Detection and Channel Estimation for Massive Access: When More Antennas Meet Fewer Pilots
    Shao, Xiaodan
    Chen, Xiaoming
    Ng, Derrick Wing Kwan
    Zhong, Caijun
    Zhang, Zhaoyang
    2020 12TH INTERNATIONAL CONFERENCE ON WIRELESS COMMUNICATIONS AND SIGNAL PROCESSING (WCSP), 2020, : 975 - 980