linux – insmod和modprobe有什么区别?

我知道insmod和modprobe用于将模块插入内核.
但是,它们之间有什么区别?

并且,为什么在modprobe中插入带有force选项的模块很危险?

解决方法

modprobe是insmod的智能版本. insmod只是添加一个模块,其中modprobe查找任何依赖项(如果该特定模块依赖于任何其他模块)并加载它们.

关于–force选项,这里是手册页的引用:

Try to strip any versioning information from the module which might otherwise
   stop it from loading: this is the same as using both --force-vermagic and
   --force-modversion. Naturally,these checks are there for your protection,so using this option is dangerous unless you kNow what you are doing.

这表明它已被用于跳过内核模块版本检查.如果您使用自己的内核模块或来自任何可信方,则不应该有任何问题.但是你应该知道你在做什么.

相关文章

1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...
如何抑制stable_secret读取关键的“net.ipv6.conf.all.stabl...
1 删除0字节文件 find -type f -size 0 -exec rm -rf {} ...
## 步骤 1:安装必要的软件包 首先,需要确保系统已安装 `dh...