Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/amd64 check sc_eip in the ldt branch too



details:   https://anonhg.NetBSD.org/src/rev/d35d52281d6c
branches:  trunk
changeset: 826390:d35d52281d6c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Aug 31 15:41:14 2017 +0000

description:
check sc_eip in the ldt branch too

diffstat:

 sys/arch/amd64/amd64/netbsd32_machdep.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 8432200b9708 -r d35d52281d6c sys/arch/amd64/amd64/netbsd32_machdep.c
--- a/sys/arch/amd64/amd64/netbsd32_machdep.c   Thu Aug 31 10:30:58 2017 +0000
+++ b/sys/arch/amd64/amd64/netbsd32_machdep.c   Thu Aug 31 15:41:14 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.107 2017/07/25 18:03:56 maxv Exp $      */
+/*     $NetBSD: netbsd32_machdep.c,v 1.108 2017/08/31 15:41:14 maxv Exp $      */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.107 2017/07/25 18:03:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.108 2017/08/31 15:41:14 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1076,10 +1076,11 @@
                        return EINVAL;
                if (!VALID_USER_DSEL32(scp->sc_ds) || !VALID_USER_DSEL32(scp->sc_ss))
                        return EINVAL;
-               if (scp->sc_eip >= VM_MAXUSER_ADDRESS32)
-                       return EINVAL;
        }
 
+       if (scp->sc_eip >= VM_MAXUSER_ADDRESS32)
+               return EINVAL;
+
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index