On 28-Feb-01 Bruce Evans wrote:
> On Tue, 27 Feb 2001, John Baldwin wrote:
>> Ok.  It may be that we are overflowing the kernel stack and corrupting the
>> pcb
>> in the process.  One idea atm is to move the pcb off of the stack (since it
>> stores persistent data it's a bad place for it anyways) and to add a red
>> zone
>> at the bottom of the stack to catch overflows.
> Most of the pcb actually has the same persistence as the kernel stack
> (both mainly store the process's context while the process is in the
> kernel).  But it is silly to put the pcb below the stack instead of
> above it.  Perhaps the idea is to get a panic sooner when something
> is corrupted.

That is the idea.  Not all of the pcb is just used while in the kernel.  The
pcb_ext that points to a TSS on the i386 for example.  The problem I think
people are having with the ltr panic is that the stack gets deep enough to
overwrite that field of the pcb, and we die later on when we try to access an
invalid pointer there.  Perhaps pcb_ext, pcb_ldt, and other things that are
persistent across kernel entry/exit should be stored in p_md instead of p_addr.

However, I would like the machine to panic when it overflows the stack rather
than trash the pcb, yes.

> Bruce


John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to