Subject: Re: compartmentalization of kernel memory
To: Kamal R Prasad <>
From: Bill Studenmund <>
List: tech-kern
Date: 04/04/2003 11:13:19
On Fri, 4 Apr 2003, Kamal R Prasad wrote:

> Hello,
>  if a null pointer access takes place (inside the kernel), the entire
> kernel memory is suspect.
> is it possible to compartmentalize kernel memory in any way so that memory
> corruption if it does result in an exception is guaranteed to leave
> some/all other memory segments intact? (we will know that memory corruption
> has taken place only when we get an exception).

No. Because what you're taking about if you do that is not a UNIX kernel.

To do that compartmentalization, you need different MMU contexts, which
means different contexts. While others have commented on exception issues,
the main problem I see is that different MMU contexts == different
contexts. In UNIX that means different processes. So you're essentially
talking about different kernel processes. What we have now are different
processes in the kernel, but they are in the same kernel MMU context (thus
their ability to scribble on each others' memory).

To do what you want, we'd need to partition the different kernel bits into
different areas (different MMU contexts) and add mmu context switch hooks
all throught the kernel.

Take care,