From: Anton Blanchard <anton@samba.org>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
emunson@mgebm.net
Cc: linux-kernel@vger.kernel.org, <stable@kernel.org>
Subject: [PATCH 1/4] perf symbols: Fix ppc64 SEGV in dso__load_sym with debuginfo files
Date: Wed, 24 Aug 2011 16:40:14 +1000 [thread overview]
Message-ID: <20110824065242.895239970@samba.org> (raw)
In-Reply-To: 20110824064013.205515988@samba.org
[-- Attachment #1: perf_fix_segv --]
[-- Type: text/plain, Size: 861 bytes --]
64bit PowerPC debuginfo files have an empty function descriptor
section. I hit a SEGV when perf tried to use this section for
symbol resolution.
To fix this we need to check the section is valid and we can
do this by checking for type SHT_PROGBITS.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
---
Index: linux-2.6-tip/tools/perf/util/symbol.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/util/symbol.c 2011-08-19 12:33:08.271144414 +1000
+++ linux-2.6-tip/tools/perf/util/symbol.c 2011-08-19 12:33:21.501373684 +1000
@@ -1113,6 +1113,8 @@ static int dso__load_sym(struct dso *dso
}
opdsec = elf_section_by_name(elf, &ehdr, &opdshdr, ".opd", &opdidx);
+ if (opdshdr.sh_type != SHT_PROGBITS)
+ opdsec = NULL;
if (opdsec)
opddata = elf_rawdata(opdsec, NULL);
next prev parent reply other threads:[~2011-08-24 6:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 6:40 [PATCH 0/4] perf symbol fixes Anton Blanchard
2011-08-24 6:40 ` Anton Blanchard [this message]
2011-08-24 6:40 ` [PATCH 2/4] perf symbols: /proc/kallsyms does not sort module symbols Anton Blanchard
2011-08-24 6:40 ` [PATCH 3/4] perf symbols: Preserve symbol scope when parsing /proc/kallsyms Anton Blanchard
2011-08-24 6:40 ` [PATCH 4/4] perf symbols: Add some heuristics for choosing the best duplicate symbol Anton Blanchard
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=20110824065242.895239970@samba.org \
--to=anton@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=emunson@mgebm.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=stable@kernel.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