arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.17869cs.SE
收藏

中断驱动嵌入式软件中竞态条件的自动检测、验证与修复

Automatic Detection, Validation and Repair of Race Conditions in Interrupt-Driven Embedded Software

Yu Wang, Fengjuan Gao, Linzhang Wang, Tingting Yu, Ke Wang, Jianhua Zhao, Xuandong Li

AI总结:

本文提出自动化框架 SDRacer,结合静态分析、符号执行和虚拟平台动态验证,实现中断驱动嵌入式软件中竞态条件的精确检测、验证与修复,并在九个真实 C 语言嵌入式程序上验证了其有效性。

摘要:

中断驱动程序广泛部署于安全关键的嵌入式系统中,用于执行依赖硬件和资源的数据操作任务。在这些系统中频繁使用中断,可能因应用任务与中断处理程序(或两个中断处理程序)之间的交互而导致竞态条件的发生。已有大量程序分析和测试技术被提出用于检测多线程程序中的竞态。然而,针对与硬件中断相关的竞态条件问题的研究却很少。在本文中,我们提出了 SDRacer,这是一个自动化框架,能够检测、验证并修复中断驱动嵌入式软件中的竞态条件。它结合使用静态分析和符号执行来生成用于触发潜在竞态的输入数据。然后,它利用虚拟平台,通过强制中断在潜在竞态点发生来动态验证这些竞态。最后,它提供修复候选方案以消除检测到的竞态。我们在九个用 C 语言编写的真实嵌入式程序上对 SDRacer 进行了评估。结果表明,SDRacer 能够精确检测并成功修复竞态条件。

英文摘要:

Interrupt-driven programs are widely deployed in safety-critical embedded systems to perform hardware and resource dependent data operation tasks. The frequent use of interrupts in these systems can cause race conditions to occur due to interactions between application tasks and interrupt handlers (or two interrupt handlers). Numerous program analysis and testing techniques have been proposed to detect races in multithreaded programs. Little work, however, has addressed race condition problems related to hardware interrupts. In this paper, we present SDRacer, an automated framework that can detect, validate and repair race conditions in interrupt-driven embedded software. It uses a combination of static analysis and symbolic execution to generate input data for exercising the potential races. It then employs virtual platforms to dynamically validate these races by forcing the interrupts to occur at the potential racing points. Finally, it provides repair candidates to eliminate the detected races. We evaluate SDRacer on nine real-world embedded programs written in C language. The results show that SDRacer can precisely detect and successfully fix race conditions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑