Usenix Association 10th Usenix Symposium on Operating Systems Design and Implementation (osdi '12) 279 Symdrive: Testing Drivers without Devices

Usenix Association 10th Usenix Symposium on Operating Systems Design and Implementation (osdi '12) 279 Symdrive: Testing Drivers without Devices
复制标题

DOI:
--
复制
发表时间:
2012-10
期刊:
--
影响因子:
--
通讯作者:
Matthew J. Renzelmann;Asim Kadav;M. Swift
Matthew J. Renzelmann;Asim Kadav;M. Swift
中科院分区:
其他
文献类型:
--
作者:
Matthew J. Renzelmann;Asim Kadav;M. Swift

文献摘要

被引文献

相似文献

设备驱动程序开发和测试是一项复杂且容易出错的工作。例如,测试错误处理代码需要模拟来自设备的错误输入。单个驱动程序可能支持数十个设备,而开发人员可能无权访问其中任何一个。因此,许多 Linux 驱动程序补丁都包含注释“仅编译测试”。 SymDrive 是一个用于在设备不存在的情况下测试 Linux 和 FreeBSD 驱动程序的系统。该系统使用符号执行来消除对硬件的需求,并通过三个新功能扩展了过去的工具。首先,SymDrive 使用静态分析和源到源转换来大大减少测试新驱动程序的工作量。其次,SymDrive 检查器是普通的 C 代码,在内核中执行,它们可以完全访问内核和驱动程序状态。最后,SymDrive 提供了一个执行跟踪工具来识别补丁如何更改设备的 I/O 并比较设备驱动程序的实现。在将 SymDrive 应用到 21 个 Linux 驱动程序和 5 个 FreeBSD 驱动程序中,我们发现了 39 个错误。
Device-driver development and testing is a complex and error-prone undertaking. For example, testing error-handling code requires simulating faulty inputs from the device. A single driver may support dozens of devices, and a developer may not have access to any of them. Consequently, many Linux driver patches include the comment "compile tested only." SymDrive is a system for testing Linux and FreeBSD drivers without their devices present. The system uses symbolic execution to remove the need for hardware, and extends past tools with three new features. First, SymDrive uses static-analysis and source-to-source transformation to greatly reduce the effort of testing a new driver. Second, SymDrive checkers are ordinary C code and execute in the kernel, where they have full access to kernel and driver state. Finally, SymDrive provides an execution-tracing tool to identify how a patch changes I/O to the device and to compare device-driver implementations. In applying SymDrive to 21 Linux drivers and 5 FreeBSD drivers, we found 39 bugs.