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]
Message-ID: <alpine.LRH.2.00.0911231205080.14263@pub1.ifh.de>
Date:	Mon, 23 Nov 2009 12:05:57 +0100 (CET)
From:	Patrick Boettcher <pboettcher@...nellabs.com>
To:	linux-kernel@...r.kernel.org
cc:	Martin Habets <errandir_news@....eclipse.co.uk>
Subject: PATCH [2/2] - CHECKSTACK: simplify text-formatting for displaying
 the stacksize


Signed-off-by: Patrick Boettcher <pboettcher@...nellabs.com>

----
diff --git a/tools/checkstack.pl b/tools/checkstack.pl
index e0af9c7..4fed8c7 100755
--- a/tools/checkstack.pl
+++ b/tools/checkstack.pl
@@ -139,7 +139,7 @@ while (my $line = <STDIN>) {
  			$size += 0x80000000;
  			$size += 0x80000000;
  		}
-		next if ($size > 0x10000000);
+		next if ($size > 0x10000000) || ($size < 100);

  		next if $line !~ m/^($xs*)/;
  		my $addr = $1;
@@ -147,13 +147,7 @@ while (my $line = <STDIN>) {
  		$addr = "0x$addr";

  		my $intro = "$addr $func [$file]:";
-		my $padlen = 56 - length($intro);
-		while ($padlen > 0) {
-			$intro .= '	';
-			$padlen -= 8;
-		}
-		next if ($size < 100);
-		push @stack, "$intro$size\n";
+		push @stack, sprintf("%-64s %d\n", $intro, $size);
  	}
  	elsif (defined $dre && $line =~ m/$dre/) {
  		my $size = "Dynamic ($1)";
@@ -164,12 +158,7 @@ while (my $line = <STDIN>) {
  		$addr = "0x$addr";

  		my $intro = "$addr $func [$file]:";
-		my $padlen = 56 - length($intro);
-		while ($padlen > 0) {
-			$intro .= '	';
-			$padlen -= 8;
-		}
-		push @stack, "$intro$size\n";
+		push @stack, sprintf("%-64s %d\n", $intro, $size);
  	}
  }

--
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