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

Trying to use EDMM (EACCEPT fails)

DrAlex
Beginner
1,063 Views

If enclave_alloc succeeds with a virtual address in-enclave, what reasons would running EACCEPT on the address fail afterwards? I get an error message when I run eaccept on a virtual address which has been previously alloced via enclave_alloc.

The return code I get matches: SGX_PAGE_ATTRIBUTES_MISMATCH, how do i fix this?

I see that someone has the psuedo code for it here: https://github.com/Mic92/x86_64-linux-cheatsheats/blob/master/pages/ENCLU%5BEACCEPT%5D

How do I know what the correct EPCM page attributes are?


It seems like enclave_alloc (provided in the SGX SDK) by default sets EPC page permission to READ + WRITE. Why is running EACCEPT returning SGX_PAGE_ATTRIBUTES_MISMATCH?

0 Kudos
3 Replies
KFPW_Intel
Moderator
1,043 Views

Hi DrAlex,

 

Thank you for your interest in Intel® SGX.

 

SGX_PAGE_ATTRIBUTES_MISMATCH error happens may due to the attributes of the target EPC page do not match the expected values.

 

We would like to understand your use cases, are you trying to modify an EPC page and observed the SGX_PAGE_ATTRIBUTES_MISMATCH error?

 

We noticed you have created similar thread in our linux-sgx repo. Do you wish to continue the conversation in that thread? Thank you.

 

Additionally, the psuedo code repo link that you provided is not Intel owned repo. I would recommend to check with the repo owner for more information that may assist you on your use cases.

 

Regards,

Ken


0 Kudos
KFPW_Intel
Moderator
1,019 Views

Hi DrAlex,

 

There is an active discussion in your GitHub posting. Is this branch https://github.com/mingweishih/openenclave/blob/b07dc610c34b4cd3bc050d3b5427177273974a4d/enclave/core/sgx/edmm.c#L166 may help you on your use cases?

 

Please inform us if you have any question regards to this issue.

Thank you.

 

Regards,

Ken

 

0 Kudos
KFPW_Intel
Moderator
924 Views

Hi DrAlex,


We have not heard from you in several days so we will no longer monitor this thread. We hope you were able to resolve your issue. Please start a new thread if you need further help.


Regards,

Ken


0 Kudos
Reply