lkml.org 
[lkml]   [2010]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] tracing: Prevent unloadable modules from using trace_bprintk()
From
Date
On Thu, 2010-10-21 at 05:42 +0200, Frederic Weisbecker wrote:

> > +/*
> > + * Module code must not use trace_bprintk, because if it is unloaded
> > + * then we leave a pointer back to the module code inside
> > + * the ring buffer, and then reading the ring buffer may cause a bug.
> > + *
> > + * We do allow for modules to use it if the kernel does not allow
> > + * unloading of modules, and MODVERSIONS is set (to make sure kernel
> > + * and module are the same). If you load modules without MODVERSIONS
> > + * set, then you deserve what you get.
> > + */
> > +#if defined(MODULE) && \
>
>
>
> Did you mean CONFIG_MODULE may be?

Nope, then the a kernel that allows modules wont use it. I do mean
"MODULE", as in defined by the Makefile:

KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE

-- Steve




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