From 19cacf58afae8d6887288c095a23e16ffe22aef9 Mon Sep 17 00:00:00 2001 From: niklas Date: Fri, 1 Dec 1995 17:47:16 +0000 Subject: [PATCH] niklas pointed out the new MDP_UNCACHE_WX might break fork/exec. always set/clear in setregs() now --- sys/arch/amiga/amiga/machdep.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 } /* -- 2.20.1