"Daniel O'Connor" wrote:
>
> On 22-Nov-99 Steve Kargl wrote:
> > FreeBSD 4.0-CURRENT #1: Mon Nov 15 09:52:45 PST 1999
> > [EMAIL PROTECTED]:/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 - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message