Linux內(nèi)核錯誤追溯系統(tǒng)的研究與設計
發(fā)布時間:2018-07-04 10:50
本文選題:Linux + 錯誤追溯。 參考:《北京工業(yè)大學》2016年碩士論文
【摘要】:Linux內(nèi)核代碼量大、邏輯關(guān)系復雜,因此對內(nèi)核中的錯誤進行追溯和調(diào)試一直以來都是一件既耗費時間又耗費精力的事情。已有的錯誤追溯方法和技術(shù)種類繁多、效果各異,但幾乎都是面向一般的應用程序,很難或者無法適用到Linux內(nèi)核上,且傳統(tǒng)的Linux內(nèi)核錯誤調(diào)試方法復雜不直觀,對使用者要求也高。因此,研究并設計針對Linux內(nèi)核錯誤追溯的系統(tǒng)具有一定的研究和實用意義。Linux內(nèi)核錯誤按照錯誤的發(fā)生階段可以分為靜態(tài)編譯錯誤和動態(tài)運行錯誤。本文首先研究了國內(nèi)外錯誤追溯相關(guān)技術(shù),分析了各種錯誤追溯技術(shù)的特點,然后分別針對靜態(tài)編譯錯誤和動態(tài)運行錯誤提出了對應的錯誤處理方法,并結(jié)合已有技術(shù)設計并實現(xiàn)了Linux內(nèi)核錯誤追溯系統(tǒng)。主要研究內(nèi)容如下:1、針對靜態(tài)編譯錯誤,本文選擇需要頻繁跟隨內(nèi)核進行升級更新的設備驅(qū)動進行研究。Linux設備驅(qū)動數(shù)量眾多,在更新過程中會遇到大量編譯錯誤。本文采用靜態(tài)程序分析技術(shù)對不同版本間的Linux內(nèi)核接口進行了差異分析,并結(jié)合歷史提交信息檢索技術(shù)對設備驅(qū)動更新錯誤進行分析和解釋,設計并實現(xiàn)了可以對Linux設備驅(qū)動更新錯誤進行追溯的系統(tǒng)。2、針對動態(tài)運行錯誤,本文根據(jù)其錯誤信息少、難以定位的特點提出了一種靜態(tài)和動態(tài)程序分析技術(shù)相結(jié)合的方法進行錯誤追溯。靜態(tài)方面使用靜態(tài)程序分析技術(shù)對Linux內(nèi)核中的函數(shù)調(diào)用信息進行收集,并且對單一函數(shù)采用靜態(tài)后向程序切片技術(shù)來實現(xiàn)。動態(tài)方面,本文使用動態(tài)執(zhí)行信息收集技術(shù)對Linux內(nèi)核的運行過程進行記錄,用來在分析過程中還原真實的內(nèi)核執(zhí)行流程。兩種技術(shù)的結(jié)合使用可以確保能夠?qū)φ鎸嵾\行的函數(shù)進行程序切片,使得切片結(jié)果更加精確,更加便于開發(fā)者調(diào)試和追溯運行錯誤。3、最后對上述兩部分分別設計了實驗來驗證可行性。通過對幾個真實的設備驅(qū)動進行更新,并使用工具來輔助解決編譯問題,成功地將實驗中的設備驅(qū)動升級到版本較新的Linux內(nèi)核中。對于運行錯誤,則通過使用工具分析一個已知的Linux內(nèi)核錯誤來驗證方法的可行性。
[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.
【學位授予單位】:北京工業(yè)大學
【學位級別】:碩士
【學位授予年份】:2016
【分類號】:TP311.56;TP316.81
,
本文編號:2095832
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/2095832.html
最近更新
教材專著