From owner-svn-soc-all@FreeBSD.ORG Wed Jun 4 14:44:06 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7B6C60F for ; Wed, 4 Jun 2014 14:44:06 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C45B72A6B for ; Wed, 4 Jun 2014 14:44:06 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54Ei6nD062473 for ; Wed, 4 Jun 2014 14:44:06 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s54Ei6kk062471 for svn-soc-all@FreeBSD.org; Wed, 4 Jun 2014 14:44:06 GMT (envelope-from op@FreeBSD.org) Date: Wed, 4 Jun 2014 14:44:06 GMT Message-Id: <201406041444.s54Ei6kk062471@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269065 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 14:44:06 -0000 Author: op Date: Wed Jun 4 14:44:05 2014 New Revision: 269065 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269065 Log: SMAP AMD64: clear SMAP state in NMI handler, as soon as possible git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap Signed-off-by: Oliver Pinter Modified: soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Modified: soc2014/op/freebsd-base/sys/amd64/amd64/exception.S ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Wed Jun 4 14:42:50 2014 (r269064) +++ soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Wed Jun 4 14:44:05 2014 (r269065) @@ -455,6 +455,7 @@ */ IDTVEC(nmi) + clac /* XXXOP */ subq $TF_RIP,%rsp movl $(T_NMI),TF_TRAPNO(%rsp) movq $0,TF_ADDR(%rsp) @@ -479,7 +480,6 @@ movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac cld xorl %ebx,%ebx testb $SEL_RPL_MASK,TF_CS(%rsp)