Community
cancel
Showing results for 
Search instead for 
Did you mean: 
you_w_
New Contributor III
101 Views

Use MKL in Enclave

How can I use MKL in Enclave? 

/usr/bin/ld: /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64/libmkl_core.a(mkl_msg_support.o): undefined reference to symbol 'fflush@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libc.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
makefile:203: recipe for target 'enclave.so' failed
make: *** [enclave.so] Error 

While  trying to use MKL functions in enclave I meet this error, what can I do, to make it works.

0 Kudos
2 Replies
101 Views

You can not use untrusted library calls inside enclave. The untrusted library functions can only be called from application code - outside the enclave. Linking  the enclave with any untrusted library  either fail the enclave signing process or cause a runtime failure due to the use of restricted instructions. 

You can refer to below document for more information on trusted/untrsusted libraries and  linking application with the untrusted libraries.

https://download.01.org/intel-sgx/linux-1.8/docs/Intel_SGX_SDK_Developer_Reference_Linux_1.8_Open_So...

Regards

Shivananda

 

you_w_
New Contributor III
101 Views

Thanks Shivananda

I think if I can static link the untrusted library function into enclave successfully, I can used it. I my case, I want to use the MKL library function in enclave because one of the parameter is defined as secret and should not be bring out from enclave. Now I use an ecall get the parameter and destroy it immediately。

Regards

youwanlong

Reply