Re: Kernel OOPS on boot

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Thu Oct 26 2000 - 09:17:14 EST


On Thu, 26 Oct 2000, Mircea Damian wrote:

>
>
> Hello,
>
> I'm unable to boot kernel 2.4.0-test10-pre5 on a:
>

>
> And here is the broken routine:
>
> 000003f4 <do_test_wp_bit>:
> 3f4: 8b 44 24 04 movl 0x4(%esp,1),%eax
> 3f8: b9 01 00 00 00 movl $0x1,%ecx
> 3fd: 8a 10 movb (%eax),%dl
> 3ff: 88 10 movb %dl,(%eax)
> 401: 31 c9 xorl %ecx,%ecx
> 403: 89 c8 movl %ecx,%eax
> 405: c3 ret
> 406: 89 f6 movl %esi,%esi
>
>

This is not good code. It does the following:

o Gets a parameter off the stack and puts into eax (a pointer).
o Put the value 1 into ecx.
o Take a byte from the pointed-to location and put it into dl.
o Put the byte in dl back into memory where it came from!
o Clear ecx
o Copy ecx to eax for a return value of 0

Stand-alone, it can't do anything useful. However, if it generates
a page-fault due to the read or write, the page-fault handler could
do "something". Currently, the fault it fatal, probably because
the passed pointer is invalid.

Cheers,
Dick Johnson

Penguin : Linux version 2.2.17 on an i686 machine (801.18 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:18 EST