[Pal/Linux-SGX] Do not show SGX context debug info in non-debug build

This commit is contained in:
Dmitrii Kuvaiskii
2020-01-31 19:31:55 -08:00
parent 1baf6d9f88
commit b3cffe4f39
2 changed files with 2 additions and 5 deletions
-3
View File
@@ -57,9 +57,6 @@ _DkGenericSignalHandle(int event_num, PAL_NUM arg, PAL_CONTEXT* context) {
*/
noreturn static void restore_sgx_context(sgx_cpu_context_t* uc,
PAL_XREGS_STATE* xregs_state) {
SGX_DBG(DBG_E, "uc %p rsp 0x%08lx &rsp %p rip 0x%08lx +0x%08lx &rip %p\n",
uc, uc->rsp, &uc->rsp, uc->rip, uc->rip - (uintptr_t)TEXT_START, &uc->rip);
if (xregs_state == NULL)
xregs_state = (PAL_XREGS_STATE*)xsave_reset_state;
_restore_sgx_context(uc, xregs_state);
+2 -2
View File
@@ -82,7 +82,7 @@ void init_xsave_size(uint64_t xfrm) {
xsave_features = PAL_XFEATURE_MASK_FPSSE;
xsave_size = 512 + 64;
if (!xfrm || (xfrm & SGX_XFRM_RESERVED)) {
SGX_DBG(DBG_I, "xsave is disabled, xfrm 0x%lx\n", xfrm);
SGX_DBG(DBG_M, "xsave is disabled, xfrm 0x%lx\n", xfrm);
return;
}
@@ -93,5 +93,5 @@ void init_xsave_size(uint64_t xfrm) {
xsave_size = xsave_size_table[i].size;
}
}
SGX_DBG(DBG_I, "xsave is enabled with xsave_size: %u\n", xsave_size);
SGX_DBG(DBG_M, "xsave is enabled with xsave_size: %u\n", xsave_size);
}