-
Notifications
You must be signed in to change notification settings - Fork 557
Description
I'm making some modifications to my version of linux-sgx sdk-2.22. I have a page that needs to be toggled between rwx and r.
The process I'm following is:
RO enclave page
emodpe -> using do_emodpe
access the page
emodpr-> using emodpr ocall
eaccept-> using my assembly
When doing emodpe, something seems to be not working properly, as once I do the emodpe and try to access the page, there is a fault and the execution goes to the vdso_urts_handler and the enclave crashes.
For context, these are the flags that I use:
For emodpe->secinfo_RWX.flags = SI_FLAG_R|SI_FLAG_W|SI_FLAG_X|SI_FLAG_REG; (I've also tried with a PENDING flag added to this)
For eaccept->secinfo_R_PR.flags = SI_FLAG_R|SI_FLAG_REG|SI_FLAG_PR;
For emodpr->secinfo_R.flags = SI_FLAG_R|SI_FLAG_REG;
All the flags are aligned to 64b, and the address itself is aligned to a page. Everything is zero'd out at initialization.
What can I possibly be doing wrong? Let me know if I need to give more information.