From 8fe5fce4c116e5b99870209ec0460b407e3a9305 Mon Sep 17 00:00:00 2001 From: downsj Date: Wed, 5 Feb 1997 17:33:00 +0000 Subject: [PATCH] latest siginfo changes from theo --- sys/arch/hp300/hp300/machdep.c | 3 ++- sys/arch/hp300/hp300/trap.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 3308b0757f9..f4e2d74c49e 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -943,6 +943,7 @@ sendsig(catcher, sig, mask, code, type, val) 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 diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c index 499c48d8fad..c30f7935c65 100644 --- a/sys/arch/hp300/hp300/trap.c +++ b/sys/arch/hp300/hp300/trap.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -263,7 +263,8 @@ again: } 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; } } @@ -604,7 +605,7 @@ trap(type, code, v, frame) 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 @@ -626,9 +627,10 @@ trap(type, code, v, frame) 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); @@ -697,7 +699,7 @@ trap(type, code, v, frame) goto dopanic; } frame.f_pad = code & 0xffff; - ucode = T_MMUFLT; + ucode = vftype; typ = SEGV_MAPERR; i = SIGSEGV; break; -- 2.20.1