Module Name:    src
Committed By:   maxv
Date:           Thu Aug 31 15:41:14 UTC 2017

Modified Files:
        src/sys/arch/amd64/amd64: netbsd32_machdep.c

Log Message:
check sc_eip in the ldt branch too


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/amd64/amd64/netbsd32_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.107 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.108
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.107	Tue Jul 25 18:03:56 2017
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Thu Aug 31 15:41:14 2017
@@ -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 @@ check_sigcontext32(struct lwp *l, const 
 			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;
 }
 

Reply via email to