diff options
| author | Raoul Strackx <raoul.strackx@fortanix.com> | 2019-10-25 15:44:07 +0200 |
|---|---|---|
| committer | Raoul Strackx <raoul.strackx@fortanix.com> | 2019-10-25 15:44:07 +0200 |
| commit | 34f5d5923f3dff832fbc62a61a062643d78e4c03 (patch) | |
| tree | 9a0a36e9b5f981e8547a2083e926ad8da72b16dd /src/libstd/sys | |
| parent | d257c20a1dc97631f6c1cf4a22f32ed80f23e4f1 (diff) | |
| download | rust-34f5d5923f3dff832fbc62a61a062643d78e4c03.tar.gz rust-34f5d5923f3dff832fbc62a61a062643d78e4c03.zip | |
cleaning up code
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/sgx/abi/entry.S | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libstd/sys/sgx/abi/entry.S b/src/libstd/sys/sgx/abi/entry.S index 08aee89fe03..f5d9c4338de 100644 --- a/src/libstd/sys/sgx/abi/entry.S +++ b/src/libstd/sys/sgx/abi/entry.S @@ -119,16 +119,11 @@ sgx_entry: mov %rbx,%gs:tcsls_tcs_addr stmxcsr %gs:tcsls_user_mxcsr fnstcw %gs:tcsls_user_fcw -/* reset user state */ - cld /* x86-64 ABI requires DF to be unset at function entry/exit */ -/* making sure AC flag is not set in rflags */ -/* avoid using the 'clac' instruction to be compatible with older compilers */ - pushfq - popq %rcx - and $0xFFFFFFFFFFFBFFFF, %rcx - push %rcx - popfq +/* reset user state */ +/* - DF flag: x86-64 ABI requires DF to be unset at function entry/exit */ +/* - AC flag: AEX on misaligned memory accesses leaks side channel info */ + andq $~0x40400, (%rsp) /* check for debug buffer pointer */ testb $0xff,DEBUG(%rip) |
