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-next>] [day] [month] [year] [list]
Message-ID: <CAFbHwiRtBaHkpZqTm6VZ=fCJcyu+dsdpo_kxMHy1egce=rTuyA@mail.gmail.com>
Date:	Tue, 30 Oct 2012 14:51:18 +0000
From:	Will Newton <will.newton@...il.com>
To:	Linux Kernel list <linux-kernel@...r.kernel.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH] scripts/recordmcount.pl: Support build with -ffunction-sections.

Scan any text section whose name begins with ".text." so
we will find all the functions in a kernel built with
-ffunction-sections.

Signed-off-by: Will Newton <will.newton@...tec.com>
---
 scripts/recordmcount.pl |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index b33446c..89461c4 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -135,9 +135,13 @@ my %text_sections = (
      ".spinlock.text" => 1,
      ".irqentry.text" => 1,
      ".kprobes.text" => 1,
-     ".text.unlikely" => 1,
 );

+sub is_valid_section
+{
+    return defined($text_sections{$1}) || $1 =~ m/^\.text\./;
+}
+
 # Note: we are nice to C-programmers here, thus we skip the '||='-idiom.
 $objdump = 'objdump' if (!$objdump);
 $objcopy = 'objcopy' if (!$objcopy);
@@ -502,7 +506,7 @@ while (<IN>) {
 	$read_headers = 0;

 	# Only record text sections that we know are safe
-	$read_function = defined($text_sections{$1});
+	$read_function = is_valid_section($1);
 	# print out any recorded offsets
 	update_funcs();

-- 
1.7.1

Download attachment "0001-scripts-recordmcount.pl-Support-build-with-ffunction.patch" of type "application/octet-stream" (1341 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ