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

Execute sleep() inside an enclave

Shredha_K_
新手
2,345 次查看

Hi,

Is it possible to execute a sleep() inside an enclave. 

Thanks in advance

0 项奖励
1 解答
Anusha_K_Intel
2,345 次查看

Hi,

Os calls(sleep()) cannot be used directly inside the enclave. We can use an OCALL to execute them.

在原帖中查看解决方案

0 项奖励
4 回复数
Anusha_K_Intel
2,346 次查看

Hi,

Os calls(sleep()) cannot be used directly inside the enclave. We can use an OCALL to execute them.

0 项奖励
Shredha_K_
新手
2,345 次查看

Thank you Anusha :)

0 项奖励
chaoshun_z_
初学者
2,345 次查看

OCALL may not safe since the sleep action will be performed by untrusted part​, so I implemented sleep by using "sgx_get_trusted_time"

 

 

 

0 项奖励
you_w_
新分销商 III
2,345 次查看

I think If you really need this, just make an OCALL. But in this way the time sleep()ed may not be accurate.

0 项奖励
回复