Method and system for compiling kernel module

A kernel module and kernel technology, applied in the field of version compatibility assurance, can solve compatibility problems, cannot be compiled and loaded, affect the adaptability and usability of kernel modules, etc., and achieve the effect of expanding the scope and improving the adaptation efficiency

Inactive Publication Date: 2021-08-06
北京麟卓信息科技有限公司
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Due to reasons such as patching defects and upgrading functions, most operating system distributions will update the kernel frequently, and the updated kernel often only provides the header file package corresponding to the latest kernel, so the kernel module compiled based on the updated header file package cannot be used in the Compile and load on the previous kernel version without this header file package
However, many kernel modules need to be verified on different versions of the kernel. The above verification mechanism will cause compatibility problems between the kernel modules of different versions of the system kernel, thus affecting the adaptability and usability of the kernel module.

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
  • Method and system for compiling kernel module
  • Method and system for compiling kernel module

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] The present invention will be described in detail below with reference to the accompanying drawings and examples.

[0023] In the Linux 4.4 kernel, the VERMAGIC_STRING variable is defined in linux / vermagic.h. The variable VERMAGIC_STRING contains not only the kernel version number, but also the gcc version, SMP and PREEMPT configuration information used by the kernel. During the compilation process of the kernel module, the "MODPOST" stage will add the content of VERMAGIC_STRING to the modinfo section of the kernel module. In the scripts\mod\modpost.c file under the kernel source code directory, you can see the code of the subsequent processing part of the kernel module. In addition, after the kernel module is compiled and generated, you can use the `modinfomymodule.ko` command to check the vermagic and other information of the kernel module. The version information of the kernel is stored in the kernel module loader in the Linux4.4 kernel. When loading the kernel modu...

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 method and a system for compiling a kernel module, which can effectively improve the compilation adaptation efficiency of the kernel module and a target kernel by pre-generating multiple versions of kernel modules, and can further expand the range of the kernel adapted to the kernel module by introducing a detection mechanism for detecting whether the kernel has a header file package or not.

Description

technical field [0001] The invention belongs to the technical field of operating system kernel and version compatibility assurance when kernel modules are compiled, and in particular relates to a kernel module compiling method and system. Background technique [0002] In order to improve the operating efficiency of the operating system, most mainstream open source operating systems currently adopt a single-block kernel structure, such as Linux, FreeBSD, etc., that is to say, the entire system kernel runs in a separate protection domain. However, the single-block kernel The structure has problems such as relatively poor scalability and maintainability. In order to make up for this defect, the existing single-block kernel operating system often adopts a modular mechanism to run, that is, allows dynamic insertion or deletion of kernel modules when the kernel is running. [0003] The kernel module is a socket provided by the operating system kernel to the outside, which is call...

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): G06F8/41G06F8/71
CPCG06F8/41G06F8/71
Inventor 温研
Owner 北京麟卓信息科技有限公司
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