Subject: Re: random signals kill my processes with -current
To: Paul Goyette <paul@pgoyette.bdt.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 01/27/1997 19:32:56
On Mon, 27 Jan 1997 18:09:21 -0800 (PST) 
 Paul Goyette <paul@pgoyette.bdt.com> wrote:

 > Instead of having to check the (entire?) page for the reserved value, why
 > not just check the current kstack pointer to see if it's within 1 page of
 > the real bottom?  In other words, allocate the extra page, but barf if we
 > ever find out we actually got that close...

...right, sort of a red-zone.  The trick is the "when"... not necessarily
on context switch, since those may be "infrequent" (e.g. during
autoconfiguration), or during some "frequent" event, such as the
clock interrupt handler (which would just check curproc, if curproc
wasn't NULL).

However, during it during the clock interrupt handler leads to two
interesting problems:

	- during autoconfiguration, interrupts might be disabled,
	  so you wouldn't do the checks

	- that might be expensive, given how often the clock
	  ticks

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939