From owner-freebsd-current Mon Nov 22 22:14:31 1999 Delivered-To: freebsd-current@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id 1764B1509A; Mon, 22 Nov 1999 22:14:19 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 248461C6D; Tue, 23 Nov 1999 14:13:12 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: Brian Fundakowski Feldman Cc: Christopher Masto , "Daniel O'Connor" , Steve Kargl , current@FreeBSD.org, Jean-Marc Zucconi , "Alexander N. Kabaev" Subject: Re: Netscape and -current In-Reply-To: Message from Brian Fundakowski Feldman of "Tue, 23 Nov 1999 00:30:44 EST." Date: Tue, 23 Nov 1999 14:13:12 +0800 From: Peter Wemm Message-Id: <19991123061312.248461C6D@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brian Fundakowski Feldman wrote: > Forget anything I said about KAME being the strong possibility :) As > soon as peter noted what commit it could have to do with, I figured > it out and fixed it; after testing, I committed it. Be happy :) Your fix suffers from exactly the same problem.. Suppose down the track that ucontext_t becomes smaller than 'struct sigocontext' ? You're then failing what would have worked. The check against sizeof osigcontext should not be fatal. Index: machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v retrieving revision 1.378 diff -u -r1.378 machdep.c --- machdep.c 1999/11/23 04:09:13 1.378 +++ machdep.c 1999/11/23 05:49:46 @@ -871,14 +871,16 @@ { struct trapframe *regs; ucontext_t *ucp; + struct osigcontext *scp; int cs, eflags; ucp = uap->sigcntxp; + scp = (struct osigcontext *)ucp; - if (!useracc((caddr_t)ucp, sizeof(struct osigcontext), VM_PROT_READ)) - return (EFAULT); - if (((struct osigcontext *)ucp)->sc_trapno == 0x01d516) - return (osigreturn(p, (struct osigreturn_args *)uap)); + if (useracc((caddr_t)scp, sizeof (struct osigcontext), VM_PROT_READ)) { + if (scp->sc_trapno == 0x01d516) + return osigreturn(p, (struct osigreturn_args *)uap); + } /* * Since ucp is not an osigcontext but a ucontext_t, we have to 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