浏览代码

[Pal/Linux-SGX] Remove unnecessary check on exit_target

exit_target is only used as an argument to EEXIT to tell the processor
where to continue execution after leaving enclave mode. As documented in
the Intel SDM: If it points to enclave memory it will be restored but
the access will happen after leaving enclave mode so the usual enclave
protections are enforced. Therefore the software check is unnecessary.

Also size == 0 didn't make much sense.
Simon Gaiser 6 年之前
父节点
当前提交
7ae7ba7832
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      Pal/src/host/Linux-SGX/enclave_ecalls.c

+ 0 - 3
Pal/src/host/Linux-SGX/enclave_ecalls.c

@@ -30,9 +30,6 @@ void handle_ecall (long ecall_index, void * ecall_args, void * exit_target,
         enclave_top = enclave_base_addr + GET_ENCLAVE_TLS(enclave_size);
     }
 
-    if (sgx_is_within_enclave(exit_target, 0))
-        return;
-
     if (sgx_is_within_enclave(untrusted_stack, 0))
         return;