System Call Implementation

Figure 7-4 shows the code flow diagram for sys_init_module.

sys_init_module1

load_module|

Insert module into kernel list

mod->init|

Free initialization area

Figure 7-4: Code flow diagram for sys_init_module.

The binary data are transferred into the kernel address space using load_module. All required relocations are performed, and all references are resolved. The arguments are converted into a form that is easy to analyze (a table of kernel_param instances), and an instance of the module data structure is created with all the necessary information on the module.

Once the module instance created in the load_module function has been added to the global modules list, all the kernel need do is to call the module initialization function and free the memory occupied by the initialization data.

Continue reading here: Loading Modules

Was this article helpful?

0 0