From: David Ahern <dsahern@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: linux-kernel@vger.kernel.org, psuriset@linux.vnet.ibm.com,
Ingo Molnar <mingo@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Namhyung Kim <namhyung@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] perf kvm: fix segfault with default guest arguments
Date: Thu, 28 Jun 2012 08:52:56 -0600 [thread overview]
Message-ID: <4FEC6FC8.7050709@gmail.com> (raw)
In-Reply-To: <20120628144418.GG4038@infradead.org>
On 6/28/12 8:44 AM, Arnaldo Carvalho de Melo wrote:
> Em Sun, Jun 24, 2012 at 10:41:26PM -0600, David Ahern escreveu:
>> File generated with:
>> $ perf kvm --host --guest --guestkallsyms=/tmp/guest-kallsyms
>> --guestmodules=/tmp/guest-modules record -a
>>
>> The report command:
>> $ perf kvm --host --guest --guestkallsyms=/tmp/guest-kallsyms
>> --guestmodules=/tmp/guest-modules report
>>
>> dies with a SEGFAULT:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x000000000046dd7b in machine__mmap_name (self=0x0, bf=0x7fffffffbd20 "q\021", size=4096) at util/map.c:715
>> 715 snprintf(bf, size, "[%s.%d]", "guest.kernel.kallsyms", self->pid);
>>
>> (gdb) bt
>> 0 0x000000000046dd7b in machine__mmap_name (self=0x0, bf=0x7fffffffbd20 "q\021", size=4096) at util/map.c:715
>> 1 0x0000000000444161 in perf_event__process_kernel_mmap (tool=0x7fffffffdd80, event=0x7ffff7fb4120, machine=0x0) at util/event.c:562
>
> I think that this should be handled at perf_event__process_kernel_mmap,
> i.e. tools can conceivably handle this situation in their specific
> handlers.
>
>> @@ -976,6 +976,8 @@ static int perf_session_deliver_event(struct perf_session *session,
>> }
>> return tool->sample(tool, event, sample, evsel, machine);
>> case PERF_RECORD_MMAP:
>> + if (machine == NULL)
>> + return 0;
>> return tool->mmap(tool, event, sample, machine);
>>
> - Arnaldo
>
Ok. Doing it in perf_session_deliver_event makes it consistent with the
SAMPLE case.
David
next prev parent reply other threads:[~2012-06-28 14:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 4:41 [PATCH] perf kvm: fix segfault with default guest arguments David Ahern
2012-06-25 8:39 ` Namhyung Kim
2012-06-25 12:51 ` David Ahern
2012-06-25 19:04 ` David Ahern
2012-06-26 0:35 ` Namhyung Kim
2012-06-25 16:08 ` Jiri Olsa
2012-06-25 18:44 ` David Ahern
[not found] ` <20120628144418.GG4038@infradead.org>
2012-06-28 14:51 ` David Ahern
2012-06-28 14:52 ` David Ahern [this message]
2012-06-30 0:40 ` David Ahern
2012-07-01 22:16 ` David Ahern
-- strict thread matches above, loose matches on Subject: below --
2012-06-25 4:37 David Ahern
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=4FEC6FC8.7050709@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@gmail.com \
--cc=peterz@infradead.org \
--cc=psuriset@linux.vnet.ibm.com \
/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 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.