On Wed Apr 24, 2024 at 10:02 AM EEST, Jarkko Sakkinen wrote: > On Wed Apr 24, 2024 at 9:46 AM EEST, Bojun Zhu wrote: > > Based on the the discussion among you, Jarkko and Reinette, > > I will keep the need_resched() and wrap the logic in using sgx_resched(), > > as suggested by Jarkko. > > Sounds like a plan :-) In sgx_ioc_enclave_add_pages() "if (!c)" check might cause possibly some confusion. Reason for it is that in "transaction sense" the operation can be only meaningfully restarted when no pages have not been added as MRENCLAVE checksum cannot be reset. BR, Jarkko