insmod和modprobe有什么区别? [英] What's the difference between insmod and modprobe?

查看:172
本文介绍了insmod和modprobe有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

推荐答案

modprobeinsmod的智能版本. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆