lkml.org 
[lkml]   [2000]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel OOPS on boot
Richard B. Johnson wrote:
> > And here is the broken routine:
> >
> > 000003f4 <do_test_wp_bit>:
[...]
> 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

If you look at the original routine (arch/i386/mm/init.c:test_wp_bit),
you'll see that its purpose is to test the capabilities of the CPU's
MMU (to differentiate the old 386's that didn't honor WP in supervisor
mode), which is why it does this little dance - to provoke a page
fault.

Anyway, the probable fix has already been posted (i.e. don't use gcc
2.7.2.*)

-Mitch
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:43    [W:0.057 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site