diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-11 05:42:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-11 05:42:32 +0000 |
commit | db8c2e3cd9eb84624d46d3291731c5fde7b8fe97 (patch) | |
tree | 386dcf7b8c3f560280ada348687388ee630d5e3f /sys/arch | |
parent | 9be12728c6516a0da6b479cd0eefd0bfc61c8cff (diff) |
do not convert write faults into vm system read+write faults
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/sparc/trap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c index bd9ad57cd3d..35649db2314 100644 --- a/sys/arch/sparc/sparc/trap.c +++ b/sys/arch/sparc/sparc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.13 1998/03/01 10:14:13 johns Exp $ */ +/* $OpenBSD: trap.c,v 1.14 1998/05/11 05:42:31 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */ /* @@ -682,7 +682,7 @@ mem_access_fault(type, ser, v, pc, psr, tf) v = pc; if (VA_INHOLE(v)) goto fault; - ftype = ser & SER_WRITE ? VM_PROT_READ|VM_PROT_WRITE : VM_PROT_READ; + ftype = ser & SER_WRITE ? VM_PROT_WRITE : VM_PROT_READ; va = trunc_page(v); if (psr & PSR_PS) { extern char Lfsbail[]; @@ -811,7 +811,7 @@ mem_access_fault4m(type, sfsr, sfva, afsr, afva, tf) register struct vmspace *vm; register vm_offset_t va; register int rv; - vm_prot_t ftype, vftype; + vm_prot_t ftype; int onfault; u_quad_t sticks; union sigval sv; @@ -923,8 +923,7 @@ mem_access_fault4m(type, sfsr, sfva, afsr, afva, tf) /* Now munch on protections... */ - ftype = sfsr & SFSR_AT_STORE ? VM_PROT_READ|VM_PROT_WRITE:VM_PROT_READ; - vftype = sfsr & SFSR_AT_STORE ? VM_PROT_WRITE:VM_PROT_READ; + ftype = sfsr & SFSR_AT_STORE ? VM_PROT_WRITE : VM_PROT_READ; if (psr & PSR_PS) { extern char Lfsbail[]; if (sfsr & SFSR_AT_TEXT || type == T_TEXTFAULT) { @@ -1000,7 +999,7 @@ kfault: } sv.sival_int = sfva; - trapsignal(p, SIGSEGV, vftype, SEGV_MAPERR, sv); + trapsignal(p, SIGSEGV, ftype, SEGV_MAPERR, sv); } out: if ((psr & PSR_PS) == 0) { |