Browse Source

Merge pull request #155 from 01org/revert-151-ocall_exit_enclave

Revert "Check for crash in sgx_ocall and exit enclave if enclave is crashed"
yuyuany 6 years ago
parent
commit
2133df2d4a
2 changed files with 0 additions and 12 deletions
  1. 0 7
      sdk/trts/linux/trts_pic.S
  2. 0 5
      sdk/trts/trts_ocall.cpp

+ 0 - 7
sdk/trts/linux/trts_pic.S

@@ -190,13 +190,6 @@ DECLARE_GLOBAL_FUNC enclave_entry
     
     .cfi_endproc
 
-DECLARE_GLOBAL_FUNC force_exit_enclave
-    READ_TD_DATA last_sp
-    sub     $(2*SE_WORDSIZE), %xax
-    mov     %xax, %xbp
-    mov     $SGX_ERROR_ENCLAVE_CRASHED, %xbx
-    jmp     .Lexit_enclave
-
 /* 
  * -------------------------------------------------------------------------
  *  sgx_status_t do_ocall(unsigned int index, void *ms);

+ 0 - 5
sdk/trts/trts_ocall.cpp

@@ -39,7 +39,6 @@
 #include "xsave.h"
 #include "trts_internal.h"
 
-extern "C" void force_exit_enclave();
 extern "C" sgx_status_t asm_oret(uintptr_t sp, void *ms);
 extern "C" sgx_status_t __morestack(const unsigned int index, void *ms);
 #define do_ocall __morestack
@@ -54,10 +53,6 @@ extern "C" sgx_status_t __morestack(const unsigned int index, void *ms);
 //
 sgx_status_t sgx_ocall(const unsigned int index, void *ms)
 {
-    if(get_enclave_state() == ENCLAVE_CRASHED) {
-        force_exit_enclave();
-    }
-
     // sgx_ocall is not allowed during exception handling
     thread_data_t *thread_data = get_thread_data();