* [PATCH] Fix markup_oops.pl get error in x86
@ 2010-01-06 9:23 Hui Zhu
2010-01-06 13:23 ` Arjan van de Ven
2010-01-06 13:45 ` Ozan Çağlayan
0 siblings, 2 replies; 7+ messages in thread
From: Hui Zhu @ 2010-01-06 9:23 UTC (permalink / raw)
To: Andrew Morton, Arjan van de Ven, Sam Ravnborg,
Ozan Çaglayan, Matthew Wilcox, linux-kernel
Hello,
When I try to use markup_oops.pl in x86, I always get:
cat 1 | perl markup_oops.pl ./vmlinux
objdump: --start-address: bad number: NaN
No matching code found
This is because in line:
if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
$func_offset will get a number like "0x2"
But in follow code:
my $decodestart = Math::BigInt->from_hex("0x$target") -
Math::BigInt->from_hex("0x$func_offset");
It add other ox to ox2.
Then this value will be set to NaN.
So I make a small patch to fix it.
Best regards,
Hui
---
scripts/markup_oops.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -154,7 +154,7 @@ while (<STDIN>) {
if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
$target = $1;
}
- if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+ if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix markup_oops.pl get error in x86
2010-01-06 9:23 [PATCH] Fix markup_oops.pl get error in x86 Hui Zhu
@ 2010-01-06 13:23 ` Arjan van de Ven
2010-01-07 5:43 ` Hui Zhu
2010-01-06 13:45 ` Ozan Çağlayan
1 sibling, 1 reply; 7+ messages in thread
From: Arjan van de Ven @ 2010-01-06 13:23 UTC (permalink / raw)
To: Hui Zhu
Cc: Andrew Morton, Sam Ravnborg, Ozan Çaglayan, Matthew Wilcox,
linux-kernel
On 1/6/2010 1:23, Hui Zhu wrote:
> }
> $func_offset will get a number like "0x2"
> But in follow code:
> my $decodestart = Math::BigInt->from_hex("0x$target") -
> Math::BigInt->from_hex("0x$func_offset");
> It add other ox to ox2.
> Then this value will be set to NaN.
>
> So I make a small patch to fix it.
> - if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
> + if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
I think this makes sense, but would you not also need to add "x" to the list of allowed characters?
so [a-f0-9x]
?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix markup_oops.pl get error in x86
2010-01-06 9:23 [PATCH] Fix markup_oops.pl get error in x86 Hui Zhu
2010-01-06 13:23 ` Arjan van de Ven
@ 2010-01-06 13:45 ` Ozan Çağlayan
1 sibling, 0 replies; 7+ messages in thread
From: Ozan Çağlayan @ 2010-01-06 13:45 UTC (permalink / raw)
To: Hui Zhu
Cc: Andrew Morton, Arjan van de Ven, Sam Ravnborg, Matthew Wilcox,
linux-kernel
Hui Zhu wrote On 06-01-2010 11:23:
> Hello,
>
> When I try to use markup_oops.pl in x86, I always get:
I already mentioned that but wasn't able to get attention, and yes the current code doesn't work,
http://lkml.indiana.edu/hypermail/linux/kernel/0908.0/02222.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix markup_oops.pl get error in x86
2010-01-06 13:23 ` Arjan van de Ven
@ 2010-01-07 5:43 ` Hui Zhu
2010-01-07 13:03 ` Arjan van de Ven
0 siblings, 1 reply; 7+ messages in thread
From: Hui Zhu @ 2010-01-07 5:43 UTC (permalink / raw)
To: Arjan van de Ven
Cc: Andrew Morton, Sam Ravnborg, Ozan Çaglayan, Matthew Wilcox,
linux-kernel
On Wed, Jan 6, 2010 at 21:23, Arjan van de Ven <arjan@linux.intel.com> wrote:
> On 1/6/2010 1:23, Hui Zhu wrote:
>>
>> }
>> $func_offset will get a number like "0x2"
>> But in follow code:
>> my $decodestart = Math::BigInt->from_hex("0x$target") -
>> Math::BigInt->from_hex("0x$func_offset");
>> It add other ox to ox2.
>> Then this value will be set to NaN.
>>
>> So I make a small patch to fix it.
>
>> - if ($line =~ /EIP is at
>> ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
>> + if ($line =~ /EIP is at
>> ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
>
> I think this makes sense, but would you not also need to add "x" to the list
> of allowed characters?
> so [a-f0-9x]
> ?
>
>
Ah, sorry I make a mistake. I think the last 0x need be keep.
What about this version?
Thanks,
Hui
---
scripts/markup_oops.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -154,7 +154,7 @@ while (<STDIN>) {
if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
$target = $1;
}
- if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+ if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix markup_oops.pl get error in x86
2010-01-07 5:43 ` Hui Zhu
@ 2010-01-07 13:03 ` Arjan van de Ven
2010-01-11 2:59 ` Hui Zhu
0 siblings, 1 reply; 7+ messages in thread
From: Arjan van de Ven @ 2010-01-07 13:03 UTC (permalink / raw)
To: Hui Zhu
Cc: Andrew Morton, Sam Ravnborg, Ozan Çaglayan, Matthew Wilcox,
linux-kernel
On 1/6/2010 21:43, Hui Zhu wrote:
>
> What about this version?
looks great to me,
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
>
> Thanks,
> Hui
>
> ---
> scripts/markup_oops.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/scripts/markup_oops.pl
> +++ b/scripts/markup_oops.pl
> @@ -154,7 +154,7 @@ while (<STDIN>) {
> if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
> $target = $1;
> }
> - if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
> + if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
> $function = $1;
> $func_offset = $2;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix markup_oops.pl get error in x86
2010-01-07 13:03 ` Arjan van de Ven
@ 2010-01-11 2:59 ` Hui Zhu
2010-01-12 3:02 ` Hui Zhu
0 siblings, 1 reply; 7+ messages in thread
From: Hui Zhu @ 2010-01-11 2:59 UTC (permalink / raw)
To: Arjan van de Ven
Cc: Andrew Morton, Sam Ravnborg, Ozan Çaglayan, Matthew Wilcox,
linux-kernel
Thanks.
Hui
On Thu, Jan 7, 2010 at 21:03, Arjan van de Ven <arjan@linux.intel.com> wrote:
> On 1/6/2010 21:43, Hui Zhu wrote:
>>
>> What about this version?
>
> looks great to me,
>
> Acked-by: Arjan van de Ven <arjan@linux.intel.com>
>
>>
>> Thanks,
>> Hui
>>
>> ---
>> scripts/markup_oops.pl | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/scripts/markup_oops.pl
>> +++ b/scripts/markup_oops.pl
>> @@ -154,7 +154,7 @@ while (<STDIN>) {
>> if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
>> $target = $1;
>> }
>> - if ($line =~ /EIP is at
>> ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
>> + if ($line =~ /EIP is at
>> ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
>> $function = $1;
>> $func_offset = $2;
>> }
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix markup_oops.pl get error in x86
2010-01-11 2:59 ` Hui Zhu
@ 2010-01-12 3:02 ` Hui Zhu
0 siblings, 0 replies; 7+ messages in thread
From: Hui Zhu @ 2010-01-12 3:02 UTC (permalink / raw)
To: Arjan van de Ven, Andrew Morton, Sam Ravnborg,
Ozan Çaglayan, Matthew Wilcox
Cc: linux-kernel
Sorry I forgot the Signed-off-by and CC in prev mail.
When I try to use markup_oops.pl in x86, I always get:
cat 1 | perl markup_oops.pl ./vmlinux
objdump: --start-address: bad number: NaN
No matching code found
This is because in line:
if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
$func_offset will get a number like "0x2"
But in follow code:
my $decodestart = Math::BigInt->from_hex("0x$target") -
Math::BigInt->from_hex("0x$func_offset");
It add other 0x to 0x2.
Then this value will be set to NaN.
This patch will fix it.
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
@@ -154,7 +154,7 @@ while (<STDIN>) {
if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
$target = $1;
}
- if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+ if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-01-12 3:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06 9:23 [PATCH] Fix markup_oops.pl get error in x86 Hui Zhu
2010-01-06 13:23 ` Arjan van de Ven
2010-01-07 5:43 ` Hui Zhu
2010-01-07 13:03 ` Arjan van de Ven
2010-01-11 2:59 ` Hui Zhu
2010-01-12 3:02 ` Hui Zhu
2010-01-06 13:45 ` 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;
as well as URLs for NNTP newsgroup(s).