* [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it
@ 2013-10-11 12:23 Masami Hiramatsu
2013-10-11 12:31 ` Masami Hiramatsu
2013-10-20 19:31 ` [tip:perf/urgent] perf probe: Fix " tip-bot for Masami Hiramatsu
0 siblings, 2 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2013-10-11 12:23 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Namhyung Kim, Ingo Molnar, Paul Mackerras, lkml, Peter Zijlstra
Fix perf probe --list to initialize fname local var always before
use it. This may cause a SEGV if there is a probe which is in
the function body but not in any inline function.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/probe-finder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index c044052..e41b094 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -1460,10 +1460,10 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr,
goto post;
}
+ fname = dwarf_decl_file(&spdie);
if (addr == (unsigned long)baseaddr) {
/* Function entry - Relative line number is 0 */
lineno = baseline;
- fname = dwarf_decl_file(&spdie);
goto post;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it
2013-10-11 12:23 [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it Masami Hiramatsu
@ 2013-10-11 12:31 ` Masami Hiramatsu
2013-10-11 17:33 ` Arnaldo Carvalho de Melo
2013-10-20 19:31 ` [tip:perf/urgent] perf probe: Fix " tip-bot for Masami Hiramatsu
1 sibling, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2013-10-11 12:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Namhyung Kim, Ingo Molnar, Paul Mackerras, lkml, Peter Zijlstra
Hi Arnaldo,
I've found a bug in my previous patch which was already picked
in the perf/urgent branch. The buggy commit id is
e08cfd4bda7683cdbe6971c26cf23e2afdb1e7a8
And this is not related to the previous series of perf probe
updates.
Thank you,
(2013/10/11 21:23), Masami Hiramatsu wrote:
> Fix perf probe --list to initialize fname local var always before
> use it. This may cause a SEGV if there is a probe which is in
> the function body but not in any inline function.
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Cc: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/probe-finder.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index c044052..e41b094 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -1460,10 +1460,10 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr,
> goto post;
> }
>
> + fname = dwarf_decl_file(&spdie);
> if (addr == (unsigned long)baseaddr) {
> /* Function entry - Relative line number is 0 */
> lineno = baseline;
> - fname = dwarf_decl_file(&spdie);
> goto post;
> }
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it
2013-10-11 12:31 ` Masami Hiramatsu
@ 2013-10-11 17:33 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-11 17:33 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Namhyung Kim, Ingo Molnar, Paul Mackerras, lkml, Peter Zijlstra
Em Fri, Oct 11, 2013 at 09:31:47PM +0900, Masami Hiramatsu escreveu:
> Hi Arnaldo,
>
> I've found a bug in my previous patch which was already picked
> in the perf/urgent branch. The buggy commit id is
>
> e08cfd4bda7683cdbe6971c26cf23e2afdb1e7a8
>
> And this is not related to the previous series of perf probe
> updates.
Ok, so it must go via perf/urgent or if that ends up not being anymore
possible, via stable, will try the perf/urgent path today,
- Arnaldo
> Thank you,
>
> (2013/10/11 21:23), Masami Hiramatsu wrote:
> > Fix perf probe --list to initialize fname local var always before
> > use it. This may cause a SEGV if there is a probe which is in
> > the function body but not in any inline function.
> >
> > Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> > Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/util/probe-finder.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> > index c044052..e41b094 100644
> > --- a/tools/perf/util/probe-finder.c
> > +++ b/tools/perf/util/probe-finder.c
> > @@ -1460,10 +1460,10 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr,
> > goto post;
> > }
> >
> > + fname = dwarf_decl_file(&spdie);
> > if (addr == (unsigned long)baseaddr) {
> > /* Function entry - Relative line number is 0 */
> > lineno = baseline;
> > - fname = dwarf_decl_file(&spdie);
> > goto post;
> > }
>
>
> --
> Masami HIRAMATSU
> IT Management Research Dept. Linux Technology Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/urgent] perf probe: Fix to initialize fname always before use it
2013-10-11 12:23 [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it Masami Hiramatsu
2013-10-11 12:31 ` Masami Hiramatsu
@ 2013-10-20 19:31 ` tip-bot for Masami Hiramatsu
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2013-10-20 19:31 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, mingo, hpa, mingo, a.p.zijlstra,
namhyung, masami.hiramatsu.pt, tglx
Commit-ID: 1b286bdd5b7684c681b63d5e75cada037064c315
Gitweb: http://git.kernel.org/tip/1b286bdd5b7684c681b63d5e75cada037064c315
Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Fri, 11 Oct 2013 12:23:17 +0000
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 15 Oct 2013 14:37:38 -0300
perf probe: Fix to initialize fname always before use it
Fix perf probe --list to initialize fname local var always before
use it. This may cause a SEGV if there is a probe which is in
the function body but not in any inline function.
Problem introduced in:
commit e08cfd4bda76
Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Date: Mon Sep 30 18:21:44 2013 +0900
perf probe: Fix to find line information for probe list
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20131011122317.9662.29736.stgit@kbuild-fedora.novalocal
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-finder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index c09e0a9..f069273 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -1357,10 +1357,10 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr,
goto post;
}
+ fname = dwarf_decl_file(&spdie);
if (addr == (unsigned long)baseaddr) {
/* Function entry - Relative line number is 0 */
lineno = baseline;
- fname = dwarf_decl_file(&spdie);
goto post;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-20 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 12:23 [PATCH -tip ] [BUGFIX] perf probe: fix to initialize fname always before use it Masami Hiramatsu
2013-10-11 12:31 ` Masami Hiramatsu
2013-10-11 17:33 ` Arnaldo Carvalho de Melo
2013-10-20 19:31 ` [tip:perf/urgent] perf probe: Fix " tip-bot for Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox