Check %eip with USER_LDT too.
This commit is contained in:
parent
79ef876622
commit
c7032ba2aa
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.102 2017/02/09 08:38:25 maxv Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.103 2017/02/14 09:03:48 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.102 2017/02/09 08:38:25 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.103 2017/02/14 09:03:48 maxv Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -1064,10 +1064,11 @@ cpu_mcontext32_validate(struct lwp *l, const mcontext32_t *mcp)
|
||||
if (!VALID_USER_DSEL32(gr[_REG32_DS]) ||
|
||||
!VALID_USER_DSEL32(gr[_REG32_SS]))
|
||||
return EINVAL;
|
||||
if (gr[_REG32_EIP] >= VM_MAXUSER_ADDRESS32)
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
if (gr[_REG32_EIP] >= VM_MAXUSER_ADDRESS32)
|
||||
return EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user