Skip to content

Commit 51fbb4b

Browse files
Matthew Wilcoxtorvalds
authored andcommitted
markup_oops: fix it with 32-bit userspace on a 64-bit 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> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f5886c7 commit 51fbb4b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎scripts/markup_oops.pl‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/perl
22

33
use File::Basename;
4+
use Math::BigInt;
45

56
# Copyright 2008, Intel Corporation
67
#
@@ -172,8 +173,8 @@ sub process_x86_regs
172173
parse_x86_regs($line);
173174
}
174175

175-
my $decodestart = hex($target) - hex($func_offset);
176-
my $decodestop = hex($target) + 8192;
176+
my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
177+
my $decodestop = Math::BigInt->from_hex("0x$target") + 8192;
177178
if ($target eq "0") {
178179
print "No oops found!\n";
179180
print "Usage: \n";

0 commit comments

Comments
 (0)