Subject: Re: user address space protection in the kernel
To: Rahul Kulkarni <rahul.kulkarni@gmail.com>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 04/07/2006 22:45:13
On Apr 7, 2006, at 10:08 PM, Rahul Kulkarni wrote:

> A fundamental question:
>
> Does the kernel have write acess to user land address space and can it
> corrupt user land addresses (process user text/stack/data)?

It depends on the implementation

> Is the total physical memory BAT mapped in the kernel or is it the
> first 256MB?.

On powerpc, all of physical memory is BAT mapped.  However that isn't a
problem since the kernel and user addres spaces are completely disjoint.

> How can this behaviour be controlled in the UVM/BAT registers i.e to
> provide process user address space protection in the kernel ?

This is controlled by copyin/copyout and the use of USERSR.

--  
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this  
message.