Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755458AbbDGPNX (ORCPT ); Tue, 7 Apr 2015 11:13:23 -0400 Received: from mail.kernel.org ([198.145.29.136]:44513 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755397AbbDGPNW (ORCPT ); Tue, 7 Apr 2015 11:13:22 -0400 Date: Tue, 7 Apr 2015 12:13:22 -0300 From: Arnaldo Carvalho de Melo To: Wang Nan Cc: jolsa@kernel.org, namhyung@kernel.org, mingo@redhat.com, lizefan@huawei.com, pi3orama@163.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] perf: report/annotate: fix segfault problem. Message-ID: <20150407151322.GK11983@kernel.org> References: <20150406125239.GE2500@redhat.com> <1428394966-131044-1-git-send-email-wangnan0@huawei.com> <1428394966-131044-3-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428394966-131044-3-git-send-email-wangnan0@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1850 Lines: 52 Em Tue, Apr 07, 2015 at 08:22:46AM +0000, Wang Nan escreveu: > perf report and perf annotate are easy to trigger segfault if trace data > contain kernel module information like this: > > # perf report -D -i ./perf.data > ... > 0 0 0x188 [0x50]: PERF_RECORD_MMAP -1/0: [0xffffffbff1018000(0xf068000) @ 0]: x [test_module] > ... > > # perf report -i ./perf.data --objdump=/path/to/objdump --kallsyms=/path/to/kallsyms > > perf: Segmentation fault > -------- backtrace -------- > /path/to/perf[0x503478] > /lib64/libc.so.6(+0x3545f)[0x7fb201f3745f] > /path/to/perf[0x499b56] So, with this patch applied I am seeing this: [root@ssdandy ~]# perf sched record -a Kmod (modules.order) and cpumode (0) inconsistent Kmod (modules.builtin) and cpumode (0) inconsistent Kmod (modules.dep) and cpumode (0) inconsistent Kmod (modules.dep.bin) and cpumode (0) inconsistent Kmod (modules.alias) and cpumode (0) inconsistent Kmod (modules.alias.bin) and cpumode (0) inconsistent Kmod (modules.softdep) and cpumode (0) inconsistent Kmod (modules.symbols) and cpumode (0) inconsistent Kmod (modules.symbols.bin) and cpumode (0) inconsistent Kmod (modules.builtin.bin) and cpumode (0) inconsistent Kmod (modules.devname) and cpumode (0) inconsistent ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.465 MB perf.data (1595 samples) ] [root@ssdandy ~]#o Can you please check this? Why do we get these warning for these files? Applied the other patch: -> 28 T 04/07 Wang Nan (8,8K) [PATCH v3 1/2] perf: kmaps: enforce usage of kmaps to protect futher bugs. - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/