Explorar o código

[Pal/Linux-SGX] Update enclave_{base,top} only once

The code already tried to do this but if enclave_base == 0 it
recalcuates enclave_top every time.
Simon Gaiser %!s(int64=6) %!d(string=hai) anos
pai
achega
f883489356
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Pal/src/host/Linux-SGX/enclave_ecalls.c

+ 1 - 1
Pal/src/host/Linux-SGX/enclave_ecalls.c

@@ -23,7 +23,7 @@ int handle_ecall (long ecall_index, void * ecall_args, void * exit_target,
     if (ecall_index < 0 || ecall_index >= ECALL_NR)
         return -PAL_ERROR_INVAL;
 
-    if (!enclave_base) {
+    if (!enclave_top) {
         enclave_base = enclave_base_addr;
         enclave_top = enclave_base_addr + GET_ENCLAVE_TLS(enclave_size);
     }