Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Forbid 64bit entries. That's it, now we sup...
details: https://anonhg.NetBSD.org/src/rev/b7e367cc4ec2
branches: trunk
changeset: 356930:b7e367cc4ec2
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Oct 21 08:27:19 2017 +0000
description:
Forbid 64bit entries. That's it, now we support USER_LDT on amd64.
diffstat:
sys/arch/x86/x86/sys_machdep.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r e35ebef43cec -r b7e367cc4ec2 sys/arch/x86/x86/sys_machdep.c
--- a/sys/arch/x86/x86/sys_machdep.c Sat Oct 21 08:08:26 2017 +0000
+++ b/sys/arch/x86/x86/sys_machdep.c Sat Oct 21 08:27:19 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_machdep.c,v 1.42 2017/10/21 06:55:54 maxv Exp $ */
+/* $NetBSD: sys_machdep.c,v 1.43 2017/10/21 08:27:19 maxv Exp $ */
/*
* Copyright (c) 1998, 2007, 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.42 2017/10/21 06:55:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.43 2017/10/21 08:27:19 maxv Exp $");
#include "opt_mtrr.h"
#include "opt_pmc.h"
@@ -249,6 +249,11 @@
for (i = 0; i < ua->num; i++) {
union descriptor *desc = &descv[i];
+#ifdef __x86_64__
+ if (desc->sd.sd_long != 0)
+ return EACCES;
+#endif
+
switch (desc->sd.sd_type) {
case SDT_SYSNULL:
desc->sd.sd_p = 0;
Home |
Main Index |
Thread Index |
Old Index