From 5aafa98562a3bd472ae7934f0d192b9cfcb36254 Mon Sep 17 00:00:00 2001 From: Raoul Strackx Date: Fri, 25 Oct 2019 16:06:13 +0200 Subject: [PATCH] forgot pushfq/popqfq: fixed --- src/libstd/sys/sgx/abi/entry.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstd/sys/sgx/abi/entry.S b/src/libstd/sys/sgx/abi/entry.S index f5d9c4338deb..cd26c7ca200b 100644 --- a/src/libstd/sys/sgx/abi/entry.S +++ b/src/libstd/sys/sgx/abi/entry.S @@ -123,7 +123,9 @@ sgx_entry: /* 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 */ + pushfq andq $~0x40400, (%rsp) + popfq /* check for debug buffer pointer */ testb $0xff,DEBUG(%rip)