Skip to content

Commit

Permalink
Merge pull request #155 from 01org/revert-151-ocall_exit_enclave
Browse files Browse the repository at this point in the history
Revert "Check for crash in sgx_ocall and exit enclave if enclave is crashed"
  • Loading branch information
yuyuany authored Sep 13, 2017
2 parents 0356eb6 + f2cf6d1 commit 2133df2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions sdk/trts/linux/trts_pic.S
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions sdk/trts/trts_ocall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();

Expand Down

0 comments on commit 2133df2

Please sign in to comment.