From owner-cvs-all Thu Feb 22 13:28:50 2001 Delivered-To: cvs-all@freebsd.org Received: from gratis.grondar.za (grouter.grondar.za [196.7.18.65]) by hub.freebsd.org (Postfix) with ESMTP id 8080B37B503; Thu, 22 Feb 2001 13:28:39 -0800 (PST) (envelope-from mark@grondar.za) Received: from grondar.za (root@gratis.grondar.za [196.7.18.133]) by gratis.grondar.za (8.11.1/8.11.1) with ESMTP id f1MLSS119499; Thu, 22 Feb 2001 23:28:31 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <200102222128.f1MLSS119499@gratis.grondar.za> To: John Baldwin Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 trap.c References: <200102221935.f1MJZLx89084@freefall.freebsd.org> In-Reply-To: <200102221935.f1MJZLx89084@freefall.freebsd.org> ; from John Baldwin "Thu, 22 Feb 2001 11:35:21 PST." Date: Thu, 22 Feb 2001 23:29:10 +0200 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The p_md.md_regs member of proc is used in signal handling to reference > the the original trapframe of the syscall, trap, or interrupt that entered > the kernel. Before SMPng, ast's were handled via a psuedo trap at the > end of doerti. With the SMPng commit, ast's were broken out into a > separate ast() function that was called from doreti to match the behavior > of other architectures. Unfortunately, when this was done, the > p_md.md_regs member of curproc was not updateda in ast(), thus when > signals are handled by userret() after an interrupt that returns to > userland, we end up using a stale trapframe that will result in the > registers from the old trapframe overwriting the real trapframe and > smashing all the registers right before we return to usermode. The saved > %cs:%eip from where we were in usermode are saved in the trapframe for > example. Does this fix any intersting panics? I have a (patched) kernel that panics (GPF) in doreti. Is this inspired by anything of that ilk? M -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message