微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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.

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

原文地址:https://www.jb51.cc/linux/394501.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐