mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH] perf tools: Fix segfault due to invalid kernel dso access
Date: Thu, 20 Nov 2014 17:52:06 -0300	[thread overview]
Message-ID: <20141120205206.GO3790@kernel.org> (raw)
In-Reply-To: <87wq6qnzfv.fsf@sejong.aot.lge.com>

Em Thu, Nov 20, 2014 at 03:44:36PM +0900, Namhyung Kim escreveu:
> Arnaldo,
> 
> Could you please consider applying this?

Right, I should've added this to the previous pull req, will be on the
next.

- Arnaldo
 
> Thanks,
> Namhyung
> 
> 
> On Tue, 18 Nov 2014 13:30:28 +0900, Namhyung Kim wrote:
> > Jiri reported that the commit 96d78059d6d9 ("perf tools: Make vmlinux
> > short name more like kallsyms short name") segfaults on perf script.
> >
> > When processing kernel mmap event, it should access the 'kernel'
> > variable as sometimes it cannot find a matching dso from build-id
> > table so 'dso' might be invalid.
> >
> > Reported-by: Jiri Olsa <jolsa@redhat.com>
> > Tested-by: Jiri Olsa <jolsa@redhat.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/perf/util/machine.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> > index 52e94902afb1..85033d80fd6a 100644
> > --- a/tools/perf/util/machine.c
> > +++ b/tools/perf/util/machine.c
> > @@ -1106,8 +1106,8 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
> >  		if (__machine__create_kernel_maps(machine, kernel) < 0)
> >  			goto out_problem;
> >  
> > -		if (strstr(dso->long_name, "vmlinux"))
> > -			dso__set_short_name(dso, "[kernel.vmlinux]", false);
> > +		if (strstr(kernel->long_name, "vmlinux"))
> > +			dso__set_short_name(kernel, "[kernel.vmlinux]", false);
> >  
> >  		machine__set_kernel_mmap_len(machine, event);

  reply	other threads:[~2014-11-20 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  4:30 Namhyung Kim
2014-11-20  6:44 ` Namhyung Kim
2014-11-20 20:52   ` Arnaldo Carvalho de Melo [this message]
2014-12-08  6:49 ` [tip:perf/core] " tip-bot for Namhyung Kim

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=20141120205206.GO3790@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /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

Powered by JetHome