All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][GIT PULL][v2.6.36 & stable] tracing: Do not allow llseek to set_ftrace_filter
@ 2010-09-08 15:53 Steven Rostedt
  2010-09-08 15:59 ` Ingo Molnar
  2010-09-08 15:59 ` Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2010-09-08 15:53 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Robert Swiecki, Chris Wright, Tavis Ormandy,
	Eugene Teo, vendor-sec, stable


Ingo,

Please pull the latest tip/perf/urgent tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/perf/urgent


root (1):
      tracing: Do not allow llseek to set_ftrace_filter

----
 kernel/trace/ftrace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---------------------------
commit 47933d55f8d3652a0319ab1e0c6854fa326f78fa
Author: root <root@ixf.(none)>
Date:   Wed Sep 8 11:20:37 2010 -0400

    tracing: Do not allow llseek to set_ftrace_filter
    
    Reading the file set_ftrace_filter does three things.
    
    1) shows whether or not filters are set for the function tracer
    2) shows what functions are set for the function tracer
    3) shows what triggers are set on any functions
    
    3 is independent from 1 and 2.
    
    The way this file currently works is that it is a state machine,
    and as you read it, it may change state. But this assumption breaks
    when you use lseek() on the file. The state machine gets out of sync
    and the t_show() may use the wrong pointer and cause a kernel oops.
    
    Luckily, this will only kill the app that does the lseek, but the app
    dies while holding a mutex. This prevents anyone else from using the
    set_ftrace_filter file (or any other function tracing file for that matter).
    
    A real fix for this is to rewrite the code, but that is too much for
    a -rc release or stable. This patch simply disables llseek on the
    set_ftrace_filter() file for now, and we can do the proper fix for the
    next major release.
    
    Reported-by: Robert Swiecki <swiecki@google.com>
    Cc: Chris Wright <chrisw@sous-sol.org>
    Cc: Tavis Ormandy <taviso@google.com>
    Cc: Eugene Teo <eugene@redhat.com>
    Cc: vendor-sec@lst.de
    Cc: <stable@kernel.org>
    Signed-off-by: root <root@ixf.(none)>

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 7cb1f45..83a16e9 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2416,7 +2416,7 @@ static const struct file_operations ftrace_filter_fops = {
 	.open = ftrace_filter_open,
 	.read = seq_read,
 	.write = ftrace_filter_write,
-	.llseek = ftrace_regex_lseek,
+	.llseek = no_llseek,
 	.release = ftrace_filter_release,
 };
 



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

* Re: [PATCH][GIT PULL][v2.6.36 & stable] tracing: Do not allow llseek to set_ftrace_filter
  2010-09-08 15:53 [PATCH][GIT PULL][v2.6.36 & stable] tracing: Do not allow llseek to set_ftrace_filter Steven Rostedt
@ 2010-09-08 15:59 ` Ingo Molnar
  2010-09-08 15:59 ` Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2010-09-08 15:59 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: LKML, Robert Swiecki, Chris Wright, Tavis Ormandy, Eugene Teo,
	vendor-sec, stable


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 
> Ingo,
> 
> Please pull the latest tip/perf/urgent tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/perf/urgent
> 
> 
> root (1):
>       tracing: Do not allow llseek to set_ftrace_filter
> 
> ----
>  kernel/trace/ftrace.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Pulled, thanks Steve!

	Ingo

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

* Re: [PATCH][GIT PULL][v2.6.36 & stable] tracing: Do not allow llseek to set_ftrace_filter
  2010-09-08 15:53 [PATCH][GIT PULL][v2.6.36 & stable] tracing: Do not allow llseek to set_ftrace_filter Steven Rostedt
  2010-09-08 15:59 ` Ingo Molnar
@ 2010-09-08 15:59 ` Steven Rostedt
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2010-09-08 15:59 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Robert Swiecki, Chris Wright, Tavis Ormandy,
	Eugene Teo, vendor-sec, stable

On Wed, 2010-09-08 at 11:53 -0400, Steven Rostedt wrote:
> Ingo,
> 
> Please pull the latest tip/perf/urgent tree, which can be found at:

Wait! Don't pull!!!

> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/perf/urgent
> 
> 
>     
>     Reported-by: Robert Swiecki <swiecki@google.com>
>     Cc: Chris Wright <chrisw@sous-sol.org>
>     Cc: Tavis Ormandy <taviso@google.com>
>     Cc: Eugene Teo <eugene@redhat.com>
>     Cc: vendor-sec@lst.de
>     Cc: <stable@kernel.org>
>     Signed-off-by: root <root@ixf.(none)>
> 

I've could have sworn I set up this machine. Bah! I think I reinstalled
it. :-p

/me goes and fixes it.

Thanks Frederic ;-)

-- Steve



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

end of thread, other threads:[~2010-09-08 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 15:53 [PATCH][GIT PULL][v2.6.36 & stable] tracing: Do not allow llseek to set_ftrace_filter Steven Rostedt
2010-09-08 15:59 ` Ingo Molnar
2010-09-08 15:59 ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.