This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
patch perf-probe-fix-probe_point-buffer-overrun.patch added to 2.6.33-stable tree
- From: <gregkh at suse dot de>
- To: mhiramat at redhat dot com,20100312232217 dot 2017 dot 45017 dot stgit at localhost6 dot localdomain6,dle-develop at lists dot sourceforge dot net,gregkh at suse dot de,mingo at elte dot hu,systemtap at sources dot redhat dot com
- Cc: <stable at kernel dot org>, <stable-commits at vger dot kernel dot org>
- Date: Mon, 29 Mar 2010 11:25:55 -0700
- Subject: patch perf-probe-fix-probe_point-buffer-overrun.patch added to 2.6.33-stable tree
This is a note to let you know that we have just queued up the patch titled
Subject: perf probe: Fix probe_point buffer overrun
to the 2.6.33-stable tree. Its filename is
perf-probe-fix-probe_point-buffer-overrun.patch
A git repo of this tree can be found at
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>From 594087a04eea544356f9c52e83c1a9bc380ce80f Mon Sep 17 00:00:00 2001
From: Masami Hiramatsu <mhiramat@redhat.com>
Date: Fri, 12 Mar 2010 18:22:17 -0500
Subject: perf probe: Fix probe_point buffer overrun
From: Masami Hiramatsu <mhiramat@redhat.com>
commit 594087a04eea544356f9c52e83c1a9bc380ce80f upstream.
Fix probe_point array-size overrun problem. In some cases (e.g.
inline function), one user-specified probe-point can be
translated to many probe address, and it overruns pre-defined
array-size. This also removes redundant MAX_PROBES macro
definition.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100312232217.2017.45017.stgit@localhost6.localdomain6>
[ Note that only root can create new probes. Eventually we should remove
the MAX_PROBES limit, but that is a larger patch not eligible to
perf/urgent treatment. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
tools/perf/builtin-probe.c | 1 -
tools/perf/util/probe-finder.c | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -48,7 +48,6 @@
#include "util/probe-event.h"
#define MAX_PATH_LEN 256
-#define MAX_PROBES 128
/* Session management structure */
static struct {
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -544,6 +544,9 @@ static void show_probepoint(Dwarf_Die sp
}
free_current_frame_base(pf);
+ if (pp->found == MAX_PROBES)
+ die("Too many( > %d) probe point found.\n", MAX_PROBES);
+
pp->probes[pp->found] = strdup(tmp);
pp->found++;
}
Patches currently in stable-queue which might be from mhiramat@redhat.com are