linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix markup_oops.pl get $func_offset error in x8664
@ 2010-01-17 13:35 Hui Zhu
  2010-01-23  1:21 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Zhu @ 2010-01-17 13:35 UTC (permalink / raw)
  To: Andrew Morton, Arjan van de Ven, Sam Ravnborg,
	Ozan Çaglayan, Matthew Wilcox, linux-kernel

This patch like the prev patch in http://lkml.org/lkml/2010/1/6/57
The x8664 part have the same trouble with it.  This patch is to fix it.

Thanks,
Hui

Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ozan Çaglayan <ozan@pardus.org.tr>
Cc: Matthew Wilcox <willy@linux.intel.com>
---
 scripts/markup_oops.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -158,7 +158,7 @@ while (<STDIN>) {
 		$function = $1;
 		$func_offset = $2;
 	}
-	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\]
([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\]
([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
 		$function = $1;
 		$func_offset = $2;
 	}

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

* Re: [PATCH] Fix markup_oops.pl get $func_offset error in x8664
  2010-01-17 13:35 [PATCH] Fix markup_oops.pl get $func_offset error in x8664 Hui Zhu
@ 2010-01-23  1:21 ` Andrew Morton
  2010-01-25  6:14   ` Hui Zhu
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2010-01-23  1:21 UTC (permalink / raw)
  To: Hui Zhu
  Cc: Arjan van de Ven, Sam Ravnborg, Ozan Çaglayan,
	Matthew Wilcox, linux-kernel

On Sun, 17 Jan 2010 21:35:25 +0800
Hui Zhu <teawater@gmail.com> wrote:

> This patch like the prev patch in http://lkml.org/lkml/2010/1/6/57
> The x8664 part have the same trouble with it.  This patch is to fix it.
> 

This changelog isn't very useful.  Please provide a description for this
change which doesn't require that people have to go off and read the
internet and then work out how some other patch is relevant to this
one!


> ---
>  scripts/markup_oops.pl |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/scripts/markup_oops.pl
> +++ b/scripts/markup_oops.pl
> @@ -158,7 +158,7 @@ while (<STDIN>) {
>  		$function = $1;
>  		$func_offset = $2;
>  	}
> -	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\]
> ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
> +	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\]
> ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
>  		$function = $1;
>  		$func_offset = $2;
>  	}

Your email client wordwrapped the patch.  Please fix it then resend.


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

* Re: [PATCH] Fix markup_oops.pl get $func_offset error in x8664
  2010-01-23  1:21 ` Andrew Morton
@ 2010-01-25  6:14   ` Hui Zhu
  0 siblings, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2010-01-25  6:14 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arjan van de Ven, Sam Ravnborg, Ozan Çaglayan,
	Matthew Wilcox, linux-kernel

On Sat, Jan 23, 2010 at 09:21, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Sun, 17 Jan 2010 21:35:25 +0800
> Hui Zhu <teawater@gmail.com> wrote:
>
>> This patch like the prev patch in http://lkml.org/lkml/2010/1/6/57
>> The x8664 part have the same trouble with it.  This patch is to fix it.
>>
>
> This changelog isn't very useful.  Please provide a description for this
> change which doesn't require that people have to go off and read the
> internet and then work out how some other patch is relevant to this
> one!

OK.  I will post a new mail for this patch.

>
>
>> ---
>>  scripts/markup_oops.pl |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/scripts/markup_oops.pl
>> +++ b/scripts/markup_oops.pl
>> @@ -158,7 +158,7 @@ while (<STDIN>) {
>>               $function = $1;
>>               $func_offset = $2;
>>       }
>> -     if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\]
>> ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
>> +     if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\]
>> ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
>>               $function = $1;
>>               $func_offset = $2;
>>       }
>
> Your email client wordwrapped the patch.  Please fix it then resend.
>
>

I will fix it in new mail.  Sorry for it.

Best regards,
Hui

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

* [PATCH] Fix markup_oops.pl get $func_offset error in x8664
@ 2010-01-25 14:27 Hui Zhu
  0 siblings, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2010-01-25 14:27 UTC (permalink / raw)
  To: Andrew Morton, Arjan van de Ven, Sam Ravnborg,
	"Ozan 锟�\x7f�\x7fglayan",
	Matthew Wilcox, linux-kernel, teawater

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 1605 bytes --]

When I use markup_oops.pl parse a x8664 oops, I got:
objdump: --start-address: bad number: NaN
No matching code found
This is because:
main::(./m.pl:228):	open(FILE, "objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-address=$decodestop $filename |") || die "Cannot start objdump";
  DB<3> p $decodestart
NaN
This NaN is get from:
main::(./m.pl:176):	my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
  DB<2> p $func_offset
0x175
There already a "0x" in $func_offset, another 0x make it to be NaN.
The $func_offset is from line:
	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
		$function = $1;
		$func_offset = $2;
	}
I make a patch to change "(0x[0-9a-f]+)\/0x[a-f0-9]/)" to "0x([0-9a-f]+)\/0x[a-f0-9]/)".

Thanks,
Hui

Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ozan ￁\x7f\x7fglayan <ozan@pardus.org.tr>
Cc: Matthew Wilcox <willy@linux.intel.com>
---
 scripts/markup_oops.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -158,7 +158,7 @@ while (<STDIN>) {
 		$function = $1;
 		$func_offset = $2;
 	}
-	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
 		$function = $1;
 		$func_offset = $2;
 	}

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

end of thread, other threads:[~2010-01-25 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-17 13:35 [PATCH] Fix markup_oops.pl get $func_offset error in x8664 Hui Zhu
2010-01-23  1:21 ` Andrew Morton
2010-01-25  6:14   ` Hui Zhu
2010-01-25 14:27 Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).