diff options
author | 1995-12-01 17:47:16 +0000 | |
---|---|---|
committer | 1995-12-01 17:47:16 +0000 | |
commit | 19cacf58afae8d6887288c095a23e16ffe22aef9 (patch) | |
tree | 61d542776af8c7b0210f47cccf9878ea5459f687 /sys | |
parent | from netbsd: (diff) | |
download | wireguard-openbsd-19cacf58afae8d6887288c095a23e16ffe22aef9.tar.xz wireguard-openbsd-19cacf58afae8d6887288c095a23e16ffe22aef9.zip |
niklas pointed out the new MDP_UNCACHE_WX might break fork/exec.
always set/clear in setregs() now
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amiga/amiga/machdep.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 } /* |