Bug 119301 - suggest disable 'module.dyndbg' format for module init.
Summary: suggest disable 'module.dyndbg' format for module init.
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_modules
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-31 01:46 UTC by hujunjie
Modified: 2016-05-31 01:46 UTC (History)
0 users

See Also:
Kernel Version: 4.6
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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';
--------------------------------

Note You need to log in before you can comment on or make changes to this bug.