September 2017
Beginner to intermediate
290 pages
6h 58m
English
Testing the module is much more simple than writing one. The compilation is not different from the usual; we simply compile it with the Flat Assembler:
# It is just the name of the output file that differs# The extension would be 'ko' - kernel object, instead# of 'o' for regular objectfasm lkm.asm lkm.ko
Once our kernel module is compiled, we need to ensure that it has the executable attribute set by running the chmod +x lkm.ko command in the Terminal.
In order to load the LKM into the currently running kernel, we use the insmode command in the following way:
sudo /sbin/insmode ./lkm.ko
We will not be given any error unless there is a serious problem with the format of the LKM (for example, invalid symbol version(s)). If ...
Read now
Unlock full access