summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-07-28 18:48:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-07-28 18:48:26 +0000
commit5e4d571cbf995ac24e877c1fe86140b719d90a58 (patch)
tree1e46743348c091e5ca72899c7cb36e168ac0cd8d
parent9276e9a621de58ee910400f4aefc198f34ec6f23 (diff)
In addition to cop0 sr, prevent cop0 ic from being modified in
process_write_regs().
-rw-r--r--sys/arch/mips64/mips64/process_machdep.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/process_machdep.c b/sys/arch/mips64/mips64/process_machdep.c
index 94324f33f58..06f48d09ac6 100644
--- a/sys/arch/mips64/mips64/process_machdep.c
+++ b/sys/arch/mips64/mips64/process_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: process_machdep.c,v 1.8 2007/10/18 04:32:25 miod Exp $ */
+/* $OpenBSD: process_machdep.c,v 1.9 2008/07/28 18:48:25 miod Exp $ */
/*
* Copyright (c) 1994 Adam Glass
@@ -40,7 +40,7 @@
* From:
* Id: procfs_i386.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
- * $Id: process_machdep.c,v 1.8 2007/10/18 04:32:25 miod Exp $
+ * $Id: process_machdep.c,v 1.9 2008/07/28 18:48:25 miod Exp $
*/
/*
@@ -104,7 +104,7 @@ process_write_regs(p, regs)
struct proc *p;
struct reg *regs;
{
- register_t sr;
+ register_t sr, ic, cpl;
extern struct proc *machFPCurProcPtr;
if (p == machFPCurProcPtr) {
@@ -114,8 +114,12 @@ process_write_regs(p, regs)
MipsSaveCurFPState16(p);
}
sr = p->p_md.md_regs->sr;
+ ic = p->p_md.md_regs->ic;
+ cpl = p->p_md.md_regs->cpl;
bcopy((caddr_t)regs, (caddr_t)p->p_md.md_regs, REGSIZE);
p->p_md.md_regs->sr = sr;
+ p->p_md.md_regs->ic = ic;
+ p->p_md.md_regs->cpl = cpl;
return (0);
}