From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:12:50 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59899C33 for ; Fri, 25 Jul 2014 15:12:50 +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 4672E2C1A for ; Fri, 25 Jul 2014 15:12:50 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFCo7S086901 for ; Fri, 25 Jul 2014 15:12:50 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFCnYT086675 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:12:49 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:12:49 GMT Message-Id: <201407251512.s6PFCnYT086675@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: r271366 - 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: Fri, 25 Jul 2014 15:12:50 -0000 Author: op Date: Fri Jul 25 15:12:49 2014 New Revision: 271366 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271366 Log: KSP SMAP: use selfpatch for stac, clac in sys/amd64/amd64/exception.S Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch 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 Fri Jul 25 14:47:44 2014 (r271365) +++ soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Fri Jul 25 15:12:49 2014 (r271366) @@ -42,6 +42,7 @@ #include #include #include +#include #include "assym.s" @@ -198,7 +199,7 @@ movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld FAKE_MCOUNT(TF_RIP(%rsp)) #ifdef KDTRACE_HOOKS @@ -279,7 +280,7 @@ movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ @@ -383,7 +384,7 @@ movq %r14,TF_R14(%rsp) /* C preserved */ movq %r15,TF_R15(%rsp) /* C preserved */ movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld FAKE_MCOUNT(TF_RIP(%rsp)) movq PCPU(CURTHREAD),%rdi @@ -455,7 +456,7 @@ */ IDTVEC(nmi) - clac /* XXXOP */ + _clac subq $TF_RIP,%rsp movl $(T_NMI),TF_TRAPNO(%rsp) movq $0,TF_ADDR(%rsp) @@ -539,7 +540,7 @@ movq %rdx,%rdi /* destination stack pointer */ shrq $3,%rcx /* trap frame size in long words */ - clac /* XXXOP */ + _clac cld rep movsq /* copy trapframe */