From: niklas Date: Fri, 1 Dec 1995 17:47:16 +0000 (+0000) Subject: niklas pointed out the new MDP_UNCACHE_WX might break fork/exec. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=19cacf58afae8d6887288c095a23e16ffe22aef9;p=openbsd niklas pointed out the new MDP_UNCACHE_WX might break fork/exec. always set/clear in setregs() now --- diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c index 739d05ae23a..f736d1ec425 100644 --- a/sys/arch/amiga/amiga/machdep.c +++ b/sys/arch/amiga/amiga/machdep.c @@ -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 } /*