Subject: Re: Question regarding u area
To: Nivas Madhur <>
From: Chris G. Demetriou <>
List: netbsd-ports
Date: 11/01/1994 17:58:46
> I am in the preliminary stages of porting NetBSD to 88K based VME181. I
> am faced with a design decision regarding the location of the u area
> (and kernel stack). All the existing ports place the u area on top of
> the user addressable area and the u area is user readable.

I do not believe this is true; i think the exception to the rule is
the pmax port.  (i know for a fact that there exist other ports for
which this is true, that are not yet in the NetBSD source tree.)

> Now, 88K has
> separate address spaces for kernel and user and the u area will not
> readable by a user process if I place the u in the kernel address
> space.  I would like to know of any potential problems because of this
> change from other NetBSD ports. The BSD book says that u should be
> readble for handling signal delivery but I am unable to understand why
> it is necessary.

there should be no problems as a result of this.  In 'modern' BSD
kernels, the signal trapoline code isn't located in the u area, it's
copied to the top of the user process's stack by execve(), and thus
the u area no longer needs to be readable by the process for signal

On a slightly related not, all current ports _do_ double map the
u-area to two va's (though whether they're two va's in the kernel, or
one kernel VA and one fixed user VA is port-dependent).  It's useful
to have a second mapping of the user area at a fixed location, so that
your kernel stack can live there, and so that you don't need to
re-thread the kernel stack on a fork().