Skip to content

Commit 1cd0d6c

Browse files
bwhacksrustyrussell
authored andcommitted
module: Enable dynamic debugging regardless of taint
Dynamic debugging is currently disabled for tainted modules, except for TAINT_CRAP. This prevents use of dynamic debugging for out-of-tree modules once the next patch is applied. This condition was apparently intended to avoid a crash if a force- loaded module has an incompatible definition of dynamic debug structures. However, a administrator that forces us to load a module is claiming that it *is* compatible even though it fails our version checks. If they are mistaken, there are any number of ways the module could crash the system. As a side-effect, proprietary and other tainted modules can now use dynamic_debug. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 43672a0 commit 1cd0d6c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎kernel/module.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,8 +2878,7 @@ static struct module *load_module(void __user *umod,
28782878
}
28792879

28802880
/* This has to be done once we're sure module name is unique. */
2881-
if (!mod->taints || mod->taints == (1U<<TAINT_CRAP))
2882-
dynamic_debug_setup(info.debug, info.num_debug);
2881+
dynamic_debug_setup(info.debug, info.num_debug);
28832882

28842883
/* Find duplicate symbols */
28852884
err = verify_export_symbols(mod);
@@ -2915,8 +2914,7 @@ static struct module *load_module(void __user *umod,
29152914
module_bug_cleanup(mod);
29162915

29172916
ddebug:
2918-
if (!mod->taints || mod->taints == (1U<<TAINT_CRAP))
2919-
dynamic_debug_remove(info.debug);
2917+
dynamic_debug_remove(info.debug);
29202918
unlock:
29212919
mutex_unlock(&module_mutex);
29222920
synchronize_sched();

0 commit comments

Comments
 (0)