public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] [GIT PULL][2.6.37] tracing: various fixes
@ 2010-12-02 18:46 Steven Rostedt
  2010-12-02 18:46 ` [PATCH 1/3] tracing: Fix panic when lseek() called on "trace" opened for writing Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2010-12-02 18:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker


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


John Reiser (1):
      ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO

Peter Zijlstra (1):
      scripts/tags.sh: Add magic for trace-events

Slava Pestov (1):
      tracing: Fix panic when lseek() called on "trace" opened for writing

----
 kernel/trace/trace.c   |   10 +++++++++-
 scripts/recordmcount.h |    2 +-
 scripts/tags.sh        |    4 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)

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

* [PATCH 1/3] tracing: Fix panic when lseek() called on "trace" opened for writing
  2010-12-02 18:46 [PATCH 0/3] [GIT PULL][2.6.37] tracing: various fixes Steven Rostedt
@ 2010-12-02 18:46 ` Steven Rostedt
  2010-12-02 18:46 ` [PATCH 2/3] scripts/tags.sh: Add magic for trace-events Steven Rostedt
  2010-12-02 18:46 ` [PATCH 3/3] ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO Steven Rostedt
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2010-12-02 18:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, stable,
	Slava Pestov

[-- Attachment #1: 0001-tracing-Fix-panic-when-lseek-called-on-trace-opened-.patch --]
[-- Type: text/plain, Size: 1372 bytes --]

From: Slava Pestov <slavapestov@google.com>

The file_ops struct for the "trace" special file defined llseek as seq_lseek().
However, if the file was opened for writing only, seq_open() was not called,
and the seek would dereference a null pointer, file->private_data.

This patch introduces a new wrapper for seq_lseek() which checks if the file
descriptor is opened for reading first. If not, it does nothing.

Cc: <stable@kernel.org>
Signed-off-by: Slava Pestov <slavapestov@google.com>
LKML-Reference: <1290640396-24179-1-git-send-email-slavapestov@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ee6a733..21db0de 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2339,11 +2339,19 @@ tracing_write_stub(struct file *filp, const char __user *ubuf,
 	return count;
 }
 
+static loff_t tracing_seek(struct file *file, loff_t offset, int origin)
+{
+	if (file->f_mode & FMODE_READ)
+		return seq_lseek(file, offset, origin);
+	else
+		return 0;
+}
+
 static const struct file_operations tracing_fops = {
 	.open		= tracing_open,
 	.read		= seq_read,
 	.write		= tracing_write_stub,
-	.llseek		= seq_lseek,
+	.llseek		= tracing_seek,
 	.release	= tracing_release,
 };
 
-- 
1.7.2.3



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

* [PATCH 2/3] scripts/tags.sh: Add magic for trace-events
  2010-12-02 18:46 [PATCH 0/3] [GIT PULL][2.6.37] tracing: various fixes Steven Rostedt
  2010-12-02 18:46 ` [PATCH 1/3] tracing: Fix panic when lseek() called on "trace" opened for writing Steven Rostedt
@ 2010-12-02 18:46 ` Steven Rostedt
  2010-12-02 18:46 ` [PATCH 3/3] ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO Steven Rostedt
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2010-12-02 18:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, WANG Cong,
	Peter Zijlstra

[-- Attachment #1: 0002-scripts-tags.sh-Add-magic-for-trace-events.patch --]
[-- Type: text/plain, Size: 1097 bytes --]

From: Peter Zijlstra <peterz@infradead.org>

Make tags find the trace-event definitions

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290591835.2072.438.camel@laptop>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/tags.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 8509bb5..bbbe584 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -125,7 +125,9 @@ exuberant()
 	-I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
 	--extra=+f --c-kinds=-px                                \
 	--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'                  \
-	--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'
+	--regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \
+	--regex-c++='/^TRACE_EVENT\(([^,)]*).*/trace_\1/'		\
+	--regex-c++='/^DEFINE_EVENT\(([^,)]*).*/trace_\1/'
 
 	all_kconfigs | xargs $1 -a                              \
 	--langdef=kconfig --language-force=kconfig              \
-- 
1.7.2.3



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

* [PATCH 3/3] ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO
  2010-12-02 18:46 [PATCH 0/3] [GIT PULL][2.6.37] tracing: various fixes Steven Rostedt
  2010-12-02 18:46 ` [PATCH 1/3] tracing: Fix panic when lseek() called on "trace" opened for writing Steven Rostedt
  2010-12-02 18:46 ` [PATCH 2/3] scripts/tags.sh: Add magic for trace-events Steven Rostedt
@ 2010-12-02 18:46 ` Steven Rostedt
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2010-12-02 18:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Arnaud Lacombe,
	Wu Zhangjin, Ralf Baechle, John Reiser

[-- Attachment #1: 0003-ftrace-Have-recordmcount-honor-endianness-in-fn_ELF_.patch --]
[-- Type: text/plain, Size: 1163 bytes --]

From: John Reiser <jreiser@bitwagon.com>

It looks to me like the change which introduced "virtual functions"
forgot about cross-platform endianness.

Thank you to Arnaud for supplying before+after data files do_mounts*.o.

This fixes a MIPS build failure triggered by recordmcount.

Reported-by: Arnaud Lacombe <lacombar@gmail.com>
Tested-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John Reiser <jreiser@BitWagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 scripts/recordmcount.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h
index 58e933a..3966717 100644
--- a/scripts/recordmcount.h
+++ b/scripts/recordmcount.h
@@ -119,7 +119,7 @@ static uint_t (*Elf_r_sym)(Elf_Rel const *rp) = fn_ELF_R_SYM;
 
 static void fn_ELF_R_INFO(Elf_Rel *const rp, unsigned sym, unsigned type)
 {
-	rp->r_info = ELF_R_INFO(sym, type);
+	rp->r_info = _w(ELF_R_INFO(sym, type));
 }
 static void (*Elf_r_info)(Elf_Rel *const rp, unsigned sym, unsigned type) = fn_ELF_R_INFO;
 
-- 
1.7.2.3



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

end of thread, other threads:[~2010-12-02 18:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02 18:46 [PATCH 0/3] [GIT PULL][2.6.37] tracing: various fixes Steven Rostedt
2010-12-02 18:46 ` [PATCH 1/3] tracing: Fix panic when lseek() called on "trace" opened for writing Steven Rostedt
2010-12-02 18:46 ` [PATCH 2/3] scripts/tags.sh: Add magic for trace-events Steven Rostedt
2010-12-02 18:46 ` [PATCH 3/3] ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox