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

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.

主站蜘蛛池模板: 长丰县| 八宿县| 武宣县| 夏津县| 紫金县| 循化| 新源县| 洛扎县| 乌鲁木齐县| 三河市| 宁河县| 喀什市| 民丰县| 德昌县| 翁源县| 南昌市| 丰县| 江川县| 德格县| 揭东县| 芜湖县| 贵阳市| 同江市| 闽清县| 响水县| 井研县| 巴楚县| 体育| 寿光市| 镇康县| 湖北省| 韶山市| 丰镇市| 平潭县| 龙江县| 博兴县| 长海县| 安达市| 通江县| 勐海县| 沂源县|