TY - JOUR
T1 - A method to mine sequence dependent rules and detect violations for kernel extension interfaces
AU - Liu, Hu Qiu
AU - Bai, Jia Ju
AU - Wang, Yu Ping
N1 - Publisher Copyright:
©, 2015, Science Press. All right reserved.
PY - 2015/5/1
Y1 - 2015/5/1
N2 - Kernel extension functions are provided to drivers in the form of interfaces, to manage devices and resources. There are many sequence dependent rules in these interfaces, like the spin lock must be initialized before being locked, and then unlocked; the memory allocated for probing the device should be released when removing the device. However, due to driver developers' ignorance or unawareness of using these rules of the interfaces, a lot of violations may occur, which harms the reliability of drivers. This paper presents a method to mine the sequence dependent rules and detect violations for the kernel extension interfaces (SD-Miner). SD-Miner associates the structure of drivers, and exploits the statistic method to mine and extract sequence dependent rules, and it detects violations on the source code of drivers with extracted rules. SD-Miner has checked two versions of Linux 2.6.38 and 3.10.10, and 64 bugs detected in 2.6.38 have been fixed in 3.10.10. 220 sequence dependent rules have been extracted from 3.10.10, and 756 violations have been detected as well. It only costs about 5 minutes to mine rules and detect violations for Linux 3.10.10. The selected 50 bugs have been reported to the developers, and 20 bugs (among 25 replies) have been confirmed. All the experimental evaluation results show that SD-Miner can mine sequence dependent rules for kernel extension interfaces effectively, and it also can detect real violations from the source code of drivers. Besides, with the help of SD-Miner, programmers can improve the reliability of drivers, without adding special notations to drivers.
AB - Kernel extension functions are provided to drivers in the form of interfaces, to manage devices and resources. There are many sequence dependent rules in these interfaces, like the spin lock must be initialized before being locked, and then unlocked; the memory allocated for probing the device should be released when removing the device. However, due to driver developers' ignorance or unawareness of using these rules of the interfaces, a lot of violations may occur, which harms the reliability of drivers. This paper presents a method to mine the sequence dependent rules and detect violations for the kernel extension interfaces (SD-Miner). SD-Miner associates the structure of drivers, and exploits the statistic method to mine and extract sequence dependent rules, and it detects violations on the source code of drivers with extracted rules. SD-Miner has checked two versions of Linux 2.6.38 and 3.10.10, and 64 bugs detected in 2.6.38 have been fixed in 3.10.10. 220 sequence dependent rules have been extracted from 3.10.10, and 756 violations have been detected as well. It only costs about 5 minutes to mine rules and detect violations for Linux 3.10.10. The selected 50 bugs have been reported to the developers, and 20 bugs (among 25 replies) have been confirmed. All the experimental evaluation results show that SD-Miner can mine sequence dependent rules for kernel extension interfaces effectively, and it also can detect real violations from the source code of drivers. Besides, with the help of SD-Miner, programmers can improve the reliability of drivers, without adding special notations to drivers.
KW - Kernel extension functions
KW - Rules mining
KW - Sequence dependent rules
KW - Violation detection
UR - http://www.scopus.com/inward/record.url?scp=84930156160&partnerID=8YFLogxK
U2 - 10.3724/SP.J.1016.2015.01007
DO - 10.3724/SP.J.1016.2015.01007
M3 - Article
AN - SCOPUS:84930156160
SN - 0254-4164
VL - 38
SP - 1007
EP - 1019
JO - Jisuanji Xuebao/Chinese Journal of Computers
JF - Jisuanji Xuebao/Chinese Journal of Computers
IS - 5
ER -