Re: [PATCH 18/25] dynamic_debug: Introduce global fake module param module.ddebug

From: Rusty Russell
Date: Wed Nov 30 2011 - 22:18:09 EST


On Wed, 30 Nov 2011 12:56:47 -0700, jim.cromie@xxxxxxxxx wrote:
> From: Jim Cromie <jim.cromie@xxxxxxxxx>
>
> Rework Thomas Renninger's $module.ddebug boot-time debugging feature,
> from https://lkml.org/lkml/2010/9/15/397
>
> Dynamic Debug allows enabling of pr_debug and dev_dbg messages at
> runtime. This is controlled via $DBGFS/dynamic_debug/control. One
> major drawback is that the whole initialization of a module cannot be
> tracked, because ddebug is only aware of debug strings of loaded
> modules. But this is the most interesting part...
>
> This patch introduces a fake module parameter module.ddebug (not shown
> in /sys/module/*/parameters, thus it does not use any resources). If
> a module passes ddebug as a module parameter (e.g. via module.ddebug
> kernel boot param or via "modprobe module ddebug"), all debug strings
> of this module get activated by issuing "module module_name +p"
> internally (not via sysfs) when the module gets loaded.
> A later patch extends this with an arg: module.ddebug="+mfp"

I think you're missing a neat trick here: we should be able to handle
ddebug in the handle_unknown parameter to parse_args().

Or am I missing something?

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/