mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-05 13:21:37 +00:00
[Pal/Linux-SGX] Clear RFLAGS before calling _DkExceptionHandler
This is follow up of https://github.com/oscarlab/graphene/pull/643 RFLAGS.DF must be cleared when calling a C function.
This commit is contained in:
committed by
Michał Kowalczyk
parent
2bc2c04194
commit
5992881c46
@@ -230,6 +230,9 @@ enclave_entry:
|
||||
andq $STACK_ALIGN, %rsi
|
||||
movq %rsi, SGX_GPR_RSP(%rbx)
|
||||
|
||||
# clear rflags to conform the ABI which requires RFLAGS.DF = 0
|
||||
movq $0, SGX_GPR_RFLAGS(%rbx)
|
||||
|
||||
# new RIP is the exception handler
|
||||
leaq _DkExceptionHandler(%rip), %rdi
|
||||
movq %rdi, SGX_GPR_RIP(%rbx)
|
||||
|
||||
Reference in New Issue
Block a user