public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix markup_oops to work with 32-bit userspace on a 64-bit kernel
@ 2009-07-13 14:18 Matthew Wilcox
  2009-07-13 15:08 ` Arjan van de Ven
  2009-08-06 12:05 ` Ozan Çağlayan
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Wilcox @ 2009-07-13 14:18 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel


A 32-bit perl can't handle 64-bit addresses without using the BigInt package.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>

diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 528492b..8977401 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 
 use File::Basename;
+use Math::BigInt;
 
 # Copyright 2008, Intel Corporation
 #
@@ -172,8 +173,8 @@ while (<STDIN>) {
 	parse_x86_regs($line);
 }
 
-my $decodestart = hex($target) - hex($func_offset);
-my $decodestop = hex($target) + 8192;
+my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
+my $decodestop = Math::BigInt->from_hex("0x$target") + 8192;
 if ($target eq "0") {
 	print "No oops found!\n";
 	print "Usage: \n";

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-06 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 14:18 [PATCH] Fix markup_oops to work with 32-bit userspace on a 64-bit kernel Matthew Wilcox
2009-07-13 15:08 ` Arjan van de Ven
2009-08-06 12:05 ` Ozan Çağlayan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox