Complete Runtime Tracing for Device Drivers Based on LLVM

Jia Ju Bai, Hu Qiu Liu, Yu Ping Wang, Shi Min Hu

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Citation (Scopus)

Abstract

Device drivers often suffer from much more bugs than the kernel, so testing device drivers becomes more and more important and necessary. In software testing, runtime tracing is an important technique to monitor real executing procedures of the program. Meanwhile, runtime information can also assist the programmer to make more accurate analysis of the program, like verifying the correctness of code execution and detecting bugs. However, due to kernel-mode execution and high complexity of kernel code, completely tracing drivers is hard, which causes real execution paths can not be clearly identified. In order to provide more powerful support for software testing of device drivers, we propose a method named Driver Trace, to do complete runtime tracing at the function level. Driver Trace utilizes instrumentation technique for runtime tracing, which is implemented based on LLVM compiler infrastructure. When the target driver works, Driver Trace records complete runtime information of function calls, like function names, return values and parameter pointers, and the information is recorded in a log file for future analysis. We have successfully implemented Driver Trace on 10 real device drivers in Linux 3.16.4 and made the evaluation as well. The experimental results show that Driver Trace provides an effective method of runtime tracing for device drivers with the modest overhead. Moreover, using an automated analysis of the runtime information recorded by Driver Trace, we also find 6 violations about resource usages in these 10 device drivers.

Original languageEnglish
Title of host publicationProceedings - 2015 IEEE 39th Annual Computer Software and Applications Conference, COMPSAC 2015
EditorsGang Huang, Jingwei Yang, Sheikh Iqbal Ahamed, Pao-Ann Hsiung, Carl K. Chang, William Chu, Ivica Crnkovic
PublisherIEEE Computer Society
Pages200-209
Number of pages10
ISBN (Electronic)9781467365635
DOIs
Publication statusPublished - 21 Sept 2015
Externally publishedYes
Event39th IEEE Annual Computer Software and Applications Conference, COMPSAC 2015 - Taichung, Taiwan, Province of China
Duration: 1 Jul 20155 Jul 2015

Publication series

NameProceedings - International Computer Software and Applications Conference
Volume2
ISSN (Print)0730-3157

Conference

Conference39th IEEE Annual Computer Software and Applications Conference, COMPSAC 2015
Country/TerritoryTaiwan, Province of China
CityTaichung
Period1/07/155/07/15

Keywords

  • Device drivers
  • Instrumentation
  • LLVM
  • Runtime tracing
  • Testing

Fingerprint

Dive into the research topics of 'Complete Runtime Tracing for Device Drivers Based on LLVM'. Together they form a unique fingerprint.

Cite this