intel / linux-sgx

Intel SGX for Linux*
https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/linux-overview.html
Other
1.33k stars 544 forks source link

running in HW mode shows "0x1006" error , while SIM mode is no problem #1051

Closed HuangMinming closed 1 month ago

HuangMinming commented 1 month ago

Hi everyone, I generated a static library from mcl[https://github.com/herumi/mcl.git], and added the library to SGX project, call the api. I can successfully run the app in SIM mode, but it got error in HW mode. I can get a initialize_enclave after calling initialize_enclave(). When I call my trusted api, There was an error. The error message is showed below. How can I resolve it? Thanks.

Error code is 0x1006. Please refer to the "Intel SGX SDK Developer Reference" for more details.
jbdelcuv commented 1 month ago

Error code 0x1006 means the enclave crashed, it probably called the abort function. There are some subtle differences between SGX simulation and hardware environments. For instance, the CPUID instruction is not supported inside SGX. I'd suggest running your enclave with the debugger attached to find out what's causing this issue.

HuangMinming commented 1 month ago

Thanks for your replay. I think the lib is not support sgx.