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>] [day] [month] [year] [list]
Message-ID: <tip-z960xobig39ca1pmp5brl2fr@git.kernel.org>
Date:   Thu, 7 Jun 2018 01:24:37 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, jolsa@...nel.org, wangnan0@...wei.com,
        dsahern@...il.com, mingo@...nel.org, adrian.hunter@...el.com,
        hpa@...or.com, linux-kernel@...r.kernel.org, acme@...hat.com,
        namhyung@...nel.org
Subject: [tip:perf/urgent] perf symbols: Add BSS symbols when reading from
 /proc/kallsyms

Commit-ID:  2be732c02adb15ed7f2196f075fe63ba6991642c
Gitweb:     https://git.kernel.org/tip/2be732c02adb15ed7f2196f075fe63ba6991642c
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Tue, 5 Jun 2018 17:06:57 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 6 Jun 2018 12:52:09 -0300

perf symbols: Add BSS symbols when reading from /proc/kallsyms

We were not considering 'B' and 'b' (BSS, uninitialized data objects,
that gets set to zero at program start), do it so that we can resolve
more symbols in tools doing resolution of data operands, like 'perf c2c'.

When using vmlinux, i.e. an ELF symbol table, those were already
considered, as the decision was about STT_FUNC or STT_OBJECT, and the
later covers BSS symbols.

  # grep -i ' b ' /proc/kallsyms  | head -20 | tail -5
  ffffffffa789d030 b execute_command
  ffffffffa789d038 b initcall_command_line
  ffffffffa789d040 b static_command_line
  ffffffffa789d048 B ROOT_DEV
  ffffffffa789d050 b once.73786
  #
  # readelf -s /lib/modules/`uname -r`/build/vmlinux | grep ROOT_DEV
  79219: ffffffff8289d048     4 OBJECT  GLOBAL DEFAULT   58 ROOT_DEV
  #

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: https://lkml.kernel.org/n/tip-z960xobig39ca1pmp5brl2fr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/symbol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 3f632c60888f..d188b7588152 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -73,7 +73,7 @@ static enum dso_binary_type binary_type_symtab[] = {
 static bool symbol_type__filter(char symbol_type)
 {
 	symbol_type = toupper(symbol_type);
-	return symbol_type == 'T' || symbol_type == 'W' || symbol_type == 'D';
+	return symbol_type == 'T' || symbol_type == 'W' || symbol_type == 'D' || symbol_type == 'B';
 }
 
 static int prefix_underscores_count(const char *str)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ