Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

SGX Reserved Memory

PYuhala
初学者
2,075 次查看

Hello, 

I will like to know what exactly "Reserved Memory" is as indicated in the SGX dev reference for linux* OS. Does this represent memory in the enclave heap ? Or is it real/physical EPC memory. How large can the value in ReservedMemMinSize (in the enclave config file) be ? What are the effects of increasing/reducing this size ? 

I found it a bit difficult to get specific information about Reserved Memory; the dev reference does not explicitly answer the above questions.

 

Best regards,

Peterson Yuhala

0 项奖励
1 解答
JesusG_Intel
主持人
2,061 次查看

Hello Pyuhala,


You are right, the developer reference guide does not explain those parameters very well. The section on Reserved Memory Functions explains how to use them. You can use this memory to allocate extra space at the end of the heap for the enclave during runtime. use the functions below to allocate and free that memory as needed. As explained in the section below, you will need this only under special circumstances.


Reserved Memory Functions

Intel(R) SGX SDK allows users to configure a reserved memory area for special usage, such as JIT support. The memory is allowed to be configured or changed to executable. See Enclave Configuration File for details. To manage the reserved memory the sgx_tstdc library provides the following functions to query the memory information, allocate and deallocate the memory, change the memory protection.

  • sgx_get_rsrv_mem_info
  • sgx_alloc_rsrv_mem
  • sgx_alloc_rsrv_mem_ex
  • sgx_free_rsrv_mem
  • sgx_tprotect_rsrv_mem


Sincerely,

Jesus G.

Intel Customer Support


在原帖中查看解决方案

0 项奖励
3 回复数
JesusG_Intel
主持人
2,062 次查看

Hello Pyuhala,


You are right, the developer reference guide does not explain those parameters very well. The section on Reserved Memory Functions explains how to use them. You can use this memory to allocate extra space at the end of the heap for the enclave during runtime. use the functions below to allocate and free that memory as needed. As explained in the section below, you will need this only under special circumstances.


Reserved Memory Functions

Intel(R) SGX SDK allows users to configure a reserved memory area for special usage, such as JIT support. The memory is allowed to be configured or changed to executable. See Enclave Configuration File for details. To manage the reserved memory the sgx_tstdc library provides the following functions to query the memory information, allocate and deallocate the memory, change the memory protection.

  • sgx_get_rsrv_mem_info
  • sgx_alloc_rsrv_mem
  • sgx_alloc_rsrv_mem_ex
  • sgx_free_rsrv_mem
  • sgx_tprotect_rsrv_mem


Sincerely,

Jesus G.

Intel Customer Support


0 项奖励
PYuhala
初学者
2,046 次查看

Hello, 

Thanks for your response; I think it is much clearer now.

Best regards,

Peterson Yuhala

0 项奖励
JesusG_Intel
主持人
2,035 次查看

Hello Pyuhala,


Thanks for the feedback.


This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.


0 项奖励
回复