From 826e4506a0acb6487910a5ebafe839f708a00e1c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 4 May 2008 17:04:16 -0700 Subject: Make forced module loading optional The kernel module loader used to be much too happy to allow loading of modules for the wrong kernel version by default. For example, if you had MODVERSIONS enabled, but tried to load a module with no version info, it would happily load it and taint the kernel - whether it was likely to actually work or not! Generally, such forced module loading should be considered a really really bad idea, so make it conditional on a new config option (MODULE_FORCE_LOAD), and make it default to off. If somebody really wants to force module loads, that's their problem, but we should not encourage it. Especially as it happened to me by mistake (ie regular unversioned Fedora modules getting loaded) causing lots of strange behavior. Signed-off-by: Linus Torvalds --- init/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'init') diff --git a/init/Kconfig b/init/Kconfig index 6a44defac3ec..f0e62e5ce0dc 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -825,6 +825,15 @@ menuconfig MODULES If unsure, say Y. +config MODULE_FORCE_LOAD + bool "Forced module loading" + depends on MODULES + default n + help + This option allows loading of modules even if that would set the + 'F' (forced) taint, due to lack of version info. Which is + usually a really bad idea. + config MODULE_UNLOAD bool "Module unloading" depends on MODULES -- cgit v1.2.1