Intel® Software Guard Extensions (Intel® SGX)
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.

SGX Threads

Sam5
New Contributor I
302 Views

Hi,
What are the thread synchronization mechanisms support in SGX? Why we need to  specify the number of supported threads in the SGX project properties? 

-Thanks

0 Kudos
1 Solution
Surenthar_S_Intel
302 Views

Hi Sam,

#1. sgx_threads, provide thread synchronization mechanisms like Mutex, Event and Condition variables inside an enclave.

#2. The enclave is signed at build time, which means that EPC memory pages (including thread contexts - stack, TLS, etc.) that will be allocated to the enclave have to be measured. This means, we need to specify the maximum number of threads that can run inside the enclave simultaneously. If several threads may run inside the enclave and access shared data, you'll have to synchronize them to avoid data race conditions.

-Surenthar 

View solution in original post

2 Replies
Surenthar_S_Intel
303 Views

Hi Sam,

#1. sgx_threads, provide thread synchronization mechanisms like Mutex, Event and Condition variables inside an enclave.

#2. The enclave is signed at build time, which means that EPC memory pages (including thread contexts - stack, TLS, etc.) that will be allocated to the enclave have to be measured. This means, we need to specify the maximum number of threads that can run inside the enclave simultaneously. If several threads may run inside the enclave and access shared data, you'll have to synchronize them to avoid data race conditions.

-Surenthar 

Sam5
New Contributor I
302 Views

Thanks for your information. 

So, We can use multi threading in SGX application.

Reply