Re: Fwd: Re: Why is dynamic debug disabled for staging drivers ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 6 Apr 2011 17:09:04 +0200, "Roland Vossen" <rvossen@xxxxxxxxxxxx> wrote:
> Hello Rusty,
> 
> I would like to make a change to module.c and noticed with 'git blame' 
> that you were the last person who touched these specific lines in module.c:
> 
> http://lxr.linux.no/#linux+v2.6.38/kernel/module.c#L2792
> 
> ===== Corresponding commit for your reference:
> 
> commit 811d66a0e1e99902d365497eec7884113a2665bd
> Author: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> Date:   Thu Aug 5 12:59:12 2010 -0600
> 
> module: group post-relocation functions into post_relocation()
> 
> This simply hoists more code out of load_module; we also put the
> identification of the extable and dynamic debug table in with the
> others in find_module_sections().
> 
> We move the taint check to the actual add/remove of the dynamic debug
> info: this is certain (find_module_sections is too early).
> 
> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> Cc: Yehuda Sadeh <yehuda@xxxxxxxxxxxxxxx>
> 
> ==============
> 
> 
> Can you tell me if the following proposed code change in module.c is ok 
> with you:
> 
> 	/* This has to be done once we're sure module name is unique. */
> 	if (!mod->taints || mod->taints == (1U << TAINT_CRAP))
> 		dynamic_debug_setup(info.debug, info.num_debug);
> 
> Thanks, Roland.
> 
> 
> -------- Original Message --------
> Subject: Re: Why is dynamic debug disabled for staging drivers ?
> Date: Wed, 6 Apr 2011 07:13:29 -0700
> From: Greg KH <greg@xxxxxxxxx>
> To: Roland Vossen <rvossen@xxxxxxxxxxxx>
> CC: devel@xxxxxxxxxxxxxxxxxxxxxx <devel@xxxxxxxxxxxxxxxxxxxxxx>
> 
> On Wed, Apr 06, 2011 at 03:54:37PM +0200, Roland Vossen wrote:
> > Hi,
> >
> > I want to replace the proprietary logging mechanism in brcm80211
> > with a Linux mechanism. 'Dynamic debug' seemed to be a good fit.
> > But, to my disappointment, I discovered that dynamic debugging is
> > not supported for drivers from the staging dir:
> >
> > - staging drivers are marked tainted (ref:
> > http://lxr.linux.no/#linux+v2.6.38/kernel/module.c#L2417)
> >
> > - subsequently tainted drivers don't get dynamic debug goodies (ref:
> > http://lxr.linux.no/#linux+v2.6.38/kernel/module.c#L2792)
> >
> > I wonder if this is intentional behavior. Does anybody know ?
> 
> Ah, no it isn't.  I didn't realize that tainted modules didn't get
> dynamic debug stuff, that's not nice.  I'd be glad to take a fix that
> allows drivers tainted with the TAINT_CRAP flag to be able to use
> dynamic debug.
> 
> In looking at that check, it probably can be fixed to just make sure
> that the module name is unique (i.e. only a specific taint flag check)
> which is the real goal of that check in module.c.

That's a red herring.  I think it was originally to do with avoiding
hooks for proprietary modules, but it'd take some serious archeology to
find that discussion.

(BTW, is there a simple way of doing a git blame on an older version of
a particular file, when the first git blame refers to a refactoring
patch and you want to dig deeper?)

But a slightly neater change would seem to be:

        /* If tainted for any reason other than staging, don't touch it... */
        if ((mod->taints & ~(1U << TAINT_CRAP) == 0)
                dynamic_debug_setup(info.debug, info.num_debug);

Thanks,
Rusty.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux