Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/sh3/sh3 Pull up revision 1.13 (requested by kl...
details: https://anonhg.NetBSD.org/src/rev/1c2c09491d33
branches: netbsd-1-5
changeset: 491794:1c2c09491d33
user: he <he%NetBSD.org@localhost>
date: Sat May 26 15:28:48 2001 +0000
description:
Pull up revision 1.13 (requested by kleink):
Validate Status Register passed from userland in sigreturn().
diffstat:
sys/arch/sh3/sh3/sh3_machdep.c | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diffs (37 lines):
diff -r 86b4cc9c6c33 -r 1c2c09491d33 sys/arch/sh3/sh3/sh3_machdep.c
--- a/sys/arch/sh3/sh3/sh3_machdep.c Sat May 26 15:28:22 2001 +0000
+++ b/sys/arch/sh3/sh3/sh3_machdep.c Sat May 26 15:28:48 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sh3_machdep.c,v 1.6 2000/05/26 21:20:15 thorpej Exp $ */
+/* $NetBSD: sh3_machdep.c,v 1.6.4.1 2001/05/26 15:28:48 he Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -352,21 +352,13 @@
/* Restore signal context. */
tf = p->p_md.md_regs;
- {
- /*
- * Check for security violations. If we're returning to
- * protected mode, the CPU will validate the segment registers
- * automatically and generate a trap on violations. We handle
- * the trap, rather than doing all of the checking here.
- */
-#ifdef TODO
- if (((context.sc_ssr ^ tf->tf_ssr) & PSL_USERSTATIC) != 0) {
- return (EINVAL);
- }
-#endif
- tf->tf_ssr = context.sc_ssr;
- }
+ /* Check for security violations. */
+ if (((context.sc_ssr ^ tf->tf_ssr) & PSL_USERSTATIC) != 0)
+ return (EINVAL);
+
+ tf->tf_ssr = context.sc_ssr;
+
tf->tf_r0 = context.sc_r0;
tf->tf_r1 = context.sc_r1;
tf->tf_r2 = context.sc_r2;
Home |
Main Index |
Thread Index |
Old Index