Font Size: a A A

Error Detection Of Dynamic Memory For Linux Kernel

Posted on:2016-08-24Degree:MasterType:Thesis
Country:ChinaCandidate:C HeFull Text:PDF
GTID:2308330470474849Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Recently, Linux has stood out from the completion of operating systems, due to its open sources, multiple functions as well as the stability of the system. However, with the widely use of Linux, an increasing number of security problems were reported. The operating system is the base of the software system. So the security issue of the operating system will have strong influence on the safety of the whole computer system. Studies have shown that memory issue is the leading cause of vulnerabilities in the operating system.Linux operating system is written in C programming language. And all the dynamic memory interfaces of the system at the kernel level are C language interfaces. But the limitation of the C language causes some inevitable problems. For example, programmers have to manually call appropriate functions when using C language to allocate or free up the dynamic memory. Unlike other high-level programming languages such as JAVA and Python, C does not have garbage collection. Therefore, it is unable to ensure the reliability of the codes during the allocation and deallocation of the dynamic memory.Currently, there is a great variety of test tools on memory issue with various test methods and detectability. But most of the tools only focus on the issue of user space groups. For Linux systems, there are huge difference in the management methods between kernel space and user space. Thus those tools are unable to detect the errors of the memory in the kernel. Although some simple tools have already been integrated into the kernel of Linux to detect memory errors, they are particularly cumbersome to use. Moreover, reconfiguration and recompilation of the kernel are required every time those tools are used, which tremendously degrades the performance of the whole system.In this paper, we study the exiting tools and methods both in China and abroad for memory errors detection, as well as the applicable conditions of each tool and method. We also look into the allocation and deallocation of the dynamic memory. Classification and illustration are given for errors of the dynamic memory. Meanwhile, we explore the administrative mechanisms of the dynamic memory in Linux kernel. Focused on specific hardware platforms, extensive investigation is conducted on the paging mechanism of the Linux kernel. Then we establish an error detection model for the dynamic memory in the Linux kernel, based on the page-fault mechanism in memory management. The detection framework of the model includes the detection of memory overflow as well as the detection of uninitialized memory access. Since the framework is extensible, it is achievable to then develop detection tools that meet specific needs. In the last part of this paper, we test this model through functional test and performance test and analyze the test results. And future study and development of the framework is also discussed.
Keywords/Search Tags:Linux Kernel, memory errors, page-fault
PDF Full Text Request
Related items