diff --git a/sys/arch/amiga/amiga/trap.c b/sys/arch/amiga/amiga/trap.c index fe6e5c3801d5..754cadbdea58 100644 --- a/sys/arch/amiga/amiga/trap.c +++ b/sys/arch/amiga/amiga/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.64 1998/07/10 20:24:34 mhitch Exp $ */ +/* $NetBSD: trap.c,v 1.65 1998/10/01 02:53:53 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include @@ -670,11 +671,10 @@ trap(type, code, v, frame) printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); #endif - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -830,8 +830,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/atari/atari/trap.c b/sys/arch/atari/atari/trap.c index 6135186220a5..abe8e1a74a00 100644 --- a/sys/arch/atari/atari/trap.c +++ b/sys/arch/atari/atari/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.35 1998/09/02 14:58:03 leo Exp $ */ +/* $NetBSD: trap.c,v 1.36 1998/10/01 02:53:54 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include @@ -415,11 +416,10 @@ trap(type, code, v, frame) printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); #endif - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -1091,8 +1091,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c index 156a062a0cd4..151d9062af1e 100644 --- a/sys/arch/hp300/hp300/trap.c +++ b/sys/arch/hp300/hp300/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.65 1998/08/20 08:33:46 kleink Exp $ */ +/* $NetBSD: trap.c,v 1.66 1998/10/01 02:53:54 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include "opt_compat_hpux.h" @@ -372,11 +373,10 @@ trap(type, code, v, frame) printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); type |= T_USER; - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -1080,8 +1080,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c index f49b545f791d..8735a5adf9e0 100644 --- a/sys/arch/mac68k/mac68k/trap.c +++ b/sys/arch/mac68k/mac68k/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.64 1998/07/04 22:18:29 jonathan Exp $ */ +/* $NetBSD: trap.c,v 1.65 1998/10/01 02:53:54 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include @@ -428,11 +429,10 @@ copyfault: printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); type |= T_USER; - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -1074,8 +1074,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow here, so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c index 29edc9c15346..0f5ffb7a6a00 100644 --- a/sys/arch/mvme68k/mvme68k/trap.c +++ b/sys/arch/mvme68k/mvme68k/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.23 1998/08/22 10:55:36 scw Exp $ */ +/* $NetBSD: trap.c,v 1.24 1998/10/01 02:53:54 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include "opt_compat_hpux.h" @@ -309,11 +310,10 @@ copyfault: printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); type |= T_USER; - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -1005,8 +1005,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/next68k/next68k/trap.c b/sys/arch/next68k/next68k/trap.c index e86e6a4b3f2a..6632737d285d 100644 --- a/sys/arch/next68k/next68k/trap.c +++ b/sys/arch/next68k/next68k/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.5 1998/07/04 22:18:34 jonathan Exp $ */ +/* $NetBSD: trap.c,v 1.6 1998/10/01 02:53:55 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -44,6 +44,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include "opt_compat_hpux.h" @@ -369,11 +370,10 @@ trap(type, code, v, frame) printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); type |= T_USER; - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -1040,8 +1040,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/sun3/sun3/trap.c b/sys/arch/sun3/sun3/trap.c index 8d09e7fab9a6..efffb5fee608 100644 --- a/sys/arch/sun3/sun3/trap.c +++ b/sys/arch/sun3/sun3/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.80 1998/07/18 23:02:33 thorpej Exp $ */ +/* $NetBSD: trap.c,v 1.81 1998/10/01 02:53:55 thorpej Exp $ */ /* * Copyright (c) 1994 Gordon W. Ross @@ -45,6 +45,7 @@ #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include "opt_ddb.h" @@ -334,11 +335,10 @@ trap(type, code, v, tf) printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); type |= T_USER; - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - tmp = sigmask(SIGILL); - p->p_sigignore &= ~tmp; - p->p_sigcatch &= ~tmp; - p->p_sigmask &= ~tmp; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); sig = SIGILL; ucode = tf.tf_format; break; @@ -661,8 +661,14 @@ syscall(code, tf) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /* diff --git a/sys/arch/x68k/x68k/trap.c b/sys/arch/x68k/x68k/trap.c index 103158628baa..0ce17bf03158 100644 --- a/sys/arch/x68k/x68k/trap.c +++ b/sys/arch/x68k/x68k/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.23 1998/08/22 14:38:41 minoura Exp $ */ +/* $NetBSD: trap.c,v 1.24 1998/10/01 02:53:55 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,6 +45,7 @@ #include "opt_ddb.h" #include "opt_ktrace.h" #include "opt_uvm.h" +#include "opt_compat_netbsd.h" #include "opt_compat_sunos.h" #include "opt_compat_hpux.h" @@ -371,11 +372,10 @@ trap(type, code, v, frame) printf("pid %d: kernel %s exception\n", p->p_pid, type==T_COPERR ? "coprocessor" : "format"); type |= T_USER; - p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL; - i = sigmask(SIGILL); - p->p_sigignore &= ~i; - p->p_sigcatch &= ~i; - p->p_sigmask &= ~i; + p->p_sigacts->ps_sigact[SIGILL].sa_handler = SIG_DFL; + sigdelset(&p->p_sigignore, SIGILL); + sigdelset(&p->p_sigcatch, SIGILL); + sigdelset(&p->p_sigmask, SIGILL); i = SIGILL; ucode = frame.f_format; /* XXX was ILL_RESAD_FAULT */ break; @@ -1103,8 +1103,14 @@ syscall(code, frame) * that is only done if entered via the sigreturn * trap. Cannot allow it here so make sure we fail. */ - if (code == SYS_sigreturn) + switch (code) { +#ifdef COMPAT_13 + case SYS_compat_13_sigreturn13: +#endif + case SYS___sigreturn14: code = nsys; + break; + } break; case SYS___syscall: /*