summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-11-06 17:23:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-11-06 17:23:42 +0000
commitd224251fafcaedd990c2a4057e2f3b6d5bb99494 (patch)
treec0bae3d1d0faae558a3d1ffeac06548ae1d246ce
parent3732c290577edb668e224ca3bf9f5464a30a7243 (diff)
Homogeneize all PSR field tests in user-provided structures. No functional
change.
-rw-r--r--sys/arch/hp300/hp300/hpux_machdep.c5
-rw-r--r--sys/arch/m68k/m68k/sig_machdep.c5
-rw-r--r--sys/arch/m68k/m68k/sunos_machdep.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/hpux_machdep.c5
4 files changed, 12 insertions, 8 deletions
diff --git a/sys/arch/hp300/hp300/hpux_machdep.c b/sys/arch/hp300/hp300/hpux_machdep.c
index 33f74e1caab..2253a52c63b 100644
--- a/sys/arch/hp300/hp300/hpux_machdep.c
+++ b/sys/arch/hp300/hp300/hpux_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_machdep.c,v 1.19 2005/08/06 12:10:28 miod Exp $ */
+/* $OpenBSD: hpux_machdep.c,v 1.20 2005/11/06 17:23:39 miod Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.19 1998/02/16 20:58:30 thorpej Exp $ */
/*
@@ -575,7 +575,8 @@ hpux_sys_sigreturn(p, v, retval)
if (copyin((caddr_t)scp, (caddr_t)&tsigc, sizeof tsigc))
return (EINVAL);
scp = &tsigc;
- if ((scp->hsc_ps & (PSL_MBZ|PSL_IPL|PSL_S)) != 0)
+ if ((scp->hsc_ps & PSL_USERCLR) != 0 ||
+ (scp->hsc_ps & PSL_USERSET) != PSL_USERSET)
return (EINVAL);
/*
diff --git a/sys/arch/m68k/m68k/sig_machdep.c b/sys/arch/m68k/m68k/sig_machdep.c
index 8d05d991ae3..17995871a6c 100644
--- a/sys/arch/m68k/m68k/sig_machdep.c
+++ b/sys/arch/m68k/m68k/sig_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sig_machdep.c,v 1.15 2004/02/19 15:33:51 miod Exp $ */
+/* $OpenBSD: sig_machdep.c,v 1.16 2005/11/06 17:23:41 miod Exp $ */
/* $NetBSD: sig_machdep.c,v 1.3 1997/04/30 23:28:03 gwr Exp $ */
/*
@@ -310,7 +310,8 @@ sys_sigreturn(p, v, retval)
if (copyin((caddr_t)scp, (caddr_t)&tsigc, sizeof tsigc))
return (EINVAL);
scp = &tsigc;
- if ((scp->sc_ps & (PSL_MBZ|PSL_IPL|PSL_S)) != 0)
+ if ((scp->sc_ps & PSL_USERCLR) != 0 ||
+ (scp->sc_ps & PSL_USERSET) != PSL_USERSET)
return (EINVAL);
/*
* Restore the user supplied information
diff --git a/sys/arch/m68k/m68k/sunos_machdep.c b/sys/arch/m68k/m68k/sunos_machdep.c
index 6aec0cd9477..f95a7024e9a 100644
--- a/sys/arch/m68k/m68k/sunos_machdep.c
+++ b/sys/arch/m68k/m68k/sunos_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunos_machdep.c,v 1.17 2005/08/06 12:10:28 miod Exp $ */
+/* $OpenBSD: sunos_machdep.c,v 1.18 2005/11/06 17:23:41 miod Exp $ */
/* $NetBSD: sunos_machdep.c,v 1.12 1996/10/13 03:19:22 christos Exp $ */
/*
@@ -226,7 +226,8 @@ sunos_sys_sigreturn(p, v, retval)
if (copyin((caddr_t)scp, (caddr_t)&tsigc, sizeof(tsigc)))
return (EINVAL);
scp = &tsigc;
- if ((scp->sc_ps & (PSL_MBZ|PSL_IPL|PSL_S)) != 0)
+ if ((scp->sc_ps & PSL_USERCLR) != 0 ||
+ (scp->sc_ps & PSL_USERSET) != PSL_USERSET)
return (EINVAL);
/*
* Restore the user supplied information
diff --git a/sys/arch/mvme68k/mvme68k/hpux_machdep.c b/sys/arch/mvme68k/mvme68k/hpux_machdep.c
index e144e62ae06..e5bea5c0e0c 100644
--- a/sys/arch/mvme68k/mvme68k/hpux_machdep.c
+++ b/sys/arch/mvme68k/mvme68k/hpux_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_machdep.c,v 1.13 2005/08/06 12:10:28 miod Exp $ */
+/* $OpenBSD: hpux_machdep.c,v 1.14 2005/11/06 17:23:41 miod Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.9 1997/03/16 10:00:45 thorpej Exp $ */
/*
@@ -613,7 +613,8 @@ hpux_sys_sigreturn(p, v, retval)
if (copyin((caddr_t)scp, (caddr_t)&tsigc, sizeof tsigc))
return (EINVAL);
scp = &tsigc;
- if ((scp->hsc_ps & (PSL_MBZ|PSL_IPL|PSL_S)) != 0)
+ if ((scp->hsc_ps & PSL_USERCLR) != 0 ||
+ (scp->hsc_ps & PSL_USERSET) != PSL_USERSET)
return (EINVAL);
/*