Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2001 11:43:48 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Gary Jennejohn <garyj@jennejohn.org>, freebsd-current@FreeBSD.org, Leif Neland <leifn@neland.dk>
Subject:   Re: make kernel failure: pecoff: machine/lock.h
Message-ID:  <XFMail.010228114348.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0102281555160.555-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org> -- 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010228114348.jhb>