- Linux Device Driver Development Cookbook
- Rodolfo Giometti
- 135字
- 2021-06-24 13:54:15
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.
推薦閱讀
- Citrix XenApp Performance Essentials
- Learning OpenDaylight
- Google系統(tǒng)架構(gòu)解密:構(gòu)建安全可靠的系統(tǒng)
- 網(wǎng)絡(luò)操作系統(tǒng):Windows Server 2003管理與應(yīng)用
- 開(kāi)源安全運(yùn)維平臺(tái)OSSIM疑難解析:入門(mén)篇
- 嵌入式應(yīng)用程序設(shè)計(jì)綜合教程(微課版)
- Python基礎(chǔ)教程(第3版)
- 嵌入式Linux應(yīng)用開(kāi)發(fā)菜鳥(niǎo)進(jìn)階
- 奔跑吧 Linux內(nèi)核(入門(mén)篇)
- Linux自動(dòng)化運(yùn)維:Shell與Ansible(微課版)
- Windows 7中文版從入門(mén)到精通(修訂版)
- VMware Horizon View Essentials
- 分布式高可用架構(gòu)之道
- 從零開(kāi)始學(xué)安裝與重裝系統(tǒng)
- 應(yīng)急指揮信息系統(tǒng)設(shè)計(jì)