-/* $OpenBSD: machdep.c,v 1.16 1997/02/04 07:15:28 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.17 1997/02/05 17:33:00 downsj Exp $ */
/* $NetBSD: machdep.c,v 1.77 1996/12/11 16:49:23 thorpej Exp $ */
/*
kfp->sf_scp = hkfp->hsf_scp;
}
#endif
+ /* XXX do not copy out siginfo if not needed */
(void) copyout((caddr_t)kfp, (caddr_t)fp, fsize);
frame->f_regs[SP] = (int)fp;
#ifdef DEBUG
-/* $OpenBSD: trap.c,v 1.6 1997/02/04 06:21:32 downsj Exp $ */
+/* $OpenBSD: trap.c,v 1.7 1997/02/05 17:33:02 downsj Exp $ */
/* $NetBSD: trap.c,v 1.47 1996/10/14 20:06:31 thorpej Exp $ */
/*
} else if (sig = writeback(fp, fromtrap)) {
beenhere = 1;
oticks = p->p_sticks;
- trapsignal(p, sig, T_MMUFLT, SEGV_MAPERR, (caddr_t)faultaddr);
+ trapsignal(p, sig, T_MMUFLT, SEGV_MAPERR,
+ (caddr_t)faultaddr);
goto again;
}
}
register struct vmspace *vm = p->p_vmspace;
register vm_map_t map;
int rv;
- vm_prot_t ftype;
+ vm_prot_t ftype, vftype;
extern vm_map_t kernel_map;
#ifdef DEBUG
else
map = vm ? &vm->vm_map : kernel_map;
- if (WRFAULT(code))
+ if (WRFAULT(code)) {
+ vftype = VM_PROT_WRITE;
ftype = VM_PROT_READ | VM_PROT_WRITE;
- else
+ } else
ftype = VM_PROT_READ;
va = trunc_page((vm_offset_t)v);
goto dopanic;
}
frame.f_pad = code & 0xffff;
- ucode = T_MMUFLT;
+ ucode = vftype;
typ = SEGV_MAPERR;
i = SIGSEGV;
break;