摘要
提出一种日志自动注入的方法,解决驱动程序中的内核扩展函数调用不规范的问题。首先静态扫描源程序,当发现程序中调用了内核扩展函数但没有检测返回值时,则在调用后自动插入对返回值的检测代码,并使得这些函数在执行发生错误时会被日志记录。一旦系统发生崩溃,这些日志信息将成为关键的调试依据。实验结果表明,该方法对系统性能影响很小,且可以帮助调试人员更高效地定位和调试内核模块错误。
An automatic log injection method is proposed to solve the non-standard calling of the kernel extension functions in de-vice driver.Firstly the source code is scanned statically,and checking code is inserted automatically when the return value of the kernel extension function is not checked.At the same time,a log is recorded when these functions return errors.Once the system crashes,these important logs will be the key evidence to debug.The experiment shows that,our method has little influence to the system performance and can help the programmers locate and debug the kernel module error efficiently.
出处
《中国科技论文》
CAS
北大核心
2015年第14期1605-1609,共5页
China Sciencepaper
基金
北京高等教育青年教师基金资助项目(YETP0108)
关键词
内核扩展函数
日志注入
驱动错误
程序检测
kernel extension function
log injection
driver error
program testing