From owner-freebsd-current Wed Feb 28 11:44:10 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id C974237B719 for ; Wed, 28 Feb 2001 11:44:07 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f1SJeFl21985; Wed, 28 Feb 2001 11:40:15 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 28 Feb 2001 11:43:48 -0800 (PST) From: John Baldwin To: Bruce Evans Subject: Re: make kernel failure: pecoff: machine/lock.h Cc: Gary Jennejohn , freebsd-current@FreeBSD.org, Leif Neland Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -- 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