Refactor app heap and memory boundary check, and fix os_printf compilation error (#356)

Insert app heap before __heap_base, or before new page
Fix os_printf compilation error in some platforms
This commit is contained in:
Wenyong Huang
2020-08-20 12:43:12 +08:00
committed by GitHub
parent 6b5f376e79
commit 89d2937cde
28 changed files with 1311 additions and 648 deletions

View File

@ -152,8 +152,8 @@ int os_mprotect(void *addr, size_t size, int prot)
mprot |= SGX_PROT_EXEC;
st = sgx_tprotect_rsrv_mem(addr, aligned_size, mprot);
if (st != SGX_SUCCESS)
os_printf("os_mprotect(addr=0x%lx, size=%u, prot=0x%x) failed.",
addr, size, prot);
os_printf("os_mprotect(addr=0x%"PRIx64", size=%u, prot=0x%x) failed.",
(uintptr_t)addr, size, prot);
return (st == SGX_SUCCESS? 0:-1);
}