linux – insmod和modprobe有什么区别?

前端之家收集整理的这篇文章主要介绍了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.f2er.com/linux/394501.html

猜你在找的Linux相关文章