diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-04 12:23:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-04 12:23:17 +0000 |
commit | 01fe3a918d49aacdc92592f221e04ff8216c95df (patch) | |
tree | 8dd023cae8c06772d78db3c4a67603bcc65de4ac | |
parent | 05d1aadcdac7249b52efdc978c29e34073aa4f79 (diff) |
pass VM_PROT_READ/VM_PROT_WRITE as si_trapno for SIGSEGV
-rw-r--r-- | sys/arch/sparc/sparc/trap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c index 972e8482747..65569121f50 100644 --- a/sys/arch/sparc/sparc/trap.c +++ b/sys/arch/sparc/sparc/trap.c @@ -743,7 +743,8 @@ kfault: tf->tf_npc = onfault + 4; return; } - trapsignal(p, SIGSEGV, (u_int)v, SEGV_MAPERR, (caddr_t)v); + trapsignal(p, SIGSEGV, (ser & SER_WRITE) ? VM_PROT_WRITE : + VM_PROT_READ, SEGV_MAPERR, (caddr_t)v); } out: if ((psr & PSR_PS) == 0) { @@ -1015,7 +1016,7 @@ kfault: tf->tf_npc = onfault + 4; return; } - trapsignal(p, SIGSEGV, (u_int)sfva, SEGV_MAPERR, (caddr_t)sfva); + trapsignal(p, SIGSEGV, ftype, SEGV_MAPERR, (caddr_t)sfva); } out: if ((psr & PSR_PS) == 0) { |