File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -119,16 +119,11 @@ sgx_entry:
119
119
mov %rbx ,%gs :tcsls_tcs_addr
120
120
stmxcsr %gs :tcsls_user_mxcsr
121
121
fnstcw %gs :tcsls_user_fcw
122
- /* reset user state */
123
- cld /* x86-64 ABI requires DF to be unset at function entry/exit */
124
122
125
- /* making sure AC flag is not set in rflags */
126
- /* avoid using the 'clac' instruction to be compatible with older compilers */
127
- pushfq
128
- popq %rcx
129
- and $0xFFFFFFFFFFFBFFFF , %rcx
130
- push %rcx
131
- popfq
123
+ /* reset user state */
124
+ /* - DF flag: x86-64 ABI requires DF to be unset at function entry/exit */
125
+ /* - AC flag: AEX on misaligned memory accesses leaks side channel info */
126
+ andq $~0x40400 , (%rsp )
132
127
133
128
/* check for debug buffer pointer */
134
129
testb $0xff ,DEBUG(%rip )
You can’t perform that action at this time.
0 commit comments