summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-11-29 17:02:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-11-29 17:02:50 +0000
commit830b4531a9f5ca9c276d17444e2d16c9ed87defa (patch)
treed65efbeefd39fbfc099574cc37ccebb6ca6b2d9d /sys/arch
parent22ba10e603c6b27c70aaeec1c6d690cd8dbe44ed (diff)
niklas pointed out the new MDP_UNCACHE_WX might break fork/exec.
always set/clear in setregs() now
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/m68k/m68k/sunos_machdep.c15
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c13
2 files changed, 12 insertions, 16 deletions
diff --git a/sys/arch/m68k/m68k/sunos_machdep.c b/sys/arch/m68k/m68k/sunos_machdep.c
index 25e3ed7694f..20250bd9565 100644
--- a/sys/arch/m68k/m68k/sunos_machdep.c
+++ b/sys/arch/m68k/m68k/sunos_machdep.c
@@ -88,21 +88,6 @@ struct sunos_sigframe {
};
/*
- * SunOS' ld.so does self-modifying code without knowing about the 040's
- * cache purging needs. So we need to uncache writeable executable pages.
- */
-void
-sunos_setregs(p, pack, stack, retval)
- register struct proc *p;
- struct exec_package *pack;
- u_long stack;
- register_t *retval;
-{
- setregs(p, pack, stack, retval);
- p->p_md.md_flags |= MDP_UNCACHE_WX;
-}
-
-/*
* much simpler sendsig() for SunOS processes, as SunOS does the whole
* context-saving in usermode. For now, no hardware information (ie.
* frames for buserror etc) is saved. This could be fatal, so I take
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index f237d375f85..697c8406519 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $Id: machdep.c,v 1.4 1995/11/28 01:24:40 deraadt Exp $ */
+/* $Id: machdep.c,v 1.5 1995/11/29 17:02:49 deraadt Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -416,6 +416,17 @@ setregs(p, pack, stack, retval)
p->p_addr->u_pcb.pcb_fpregs.fpf_null = 0;
m68881_restore(&p->p_addr->u_pcb.pcb_fpregs);
#endif
+#ifdef COMPAT_SUNOS
+ /*
+ * SunOS' ld.so does self-modifying code without knowing
+ * about the 040's cache purging needs. So we need to uncache
+ * writeable executable pages.
+ */
+ if (p->p_emul == &emul_sunos)
+ p->p_md.md_flags |= MDP_UNCACHE_WX;
+ else
+ p->p_md.md_flags &= ~MDP_UNCACHE_WX;
+#endif
#ifdef COMPAT_HPUX
p->p_md.md_flags &= ~MDP_HPUXMMAP;
if (p->p_emul == &emul_hpux) {