mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-04 07:58:22 +00:00
[Pal/Linux-SGX] Do not show SGX context debug info in non-debug build
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user