Linux kernel module relation extracting method based on compiling options

A technology of compilation options and kernel modules, applied in the field of source code analysis of the Linux kernel, can solve problems such as long-term, difficult to understand intuitively, complicated installation and configuration, etc., and achieve the effect of simple use

Inactive Publication Date: 2014-04-02
PEKING UNIV
View PDF5 Cites 26 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, Doxygen has significant disadvantages
First, its installation and configuration are relatively complicated, and it takes a long time to generate all the function diagrams of the Linux source code
Second, it cannot give the architecture diagram of the Linux source code from a macro perspective, and it is difficult for users to have an intuitive understanding of Linux from a macro perspective

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Linux kernel module relation extracting method based on compiling options
  • Linux kernel module relation extracting method based on compiling options
  • Linux kernel module relation extracting method based on compiling options

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The system architecture construction flow chart of the present invention is as follows figure 2 As shown, our system is implemented using B / S architecture. It mainly consists of three parts, such as image 3 Shown:

[0046] 1. Relationship crawling part: here we use python language, according to the strategy introduced in the second part of the content of the invention, analyze the kernel source code, and store the source code structure and relationship in the database.

[0047] Specific process such as Figure 4 , as shown in the flow chart of the crawling module: First, we need to divide the virtual directory, and establish a one-to-one correspondence between the full path of any source code file stored in the virtual directory in the database and the full path in the kernel source code; then by analyzing each The Kconfig file in the real directory can obtain each compilation option, so that the virtual directory and the compilation option can be matched. Then by...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a Linux kernel module relation extracting method based on compiling options. The method includes the steps of 1), dividing kernel source codes according to the functions and logic relations of the same to form virtual directories; 2), performing syntactic analysis on each Kconfig file under Linux real directories to identify all the compiling options; analyzing the source code file required by each compiling option from the compiling file under the same directory; 3), according to the virtual directories, using the source code files as intermediary agents, dividing the compiling options into corresponding virtual directories; 4), performing regular analysis on each source code file to obtain the function and variable defined in the source code file; 5), analyzing the specific realizing source code of each function and variable to extract the calling relations among functions and variables; 6), constructing a kernel framework according to the relations. The method has the advantages the method does not rely on one kernel version, and the relations among kernel modules can be obtained clearly.

Description

technical field [0001] The invention belongs to the field of source code analysis of the Linux kernel, and relates to a method for extracting relationship between Linux kernel modules based on compiling options. Background technique [0002] The Linux kernel interactive graphic software is based on the Linux kernel source code, with compilation options as the core, to analyze and sort out the relationship between the kernel levels (directory level, compilation option level, file level and function, variable level), and through the vector diagram to clearly and explicitly show the kernel architecture and relationships. [0003] The Linux operating system is increasingly widely used in commercial servers and personal desktop systems due to its many advantages such as open source code, high performance and high reliability. In recent years, with the continuous development and improvement of the Linux kernel, the kernel has become increasingly large, and it has become relativel...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 荆琦
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products