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

Enclave.config.xml

littleQ
Beginner
1,604 Views

Hello! Recently, I used WAMR. I changed Enclave.config.xml,and got some error.

First, the original Enclave.config.xml is as follows:

<!-- Please refer to User's Guide for the explanation of each field -->
<EnclaveConfiguration>
  <ProdID>0</ProdID>
  <ISVSVN>0</ISVSVN>
  <StackMaxSize>0x100000</StackMaxSize>
  <HeapMaxSize>0x8000000</HeapMaxSize>
  <ReservedMemMaxSize>0x1000000</ReservedMemMaxSize>
  <ReservedMemExecutable>1</ReservedMemExecutable>
  <TCSNum>10</TCSNum>
  <TCSPolicy>1</TCSPolicy>
  <DisableDebug>0</DisableDebug>
  <MiscSelect>0</MiscSelect>
  <MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>

I tried these behavious:

  1. I didn't modify the Enclave.config.xml, and used command make SGX_PRERELEASE=1 SGX_DEBUG=0 SGX_MODE=HW. The result is no error.
  2. I only modified MiscSelect option to 1, and used command make SGX_PRERELEASE=1 SGX_DEBUG=0 SGX_MODE=HW. The result is as follows:
Failed to create enclave from enclave.signed.so, error code: 1
Fail to initialize enclave.

The sgxsdk I used is the version of 2.19. I run the Cxx11SGXDemo in the linux-sgx. I only modified MiscSelect option to 1, and used command make SGX_PRERELEASE=1 SGX_DEBUG=0 SGX_MODE=HW. The result is no error.
Does it mean that WAMR doesn't support SGX2?

0 Kudos
5 Replies
Wan_Intel
Moderator
1,574 Views

Hello LittleQ,

Thanks for reaching out to us.

May I know what Operating System and Kernel version are you using on your machine?

You may check with uname -r command and lsb_release -a command.



Regards,

Wan


0 Kudos
littleQ
Beginner
1,562 Views

My kernel version is: 6.1.31-060131-generic.

Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

0 Kudos
Wan_Intel
Moderator
1,519 Views

Hello LittleQ,

Thanks for your information.

Let me check with relevant team and I'll update you at the earliest.



Regards,

Wan


0 Kudos
Wan_Intel
Moderator
1,447 Views

Hello LittleQ,

Thanks for your patience.

We've received feedback from the relevant team.


Could you please try the following steps and see if the issue can be resolved?

  • Run the following command in your terminal

cpuid | grep SGX2

  • Build the kernel that allows EDMM with the following GitHub page:

https://github.com/intel/sgx-emm



Regards,

Wan


0 Kudos
Wan_Intel
Moderator
1,361 Views

Hello LittleQ,

Thanks for your question.

If you need additional information from Intel, please submit a new question as this thread will no longer be monitored.



Regards,

Wan


0 Kudos
Reply