![]() But one of the specifics of the Linux kernel is a rather high resistance to errors in the modules’ code. It rests some additional responsibility in the developer: if there is an error in the user level program, the results of this error will affect mainly the user program if an error occurs in the kernel module, it may affect the whole system. The module code is executed in the kernel context. It is connected with the fact that the kernel source pieces of code, namely, header files, can contain C++ key words such as new, delete and the assembler pieces of code can contain the ‘::’ lexeme. The development of drivers for Linux OS is possible only in C and assembler languages, but not in C++ language (as for the Microsoft Windows kernel). The Linux kernel is written in 2 languages: C and assembler (the architecture dependent parts). The Linux kernel can load a module to its address space and link the module with itself. This article deals with the kernel modules exactly.Ī module is an object file prepared in a special way. That is why the driver for it should be compiled together with the kernel itself or should be implemented in the form of a kernel module to avoid the recompiling of the kernel when driver adding is needed. The article concerns the Linux kernel version 2.6.32 because other kernel versions can have the modified API, which is used in examples or in the build system. The work with the “user level” memory from the kernel.Meanwhile, I will touch upon the following questions: In this article, I am going to describe the process of writing and building of a simple driver-module for Linux OS. The Usage of Memory Allocated in the User Mode. ![]() ![]() Functions of Module Loading and Unloading.
0 Comments
Leave a Reply. |