linux – insmod和modprobe有什么区别?
发布时间:2020-12-13 18:50:10 所属栏目: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. 这表明它已被用于跳过内核模块版本检查.如果您使用自己的内核模块或来自任何可信方,则不应该有任何问题.但是你应该知道你在做什么. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |