SymDrive: testing drivers without devices

Matthew J. Renzelmann, Asim Kadav, Michael M. Swift · 2012

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. Con-sequently, many Linux driver patches include the com-ment “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, Sym-Drive uses static-analysis and source-to-source transfor-mation to greatly reduce the effort of testing a new driver. Second, SymDrive checkers are ordinary C code and ex-ecute 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. 1

Read the paper · More papers on PaperTik