Question: WILL UPVOTE, THANK YOU !!! Figure 2.21: Kernel module simple.c he function simple_init( is the module entry point, which represents the function that is invoked

WILL UPVOTE, THANK YOU !!! Figure 2.21: Kernel module simple.c he functionsimple_init( is the module entry point, which represents the function that isinvoked when the module is loaded into the kernel. Similarly, the simple_exit()WILL UPVOTE, THANK YOU !!!

Figure 2.21: Kernel module simple.c he function simple_init( is the module entry point, which represents the function that is invoked when the module is loaded into the kernel. Similarly, the simple_exit() function is the module exit point - the function that is called when the module is removed from the kernel. Task 1 (10 points) This kernel module simple.c is compiled using the Makefile accompanying the source code with this project. To compile the module, enter the following on the command line: make (Take a screenshot of your Terminal after executing this command) The compilation produces several files. The file simple.ko represents the compiled kernel module. The following step illustrates inserting this module into the Linux kernel. II. Loading and Removing Kernel Modules Task 2 (10 points) Kernel modules are loaded using the insmod command, which is run as follows: sudo insmod simple.ko (Take a screenshot of your Terminal after executing this command) Task 3 (10 points) To check whether the module has loaded, enter the lsmod command and search for the module simple. Recall that the module entry point is invoked when the module is inserted into the kernel. Task 4 (10 points) To check the contents of this message in the kernel log buffer, enter the command dmesg You should see the message "Loading Module." (Take a screenshot of your Terminal after executing this command. Make sure that the expected message is reflected in your screenshot) Task 5 (10 points) Removing the kernel module involves invoking the rmmod command (notice that the .ko suffix is unnecessary): sudo rmmod simple (Take a screenshot of your Terminal after executing this command) Task 6 (10 points) Be sure to check with the dmesg command to ensure the module has been removed. (Take a screenshot of your Terminal after executing this command. Make sure that the expected message is reflected in your screenshot) Because the kernel log buffer can fill up quickly, it often makes sense to clear the buffer periodically. This can be accomplished as follows

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!