加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – insmod和modprobe有什么区别?

发布时间:2020-05-23 15:42:52 所属栏目:Linux 来源:互联网
导读:我知道insmod和modprobe用于将模块插入内核. 但是,它们之间有什么区别? 并且,为什么在modprobe中插入带有force选项的模块很危险? modprobe是insmod的智能版本. 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.

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

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读