Re: [Patch]: write_kmem above high_memory

Manfred Spraul (manfreds@colorfullife.com)
Tue, 04 Jan 2000 16:17:22 +0100


Andi Kleen wrote:
> I was recently fighting with that. The stack pointer was corrupted,
> leading to invalid current, leading to invalid page table, leading to
> recursive oops when it tries to dump the bogus page table (but without the
> registers, because the pte access is in front of show_registers) It would
> be a good addition IMHO.

The Intel recommended solution is long:

* the stack is mapped with a guard page below.

* stack exception are handled with a task gate and a special stack page.
This means that a stack exception will be handled on an emergency stack
with a new stack pointer.
dito for the double fault handler.

A corrupted ESP causes an infinite recursion, then a stack overrun, ->
task gate -> new ESP -> panic().

I know that Windows 95 implements that, but it's difficult, and it's
virtually incompatible with 4 MB page table entries.

-> it's a rare problem, IMHO we can ignore it.

--
	Manfred

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