Skip to content

Commit f2cf6d1

Browse files
author
yuyuany
authored
Revert "Check for crash in sgx_ocall and exit enclave if enclave is crashed"
1 parent 0356eb6 commit f2cf6d1

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

sdk/trts/linux/trts_pic.S

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,6 @@ DECLARE_GLOBAL_FUNC enclave_entry
190190

191191
.cfi_endproc
192192

193-
DECLARE_GLOBAL_FUNC force_exit_enclave
194-
READ_TD_DATA last_sp
195-
sub $(2*SE_WORDSIZE), %xax
196-
mov %xax, %xbp
197-
mov $SGX_ERROR_ENCLAVE_CRASHED, %xbx
198-
jmp .Lexit_enclave
199-
200193
/*
201194
* -------------------------------------------------------------------------
202195
* sgx_status_t do_ocall(unsigned int index, void *ms);

sdk/trts/trts_ocall.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#include "xsave.h"
4040
#include "trts_internal.h"
4141

42-
extern "C" void force_exit_enclave();
4342
extern "C" sgx_status_t asm_oret(uintptr_t sp, void *ms);
4443
extern "C" sgx_status_t __morestack(const unsigned int index, void *ms);
4544
#define do_ocall __morestack
@@ -54,10 +53,6 @@ extern "C" sgx_status_t __morestack(const unsigned int index, void *ms);
5453
//
5554
sgx_status_t sgx_ocall(const unsigned int index, void *ms)
5655
{
57-
if(get_enclave_state() == ENCLAVE_CRASHED) {
58-
force_exit_enclave();
59-
}
60-
6156
// sgx_ocall is not allowed during exception handling
6257
thread_data_t *thread_data = get_thread_data();
6358

0 commit comments

Comments
 (0)