- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I run test-sgx and result is:
SGX1 enabled servers
SGX2 enabled servers
how can I expands EPC memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello enclave_research,
You cannot increase the amount of EPC memory available on a platform. However, in an SGX 2 platform, you can dynamically allocate EPC memory to an enclave during run-time. On an SGX 1 platform, the amount of allocated heap and stack is set at enclave build-time and cannot be changed at run-time.
The Enclave Configuration File controls how much heap and stack is allocated to enclaves. Refer to section Enclave Configuration File in the SGX Developer Reference for more details on the fields in the Enclave Configuration File.
In an SGX 2 platform, the fields StackMinSize, StackMaxSize, HeapMinSize, HeapMaxSize determine how much stack and heap are available to an enclave at run-time. In a Linux system, if these values exceed the total amount of EPC, then paging will occur. In SGX 1, HeapInitSize is the only relevant field for setting the amount of heap available to an enclave and StackMaxSize is the total amount of stack memory available.
Refer to Intel Software Guard Extensions Software Support for Dynamic Memory Allocation inside an Enclave for a complete description of dynamic memory management with SGX 2. The paper states:
"For SGX2, this schema of the enclave configuration has been extended to accommodate parameters relating to reserved address space for expandable/creatable components. Newly added parameters include, but are not limited to
• Min/Max heap sizes
• Min/Max stack sizes
• Min/Max number of threads"
These slides provide a good a summary of SGX 2 dynamic memory management.
Sincerely,
Jesus G.
Intel Customer Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello enclave_research,
You cannot increase the amount of EPC memory available on a platform. However, in an SGX 2 platform, you can dynamically allocate EPC memory to an enclave during run-time. On an SGX 1 platform, the amount of allocated heap and stack is set at enclave build-time and cannot be changed at run-time.
The Enclave Configuration File controls how much heap and stack is allocated to enclaves. Refer to section Enclave Configuration File in the SGX Developer Reference for more details on the fields in the Enclave Configuration File.
In an SGX 2 platform, the fields StackMinSize, StackMaxSize, HeapMinSize, HeapMaxSize determine how much stack and heap are available to an enclave at run-time. In a Linux system, if these values exceed the total amount of EPC, then paging will occur. In SGX 1, HeapInitSize is the only relevant field for setting the amount of heap available to an enclave and StackMaxSize is the total amount of stack memory available.
Refer to Intel Software Guard Extensions Software Support for Dynamic Memory Allocation inside an Enclave for a complete description of dynamic memory management with SGX 2. The paper states:
"For SGX2, this schema of the enclave configuration has been extended to accommodate parameters relating to reserved address space for expandable/creatable components. Newly added parameters include, but are not limited to
• Min/Max heap sizes
• Min/Max stack sizes
• Min/Max number of threads"
These slides provide a good a summary of SGX 2 dynamic memory management.
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page