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

* Re: [PATCH] Fix markup_oops to work with 32-bit userspace on a 64-bit kernel
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Arjan van de Ven @ 2009-07-13 15:08 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-kernel, akpm

On Mon, 13 Jul 2009 08:18:19 -0600
Matthew Wilcox <matthew@wil.cx> wrote:

> 
> A 32-bit perl can't handle 64-bit addresses without using the BigInt
> package.
> 
> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>

looks sane enuogh to me


Acked-by: Arjan van de Ven <arjan@linux.intel.com>


Andrew, can you pull this into -mm patch-logistics wise please?


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


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

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

* Re: [PATCH] Fix markup_oops to work with 32-bit userspace on a 64-bit kernel
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Ozan Çağlayan @ 2009-08-06 12:05 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Arjan van de Ven, linux-kernel

Matthew Wilcox wrote On 13-07-2009 17:18:
> A 32-bit perl can't handle 64-bit addresses without using the BigInt package.
>
>  
> -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";
>   

$func_offset has already "0x" so this commit prepends another "0x"
causing decodestart to be NaN.

Regards,
Ozan

^ permalink raw reply	[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