From c3992c95be0031407f0e2dee8f72a39e42266fc8 Mon Sep 17 00:00:00 2001 From: maxv Date: Sun, 15 Oct 2017 11:36:15 +0000 Subject: [PATCH] Make sure the 32bit LWPs don't have MDL_IRET set. That's not a problem right now, but will be in the future. --- sys/arch/amd64/amd64/netbsd32_machdep.c | 6 +++--- sys/compat/linux32/arch/amd64/linux32_machdep.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arch/amd64/amd64/netbsd32_machdep.c b/sys/arch/amd64/amd64/netbsd32_machdep.c index 18150b271c34..f452b96238e3 100644 --- a/sys/arch/amd64/amd64/netbsd32_machdep.c +++ b/sys/arch/amd64/amd64/netbsd32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.109 2017/09/17 09:41:35 maxv Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.110 2017/10/15 11:36:15 maxv Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.109 2017/09/17 09:41:35 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.110 2017/10/15 11:36:15 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -132,7 +132,7 @@ netbsd32_setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack) netbsd32_adjust_limits(p); - l->l_md.md_flags |= MDL_COMPAT32; /* Force iret not sysret */ + l->l_md.md_flags = MDL_COMPAT32; /* Force iret not sysret */ pcb->pcb_flags = PCB_COMPAT32; fpu_save_area_clear(l, pack->ep_osversion >= 699002600 diff --git a/sys/compat/linux32/arch/amd64/linux32_machdep.c b/sys/compat/linux32/arch/amd64/linux32_machdep.c index 8deb2a58948b..c1b585fa3233 100644 --- a/sys/compat/linux32/arch/amd64/linux32_machdep.c +++ b/sys/compat/linux32/arch/amd64/linux32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_machdep.c,v 1.39 2017/09/02 12:57:03 maxv Exp $ */ +/* $NetBSD: linux32_machdep.c,v 1.40 2017/10/15 11:36:15 maxv Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.39 2017/09/02 12:57:03 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.40 2017/10/15 11:36:15 maxv Exp $"); #include #include @@ -283,7 +283,7 @@ linux32_setregs(struct lwp *l, struct exec_package *pack, u_long stack) fpu_save_area_clear(l, __Linux_NPXCW__); - l->l_md.md_flags |= MDL_COMPAT32; /* Forces iret not sysret */ + l->l_md.md_flags = MDL_COMPAT32; /* Forces iret not sysret */ pcb->pcb_flags = PCB_COMPAT32; p->p_flag |= PK_32;