Date: Tue, 23 Nov 1999 11:44:33 +0800 From: Peter Wemm <peter@netplex.com.au> To: "Daniel O'Connor" <doconnor@gsoft.com.au> Cc: Steve Kargl <sgk@troutmask.apl.washington.edu>, current@FreeBSD.ORG, jmz@FreeBSD.ORG (Jean-Marc Zucconi), ak03@gte.com (Alexander N. Kabaev), green@FreeBSD.ORG (Brian Fundakowski Feldman) Subject: Re: Netscape and -current Message-ID: <19991123034433.1E28F1C6D@overcee.netplex.com.au> In-Reply-To: Message from "Daniel O'Connor" <doconnor@gsoft.com.au> of "Tue, 23 Nov 1999 12:00:52 %2B1030." <XFMail.991123120052.doconnor@gsoft.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
"Daniel O'Connor" wrote: > > On 22-Nov-99 Steve Kargl wrote: > > FreeBSD 4.0-CURRENT #1: Mon Nov 15 09:52:45 PST 1999 > > root@troutmask.apl.washington.edu:/usr/src/sys/compile/TROUTMASK > > netscape (for FBSD) works fine. > > I have -current as of 19-Nov-99 and Netscape works fine (well as well at it > ever does..) I'd be curious to know if this fixes it on a -current kernel (after rev 1.377 of i386/machdep.c) Index: machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.377 diff -u -r1.377 machdep.c --- machdep.c 1999/11/21 14:46:43 1.377 +++ machdep.c 1999/11/23 03:40:49 @@ -871,14 +871,19 @@ { struct trapframe *regs; ucontext_t *ucp; + struct osigcontext *scp; int cs, eflags; ucp = uap->sigcntxp; + scp = (struct osigcontext *)ucp; + + if (useracc((caddr_t)scp, sizeof (struct osigcontext), VM_PROT_READ)) { + if (scp->sigcntxp->sc_trapno == 0x01d516) + return osigreturn(p, (struct osigreturn_args *)uap); + } + if (!useracc((caddr_t)ucp, sizeof(ucontext_t), VM_PROT_READ)) return(EFAULT); - - if (((struct osigcontext *)uap->sigcntxp)->sc_trapno == 0x01d516) - return osigreturn(p, (struct osigreturn_args *)uap); regs = p->p_md.md_regs; eflags = ucp->uc_mcontext.mc_eflags; The problem is that the useracc was moved earlier, and is being done on a larger struct size before we know if it's the right struct or not. My suggested change is to test for only sizeof osigcontext until we know it's the larger (?) ucontext_t. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au 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?19991123034433.1E28F1C6D>