gpt4 book ai didi

linux - insmod 和 modprobe 有什么区别?

转载 作者:IT王子 更新时间:2023-10-29 00:17:45 25 4
gpt4 key购买 nike

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

而且,为什么在 modprobe 中使用 force 选项插入模块是危险的?

最佳答案

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

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

关于linux - insmod 和 modprobe 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22891705/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com