From bf2af3b9b526563b43582f19d7217fd70a75b04e Mon Sep 17 00:00:00 2001 From: chs Date: Sun, 5 Sep 2010 20:52:38 +0000 Subject: [PATCH] accept the LDT selector in check_sigcontext32() too. --- sys/arch/amd64/amd64/netbsd32_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/amd64/amd64/netbsd32_machdep.c b/sys/arch/amd64/amd64/netbsd32_machdep.c index f9385e24fe81..92dde690a459 100644 --- a/sys/arch/amd64/amd64/netbsd32_machdep.c +++ b/sys/arch/amd64/amd64/netbsd32_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.66 2010/09/05 20:14:39 chs Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.66 2010/09/05 20:14:39 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -962,7 +962,7 @@ check_sigcontext32(struct lwp *l, const struct netbsd32_sigcontext *scp) pcb = lwp_getpcb(curlwp); if (((scp->sc_eflags ^ tf->tf_rflags) & PSL_USERSTATIC) != 0 || - scp->sc_cs != GSEL(GUCODE32_SEL, SEL_UPL)) + !VALID_USER_CSEL32(scp->sc_cs)) return EINVAL; if (scp->sc_fs != 0 && !VALID_USER_DSEL32(scp->sc_fs) && !(scp->sc_fs == GSEL(GUFS_SEL, SEL_UPL) && pcb->pcb_fs != 0))