Bug 119301

Summary: suggest disable 'module.dyndbg' format for module init.
Product: Other Reporter: hujunjie (jj.net)
Component: ModulesAssignee: other_modules
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.6 Subsystem:
Regression: No Bisected commit-id:

Description hujunjie 2016-05-31 01:46:04 UTC
dynamic debug use 'dyndbg=QUERY' or "module.dyndbg=QUERY".
execute the QUERY string in kernel init or module init.
module.dyndbg is design for kernel init.
but meaningless and confused when use in module init.
for ex: insmod foo.ko atkbd.dyndbg="+p"
will enable atkbd's all pr_debug to printk even key press.


i think should disabled it:
lib/dynamic_debug.c
--------------------------------
static int ddebug_dyndbg_param_cb(char *param, char *val,
                  const char *modname, int on_err)
{
    char *sep;
-   sep = strchr(param, ".");
-   if (sep) {
+   if (!modname && (sep = strchr(param, '.'))) {
      /* need only for ddebug_dyndbg_boot_param_cb */
      *sep = '\0';
--------------------------------