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

Error code 16385 when creating an enclave

edigley_f_
Beginner
2,122 Views

When running the example in SampleCode/LocalAttestation as suggested in https://github.com/01org/linux-sgx I came across with the following error:

root@aca6aa8f028f:/tmp/LocalAttestation# ./app

Load Enclave Failure
Avaliable Enclaves
Enclave1 - EnclaveID 0
Enclave2 - EnclaveID 0
Enclave3 - EnclaveID 0Enclave1_test_create_session Ecall failed: Error code is 2002

Hit a key....

When inspecting the code in SampleCode/LocalAttestation/App/App.cpp, the following line is returning the code 16385 as error code.

sgx_create_enclave(ENCLAVE1_PATH, SGX_DEBUG_FLAG, &launch_token, &launch_token_updated, &e1_enclave_id, NULL );

What does this code mean? I've installed everything (sgx-drive/PSW/SDK) without problem.

PS: Is there any documentation where I can found all the error codes when dealing with SGX Application deployment?

0 Kudos
1 Solution
Surenthar_S_Intel
2,122 Views

Hi Edigley,

error 16385 is 0x4001 in hex, which corresponds to SGX_ERROR_SERVICE_UNAVAILABLE. This suggests that the platform services are not running on their Linux system. From the SDK documentation:

SGX_ERROR_SERVICE_UNAVAILABLE : sgx_create_enclave() needs the AE service to get a launch token. If the service is not available, the enclave may not be launched.

There is documentation for the Linux SDK here: https://01.org/intel-software-guard-extensions/documentation/intel-sgx-sdk-developer-reference

Thanks and Regards,

Surenthar Selvaraj

View solution in original post

0 Kudos
3 Replies
Francisco_C_Intel
2,122 Views

The documentation is hosted on the 01.org page. On https://github.com/01org/linux-sgx , there is a "Documentation" section that contains a link to https://01.org/intel-softwareguard-extensions. On that site, you can find the developer reference ( https://01.org/sites/default/files/documentation/intel_sgx_sdk_developer_reference_for_linux_os_pdf.pdf ) under the "Documentation" tab.

Looking at the error codes, 0x4001, means "AE service did not respond or the requested service is not supported.".  I would check that the AE service is indeed running and the driver is loaded.

0 Kudos
Surenthar_S_Intel
2,123 Views

Hi Edigley,

error 16385 is 0x4001 in hex, which corresponds to SGX_ERROR_SERVICE_UNAVAILABLE. This suggests that the platform services are not running on their Linux system. From the SDK documentation:

SGX_ERROR_SERVICE_UNAVAILABLE : sgx_create_enclave() needs the AE service to get a launch token. If the service is not available, the enclave may not be launched.

There is documentation for the Linux SDK here: https://01.org/intel-software-guard-extensions/documentation/intel-sgx-sdk-developer-reference

Thanks and Regards,

Surenthar Selvaraj

0 Kudos
George_M_1
Beginner
2,122 Views

I have the same error the run  in Simulation mode works well but in hardware mode i have the same error.
How you fixed that error?

0 Kudos
Reply