From: Matthew Wilcox <matthew@wil.cx>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix markup_oops to work with 32-bit userspace on a 64-bit kernel
Date: Mon, 13 Jul 2009 08:18:19 -0600 [thread overview]
Message-ID: <20090713141819.GG24310@parisc-linux.org> (raw)
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."
next reply other threads:[~2009-07-13 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 14:18 Matthew Wilcox [this message]
2009-07-13 15:08 ` [PATCH] Fix markup_oops to work with 32-bit userspace on a 64-bit kernel Arjan van de Ven
2009-08-06 12:05 ` Ozan Çağlayan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090713141819.GG24310@parisc-linux.org \
--to=matthew@wil.cx \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox