socsvn commit: r269004 - soc2014/op/freebsd-base/sys/amd64/amd64
op at FreeBSD.org
op at FreeBSD.org
Tue Jun 3 10:56:56 UTC 2014
Author: op
Date: Tue Jun 3 10:56:55 2014
New Revision: 269004
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269004
Log:
SMAP AMD64: clear SMAP state on exceptions
git: https://github.com/opntr/opBSD/commits/op/gsoc2014/smap
Signed-off-by: Oliver Pinter <oliver.pntr at gmail.com>
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 Tue Jun 3 10:36:01 2014 (r269003)
+++ soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Tue Jun 3 10:56:55 2014 (r269004)
@@ -198,6 +198,7 @@
movq %r14,TF_R14(%rsp)
movq %r15,TF_R15(%rsp)
movl $TF_HASSEGS,TF_FLAGS(%rsp)
+ clac
cld
FAKE_MCOUNT(TF_RIP(%rsp))
#ifdef KDTRACE_HOOKS
@@ -278,6 +279,7 @@
movw %es,TF_ES(%rsp)
movw %ds,TF_DS(%rsp)
movl $TF_HASSEGS,TF_FLAGS(%rsp)
+ clac
cld
testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */
jz 1f /* already running with kernel GS.base */
@@ -381,6 +383,7 @@
movq %r14,TF_R14(%rsp) /* C preserved */
movq %r15,TF_R15(%rsp) /* C preserved */
movl $TF_HASSEGS,TF_FLAGS(%rsp)
+ clac
cld
FAKE_MCOUNT(TF_RIP(%rsp))
movq PCPU(CURTHREAD),%rdi
@@ -476,6 +479,7 @@
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)
@@ -535,6 +539,7 @@
movq %rdx,%rdi /* destination stack pointer */
shrq $3,%rcx /* trap frame size in long words */
+ clac /* XXXOP */
cld
rep
movsq /* copy trapframe */
More information about the svn-soc-all
mailing list