Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/atari/atari Sync up with the following hp300 trap.c...



details:   https://anonhg.NetBSD.org/src/rev/1df1dde444ca
branches:  trunk
changeset: 473759:1df1dde444ca
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 18 06:31:01 1999 +0000

description:
Sync up with the following hp300 trap.c change:

revision 1.41
date: 1996/09/07 22:26:50;  author: mycroft;  state: Exp;  lines: +5 -20
Use SIGBUS iff we get a legitimate bus fault.  Use SIGSEGV for page protection
violations (per Solaris, SVR4, AIX, Linux, Irix, and SunOS).

...which happens to eliminate an unsafe call to uvm_map_checkprot().

diffstat:

 sys/arch/atari/atari/trap.c |  22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diffs (36 lines):

diff -r 9054ac109891 -r 1df1dde444ca sys/arch/atari/atari/trap.c
--- a/sys/arch/atari/atari/trap.c       Fri Jun 18 06:03:39 1999 +0000
+++ b/sys/arch/atari/atari/trap.c       Fri Jun 18 06:31:01 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.42 1999/03/26 23:41:28 mycroft Exp $        */
+/*     $NetBSD: trap.c,v 1.43 1999/06/18 06:31:01 thorpej Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -942,24 +942,8 @@
                }
        }
        p->p_addr->u_pcb.pcb_onfault = oonfault;
-
-       /*
-        * Determine the cause of the failure if any translating to
-        * a signal.  If the corresponding VA is valid and RO it is
-        * a protection fault (SIGBUS) otherwise consider it an
-        * illegal reference (SIGSEGV).
-        */
-       if (err) {
-               if (uvm_map_checkprot(&p->p_vmspace->vm_map,    
-                                           trunc_page(fa), round_page(fa),
-                                           VM_PROT_READ) &&
-                   !uvm_map_checkprot(&p->p_vmspace->vm_map,
-                                            trunc_page(fa), round_page(fa),
-                                            VM_PROT_WRITE))
-                       err = SIGBUS;
-               else
-                       err = SIGSEGV;
-       }
+       if (err)
+               err = SIGSEGV;
        return(err);
 }
 



Home | Main Index | Thread Index | Old Index