Re: Oops from new WP test + fix

From: Brian Gerst (bgerst@didntduck.org)
Date: Wed Oct 25 2000 - 06:50:36 EST


Paul Gortmaker wrote:
>
> Test10-pre4 (and up) can die on the new WP test as follows:
>
> Checking if this processor honours the WP bit even in supervisor mode...
> <1>Unable to handle kernel paging request at virtual address c0000000
>
> I examined the new WP code added to pre4 and even checked the exception
> table entries stored in vmlinux by it and it all looked fine. Strange.
> Well after a few handfuls of hair, it turns out that the new WP test code
> is a red herring - it just happens to be the first thing to cause a
> fault and a lookup in the exception table.
>
> It turns out that also in pre4 was a patch to use non-continuous
> initialization of the elements in kernel_module. And if modules are
> enabled, the exception table for the kernel is obtained from the
> kernel_module struct instead of directly. Which is a problem as
> gcc-2.7.2 (perhaps others too) now munges the loading of the struct
> (it miscalculates the offsets), and voila - you have no exception table.
>
> BTW, while looking at the new WP code, I noticed the "jmp 1f; 1:"
> before and after are now gone - the comment above them (which lives on)
> indicated they were Deep Magic(tm) to avoid some dark and mysterious
> CPU bugs. I take it that science has prevailed over magic? ;-)

The call/ret pair should have the same effect.

-- 

Brian Gerst - 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:15 EST