mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/2] tracing: Prevent unloadable modules from using trace_bprintk()
Date: Wed, 20 Oct 2010 23:47:56 -0400	[thread overview]
Message-ID: <1287632876.16971.561.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20101021034255.GG5387@nowhere>

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



  reply	other threads:[~2010-10-21  3:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21  2:42 [PATCH 0/2] [GIT PULL] tracing: Minor fixes Steven Rostedt
2010-10-21  2:42 ` [PATCH 1/2] tracing: Prevent unloadable modules from using trace_bprintk() Steven Rostedt
2010-10-21  3:42   ` Frederic Weisbecker
2010-10-21  3:47     ` Steven Rostedt [this message]
2010-10-21  3:54       ` Frederic Weisbecker
2010-10-21  8:16   ` Ingo Molnar
2010-10-21 10:57     ` Steven Rostedt
2010-10-21 11:05       ` Ingo Molnar
2010-10-21  2:42 ` [PATCH 2/2] tracing: Do not limit the size of the number of CPU buffers Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287632876.16971.561.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®