[SGX PAL] Change check_wrfsbase_support() to is_wrfsbase_supported().

Signed-off-by: Chia-Che Tsai <chiache@tamu.edu>
This commit is contained in:
Chia-Che Tsai
2019-01-15 22:09:59 -05:00
committed by Don Porter
parent f54440eb1a
commit f3f05adc2d
3 changed files with 5 additions and 8 deletions
+3 -3
View File
@@ -107,7 +107,7 @@ static size_t get_ssaframesize (uint64_t xfrm)
return ALLOC_ALIGNUP(xsave_size + sizeof(sgx_arch_gpr_t) + 1);
}
int check_wrfsbase_support (void)
bool is_wrfsbase_supported (void)
{
uint32_t cpuinfo[4];
cpuid(7, 0, cpuinfo);
@@ -116,10 +116,10 @@ int check_wrfsbase_support (void)
SGX_DBG(DBG_E, "The WRFSBASE instruction is not permitted on this"
" platform. Please make sure the \'graphene_sgx\' kernel module"
" is loaded properly.\n");
return 0;
return false;
}
return 1;
return true;
}
int create_enclave(sgx_arch_secs_t * secs,
+1 -1
View File
@@ -83,7 +83,7 @@ struct pal_enclave {
};
int open_gsgx (void);
int check_wrfsbase_support (void);
bool is_wrfsbase_supported (void);
int read_enclave_token (int token_file, sgx_arch_token_t * token);
int read_enclave_sigstruct (int sigfile, sgx_arch_sigstruct_t * sig);
+1 -4
View File
@@ -684,10 +684,7 @@ static int load_enclave (struct pal_enclave * enclave,
if (ret < 0)
return ret;
ret = check_wrfsbase_support();
if (ret < 0)
return ret;
if (!ret)
if (!is_wrfsbase_supported())
return -EPERM;
INLINE_SYSCALL(gettimeofday, 2, &tv, NULL);