From owner-freebsd-current Tue Nov 23 8:17:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D9F6B14E4D; Tue, 23 Nov 1999 08:17:06 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from p113-ts5.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id DAA02057; Wed, 24 Nov 1999 03:24:20 +1100 Date: Wed, 24 Nov 1999 03:16:39 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Peter Wemm Cc: Brian Fundakowski Feldman , "Alexander N. Kabaev" , Jean-Marc Zucconi , marcel@FreeBSD.ORG, pho@FreeBSD.ORG, phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Netscape and -current In-Reply-To: <19991123033517.E7D731C6D@overcee.netplex.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 23 Nov 1999, Peter Wemm wrote: > I'm pretty sure it's this commit to i386/machdep.c: > === > revision 1.377 > date: 1999/11/21 14:46:43; author: pho; state: Exp; lines: +5 -5 > Moved useracc() to top of sigreturn as to avoid panic > caused by invalid arguments to rutine. > > Reviewed by: marcel, phk > === Hmm. My netscape works, but I didn't use merge that commit. I had already inadvertly fixed the bug in another way while cleaning up. Indeed, the proplem is checking the new context before checking that the context is actually new. Here is my version. int sigreturn(p, uap) struct proc *p; struct sigreturn_args /* { ucontext_t *ucp; } */ *uap; { struct trapframe *regs; ucontext_t *ucp; int cs, eflags; #if defined(COMPAT_43) || defined(COMPAT_SUNOS) if (((struct osigcontext *)uap->sigcntxp)->sc_trapno == 0x01d516) return (osigreturn(p, (struct osigreturn_args *)uap)); #endif ucp = uap-> /* ucp */ sigcntxp; if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ)) return (EFAULT); eflags = ucp->uc_mcontext.mc_eflags; regs = p->p_md.md_regs; Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message