Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Don't forget to clean l_md.md_flags, otherwise there may...
details: https://anonhg.NetBSD.org/src/rev/307ba14ccb5b
branches: trunk
changeset: 355136:307ba14ccb5b
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Jul 14 13:21:29 2017 +0000
description:
Don't forget to clean l_md.md_flags, otherwise there may be MDL_COMPAT32,
in which case the kernel would always use iret (slower).
diffstat:
sys/arch/amd64/amd64/machdep.c | 6 ++++--
sys/compat/linux/arch/amd64/linux_machdep.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r 0b470c552ae2 -r 307ba14ccb5b sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Fri Jul 14 13:02:20 2017 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Fri Jul 14 13:21:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.255 2017/03/24 17:09:36 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.256 2017/07/14 13:21:29 maxv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255 2017/03/24 17:09:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.256 2017/07/14 13:21:29 maxv Exp $");
/* #define XENDEBUG_LOW */
@@ -1325,6 +1325,8 @@
l->l_proc->p_flag &= ~PK_32;
+ l->l_md.md_flags = MDL_IRET;
+
tf = l->l_md.md_regs;
tf->tf_ds = LSEL(LUDATA_SEL, SEL_UPL);
tf->tf_es = LSEL(LUDATA_SEL, SEL_UPL);
diff -r 0b470c552ae2 -r 307ba14ccb5b sys/compat/linux/arch/amd64/linux_machdep.c
--- a/sys/compat/linux/arch/amd64/linux_machdep.c Fri Jul 14 13:02:20 2017 +0000
+++ b/sys/compat/linux/arch/amd64/linux_machdep.c Fri Jul 14 13:21:29 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.51 2017/02/13 15:03:18 maxv Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.52 2017/07/14 13:21:29 maxv Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.51 2017/02/13 15:03:18 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.52 2017/07/14 13:21:29 maxv Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -93,6 +93,8 @@
l->l_proc->p_flag &= ~PK_32;
+ l->l_md.md_flags = MDL_IRET;
+
tf = l->l_md.md_regs;
tf->tf_rax = 0;
tf->tf_rbx = 0;
Home |
Main Index |
Thread Index |
Old Index