官术网_书友最值得收藏!

How it works...

The insmod command just takes our module and inserts it into the kernel; after that, it executes the module_init() function.

During module insertion, if we're over an SSH connection, we'll see nothing on the Terminal and we have to use dmesg to see kernel messages (or tail on the /var/log/kern.log file, as discussed previously); otherwise, on the serial console, after inserting the module, we should see something like the following:

dummy_code: loading out-of-tree module taints kernel.
dummy_code:dummy_code_init: dummy-code loaded
Note that the message, loading out-of-tree module taints kernel, is just a warning and can be safely ignored for our purposes. See https://www.kernel.org/doc/html/v4.15/admin-guide/tainted-kernels.html for further information about tainted kernels.

The rmmod command does the inverse steps of insmod, that is, it executes the module_exit() function and then removes the module from the kernel.

主站蜘蛛池模板: 开封县| 河津市| 泗洪县| 阿巴嘎旗| 永清县| 内黄县| 大理市| 丰原市| 海兴县| 易门县| 闽清县| 仪征市| 清水河县| 惠安县| 碌曲县| 龙游县| 连云港市| 宁河县| 平乡县| 东平县| 安多县| 准格尔旗| 临泽县| 濉溪县| 元谋县| 青浦区| 垦利县| 沐川县| 澜沧| 莒南县| 兖州市| 进贤县| 临安市| 岳普湖县| 永修县| 靖边县| 韩城市| 镇坪县| 开远市| 苏尼特左旗| 桐柏县|