linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fnmatch for modprobe.d "options" commands?
@ 2015-08-07  9:31 Ari Entlich
  2015-08-07 10:21 ` Lucas De Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Ari Entlich @ 2015-08-07  9:31 UTC (permalink / raw)
  To: linux-modules

I am trying to do some debugging of a sound issue, and in the process
I am having to use the "dynamic debug" feature of the kernel. I would
like to enable all debug messages for all of the sound modules on my
system. Once all of the modules are loaded, I can do this:

echo 'module snd* +p' > /sys/kernel/debug/dynamic_debug/control

However, by the time I do this, most of the messages that would have
happened have already happened. There is a module argument "dyndbg"
which can be used to set dynamic debug flags for a module, which will
obviously take effect immediately once the module has loaded. However,
in order to do the same thing that I am doing with the control file
above, I'd have to add options commands to my modprobe.d files for
each sound module on my system, or at least for each one which I know
will be loaded. Ideally, I'd like to be able to do this:

options snd* dyndbg="+p"

>From my reading of the kmod source code, it looks like enabling this
sort of thing would be a very trivial patch to the
kmod_module_get_options function in libkmod-module.c. Furthermore, it
looks like other modprobe.d commands (install, softdep, and remove)
are already using fnmatch for the module name. Would it be possible to
add the options command to that list?

Whether this change is made or not, it might be a good idea to update
the documentation to reflect the fact that fnmatch is being used for
some of the commands.

Thanks!

Ari

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: fnmatch for modprobe.d "options" commands?
  2015-08-07  9:31 fnmatch for modprobe.d "options" commands? Ari Entlich
@ 2015-08-07 10:21 ` Lucas De Marchi
  2015-08-25 15:23   ` Lucas De Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas De Marchi @ 2015-08-07 10:21 UTC (permalink / raw)
  To: Ari Entlich; +Cc: linux-modules

Hi Ari,

On Fri, Aug 7, 2015 at 6:31 AM, Ari Entlich <atrigent@gmail.com> wrote:
> I am trying to do some debugging of a sound issue, and in the process
> I am having to use the "dynamic debug" feature of the kernel. I would
> like to enable all debug messages for all of the sound modules on my
> system. Once all of the modules are loaded, I can do this:
>
> echo 'module snd* +p' > /sys/kernel/debug/dynamic_debug/control
>
> However, by the time I do this, most of the messages that would have
> happened have already happened. There is a module argument "dyndbg"
> which can be used to set dynamic debug flags for a module, which will
> obviously take effect immediately once the module has loaded. However,
> in order to do the same thing that I am doing with the control file
> above, I'd have to add options commands to my modprobe.d files for
> each sound module on my system, or at least for each one which I know
> will be loaded. Ideally, I'd like to be able to do this:
>
> options snd* dyndbg="+p"

makes a lot of sense.

>
> From my reading of the kmod source code, it looks like enabling this
> sort of thing would be a very trivial patch to the
> kmod_module_get_options function in libkmod-module.c. Furthermore, it

yep, mostly an oneliner.

> looks like other modprobe.d commands (install, softdep, and remove)
> are already using fnmatch for the module name. Would it be possible to
> add the options command to that list?
>
> Whether this change is made or not, it might be a good idea to update
> the documentation to reflect the fact that fnmatch is being used for
> some of the commands.

Could you send the patches to add fnmatch to options and update the man pages?
I see no reason why we couldn't do like you said.

thanks

-- 
Lucas De Marchi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: fnmatch for modprobe.d "options" commands?
  2015-08-07 10:21 ` Lucas De Marchi
@ 2015-08-25 15:23   ` Lucas De Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Lucas De Marchi @ 2015-08-25 15:23 UTC (permalink / raw)
  To: Ari Entlich; +Cc: linux-modules

Hi Ari,

Just a ping to know if you are going to send a patch.

Lucas De Marchi

On Fri, Aug 7, 2015 at 7:21 AM, Lucas De Marchi
<lucas.de.marchi@gmail.com> wrote:
> Hi Ari,
>
> On Fri, Aug 7, 2015 at 6:31 AM, Ari Entlich <atrigent@gmail.com> wrote:
>> I am trying to do some debugging of a sound issue, and in the process
>> I am having to use the "dynamic debug" feature of the kernel. I would
>> like to enable all debug messages for all of the sound modules on my
>> system. Once all of the modules are loaded, I can do this:
>>
>> echo 'module snd* +p' > /sys/kernel/debug/dynamic_debug/control
>>
>> However, by the time I do this, most of the messages that would have
>> happened have already happened. There is a module argument "dyndbg"
>> which can be used to set dynamic debug flags for a module, which will
>> obviously take effect immediately once the module has loaded. However,
>> in order to do the same thing that I am doing with the control file
>> above, I'd have to add options commands to my modprobe.d files for
>> each sound module on my system, or at least for each one which I know
>> will be loaded. Ideally, I'd like to be able to do this:
>>
>> options snd* dyndbg="+p"
>
> makes a lot of sense.
>
>>
>> From my reading of the kmod source code, it looks like enabling this
>> sort of thing would be a very trivial patch to the
>> kmod_module_get_options function in libkmod-module.c. Furthermore, it
>
> yep, mostly an oneliner.
>
>> looks like other modprobe.d commands (install, softdep, and remove)
>> are already using fnmatch for the module name. Would it be possible to
>> add the options command to that list?
>>
>> Whether this change is made or not, it might be a good idea to update
>> the documentation to reflect the fact that fnmatch is being used for
>> some of the commands.
>
> Could you send the patches to add fnmatch to options and update the man pages?
> I see no reason why we couldn't do like you said.
>
> thanks
>
> --
> Lucas De Marchi



-- 
Lucas De Marchi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-25 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07  9:31 fnmatch for modprobe.d "options" commands? Ari Entlich
2015-08-07 10:21 ` Lucas De Marchi
2015-08-25 15:23   ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).