Linux內(nèi)核錯(cuò)誤追溯系統(tǒng)的研究與設(shè)計(jì)
發(fā)布時(shí)間:2018-07-04 10:50
本文選題:Linux + 錯(cuò)誤追溯; 參考:《北京工業(yè)大學(xué)》2016年碩士論文
【摘要】:Linux內(nèi)核代碼量大、邏輯關(guān)系復(fù)雜,因此對(duì)內(nèi)核中的錯(cuò)誤進(jìn)行追溯和調(diào)試一直以來都是一件既耗費(fèi)時(shí)間又耗費(fèi)精力的事情。已有的錯(cuò)誤追溯方法和技術(shù)種類繁多、效果各異,但幾乎都是面向一般的應(yīng)用程序,很難或者無法適用到Linux內(nèi)核上,且傳統(tǒng)的Linux內(nèi)核錯(cuò)誤調(diào)試方法復(fù)雜不直觀,對(duì)使用者要求也高。因此,研究并設(shè)計(jì)針對(duì)Linux內(nèi)核錯(cuò)誤追溯的系統(tǒng)具有一定的研究和實(shí)用意義。Linux內(nèi)核錯(cuò)誤按照錯(cuò)誤的發(fā)生階段可以分為靜態(tài)編譯錯(cuò)誤和動(dòng)態(tài)運(yùn)行錯(cuò)誤。本文首先研究了國內(nèi)外錯(cuò)誤追溯相關(guān)技術(shù),分析了各種錯(cuò)誤追溯技術(shù)的特點(diǎn),然后分別針對(duì)靜態(tài)編譯錯(cuò)誤和動(dòng)態(tài)運(yùn)行錯(cuò)誤提出了對(duì)應(yīng)的錯(cuò)誤處理方法,并結(jié)合已有技術(shù)設(shè)計(jì)并實(shí)現(xiàn)了Linux內(nèi)核錯(cuò)誤追溯系統(tǒng)。主要研究內(nèi)容如下:1、針對(duì)靜態(tài)編譯錯(cuò)誤,本文選擇需要頻繁跟隨內(nèi)核進(jìn)行升級(jí)更新的設(shè)備驅(qū)動(dòng)進(jìn)行研究。Linux設(shè)備驅(qū)動(dòng)數(shù)量眾多,在更新過程中會(huì)遇到大量編譯錯(cuò)誤。本文采用靜態(tài)程序分析技術(shù)對(duì)不同版本間的Linux內(nèi)核接口進(jìn)行了差異分析,并結(jié)合歷史提交信息檢索技術(shù)對(duì)設(shè)備驅(qū)動(dòng)更新錯(cuò)誤進(jìn)行分析和解釋,設(shè)計(jì)并實(shí)現(xiàn)了可以對(duì)Linux設(shè)備驅(qū)動(dòng)更新錯(cuò)誤進(jìn)行追溯的系統(tǒng)。2、針對(duì)動(dòng)態(tài)運(yùn)行錯(cuò)誤,本文根據(jù)其錯(cuò)誤信息少、難以定位的特點(diǎn)提出了一種靜態(tài)和動(dòng)態(tài)程序分析技術(shù)相結(jié)合的方法進(jìn)行錯(cuò)誤追溯。靜態(tài)方面使用靜態(tài)程序分析技術(shù)對(duì)Linux內(nèi)核中的函數(shù)調(diào)用信息進(jìn)行收集,并且對(duì)單一函數(shù)采用靜態(tài)后向程序切片技術(shù)來實(shí)現(xiàn)。動(dòng)態(tài)方面,本文使用動(dòng)態(tài)執(zhí)行信息收集技術(shù)對(duì)Linux內(nèi)核的運(yùn)行過程進(jìn)行記錄,用來在分析過程中還原真實(shí)的內(nèi)核執(zhí)行流程。兩種技術(shù)的結(jié)合使用可以確保能夠?qū)φ鎸?shí)運(yùn)行的函數(shù)進(jìn)行程序切片,使得切片結(jié)果更加精確,更加便于開發(fā)者調(diào)試和追溯運(yùn)行錯(cuò)誤。3、最后對(duì)上述兩部分分別設(shè)計(jì)了實(shí)驗(yàn)來驗(yàn)證可行性。通過對(duì)幾個(gè)真實(shí)的設(shè)備驅(qū)動(dòng)進(jìn)行更新,并使用工具來輔助解決編譯問題,成功地將實(shí)驗(yàn)中的設(shè)備驅(qū)動(dòng)升級(jí)到版本較新的Linux內(nèi)核中。對(duì)于運(yùn)行錯(cuò)誤,則通過使用工具分析一個(gè)已知的Linux內(nèi)核錯(cuò)誤來驗(yàn)證方法的可行性。
[Abstract]:Linux kernel has a large amount of code and complex logic relations, so tracing and debugging errors in the kernel has always been a time-consuming and energy-consuming thing. There are many kinds of error tracing methods and techniques, but almost all of them are oriented to general applications, which are difficult or unable to be applied to Linux kernel, and the traditional methods of debugging errors in Linux kernel are complicated and not intuitionistic. High requirements for users. Therefore, the research and design of Linux kernel error tracing system has certain research and practical significance. Linux kernel errors can be divided into static compilation errors and dynamic running errors according to the occurrence stage of the errors. This paper first studies the related technologies of error tracing at home and abroad, analyzes the characteristics of various error tracing techniques, and then puts forward corresponding error handling methods for static compilation errors and dynamic running errors, respectively. The Linux kernel error tracing system is designed and implemented in combination with the existing technology. The main research contents are as follows: 1. Aiming at the static compilation error, this paper selects the device driver that needs to follow the kernel frequently to update the device driver. The Linux device driver has a large number of device drivers, and will encounter a large number of compilation errors in the update process. This paper analyzes the differences of Linux kernel interface between different versions by using static program analysis technology, and analyzes and explains the update error of device driver with history submission information retrieval technology. This paper designs and implements the system. 2, which can trace the update error of Linux device driver. This paper presents a method of combining static and dynamic program analysis techniques to trace errors. In the static aspect, the static program analysis technique is used to collect the function call information in the Linux kernel, and the static backward program slicing technique is used to realize the single function. On the dynamic side, this paper uses dynamic execution information collection technology to record the running process of Linux kernel, which is used to restore the real kernel execution flow in the analysis process. The combination of the two techniques ensures the ability to slice real-world functions, making the slicing results more accurate. It is more convenient for developers to debug and trace error. 3. Finally, experiments are designed to verify the feasibility of the above two parts. By updating several real device drivers and using tools to help solve the compilation problem, the experimental device drivers were successfully upgraded to the newer Linux kernel. For running errors, verify the feasibility of the method by analyzing a known Linux kernel error using a tool.
【學(xué)位授予單位】:北京工業(yè)大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2016
【分類號(hào)】:TP311.56;TP316.81
,
本文編號(hào):2095832
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/2095832.html
最近更新
教材專著