lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 6 Jul 2012 03:59:52 -0700
From:	tip-bot for Jiri Olsa <jolsa@...hat.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, eranian@...gle.com, mingo@...nel.org,
	gorcunov@...nvz.org, a.p.zijlstra@...llo.nl,
	benjamin.redelings@...cent.org, jolsa@...hat.com,
	drepper@...il.com, robert.richter@....com, fweisbec@...il.com,
	tglx@...utronix.de, cjashfor@...ux.vnet.ibm.com, asharma@...com,
	linux-kernel@...r.kernel.org, hpa@...or.com, fche@...hat.com,
	paulus@...ba.org, tzanussi@...il.com,
	masami.hiramatsu.pt@...achi.com
Subject: [tip:perf/core] perf symbols: Add '.note'
  check into search for NOTE section

Commit-ID:  1388d715dd7d0f494c93dfdef6ab26719218b868
Gitweb:     http://git.kernel.org/tip/1388d715dd7d0f494c93dfdef6ab26719218b868
Author:     Jiri Olsa <jolsa@...hat.com>
AuthorDate: Tue, 19 Jun 2012 17:48:05 +0200
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 29 Jun 2012 13:37:57 -0300

perf symbols: Add '.note' check into search for NOTE section

Adding '.note' section name to be check when looking for notes section.
The '.note' name is used by kernel VDSO.

Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Arun Sharma <asharma@...com>
Cc: Benjamin Redelings <benjamin.redelings@...cent.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
Cc: Frank Ch. Eigler <fche@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Robert Richter <robert.richter@....com>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Tom Zanussi <tzanussi@...il.com>
Cc: Ulrich Drepper <drepper@...il.com>
Link: http://lkml.kernel.org/r/1340120894-9465-15-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/symbol.c |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 994f4ff..50958bb 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1478,14 +1478,31 @@ static int elf_read_build_id(Elf *elf, void *bf, size_t size)
 		goto out;
 	}
 
-	sec = elf_section_by_name(elf, &ehdr, &shdr,
-				  ".note.gnu.build-id", NULL);
-	if (sec == NULL) {
+	/*
+	 * Check following sections for notes:
+	 *   '.note.gnu.build-id'
+	 *   '.notes'
+	 *   '.note' (VDSO specific)
+	 */
+	do {
+		sec = elf_section_by_name(elf, &ehdr, &shdr,
+					  ".note.gnu.build-id", NULL);
+		if (sec)
+			break;
+
 		sec = elf_section_by_name(elf, &ehdr, &shdr,
 					  ".notes", NULL);
-		if (sec == NULL)
-			goto out;
-	}
+		if (sec)
+			break;
+
+		sec = elf_section_by_name(elf, &ehdr, &shdr,
+					  ".note", NULL);
+		if (sec)
+			break;
+
+		return err;
+
+	} while (0);
 
 	data = elf_getdata(sec, NULL);
 	if (data == NULL)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ