insmod和modprobe有什么区别? [英] What's the difference between insmod and modprobe?
问题描述
我知道insmod
和modprobe
用于将模块插入内核.
但是,它们之间有什么区别?
I know insmod
and modprobe
are used to insert module into the kernel.
But, what's the difference between them?
而且,为什么在modprobe中插入带有force
选项的模块会有危险吗?
And, why is it dangerous to insert modules with force
option in modprobe?
推荐答案
modprobe
是insmod
的智能版本. insmod
只是添加一个模块,其中modprobe
查找任何依赖项(如果该特定模块依赖于任何其他模块)并加载它们.
modprobe
is the intelligent version of insmod
. insmod
simply adds a module where modprobe
looks for any dependency (if that particular module is dependent on any other module) and loads them.
关于--force
选项,以下是手册页中的引言:
Regarding --force
option, here is the quote from the man page:
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.
表明已被用来跳过内核模块版本检查.如果您执行自己的内核模块或来自任何受信任方,则应该没有任何问题.但是你应该知道自己在做什么.
Which indicates it's been used to skip the kernel module version checking. Shouldn't be any problem if you do your own kernel module or from any trusted party. But you should know what you are doing.
这篇关于insmod和modprobe有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!