lkml.org 
[lkml]   [2010]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2][GIT PULL] tracing: Prevent unloadable modules from using trace_bprintk()
Date
On Fri, 22 Oct 2010 09:04:23 am Steven Rostedt wrote:
> On Fri, 2010-10-22 at 08:05 +1030, Rusty Russell wrote:
> > On Fri, 22 Oct 2010 12:15:42 am Steven Rostedt wrote:
> > >
> > > Ingo,
> > >
> > > This is based off of my core-2 branch. I'm moved this patch after that
> > > so if anyone has any objections, I can change this patch without holding
> > > off the previous one.
> >
> > I think disabling use in modules is lazy,
>
> and safer.

Well then just delete trace_bprintk altogether. Even safer!

> > Can't you detect this on module unload and fix it up? Or delay freeing the
> > module until the trace ring is emptied?
>
> One possibility is to magically make all string formats used in
> trace_printk into its own section, and keep it allocated until the ring
> buffer is empty. Or, we can just do that with the module's entire string
> section, since we know whether or not that module has a trace_printk in
> it or not.

Exactly. Set a flag in the module if it resolves trace_printk, and defer freeing
the module in that case. This shouldn't be that hard...

Rusty.


\
 
 \ /
  Last update: 2010-10-22 05:45    [W:0.054 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site