Skip to content

Got error "Please use the correct uRTS library from PSW package." when SGX_MODE=HW  #47

@you-n-g

Description

@you-n-g

Error Info

Got error "Please use the correct uRTS library from PSW package." when SGX_MODE=HW
Here is my output when trying to run the SampleEnclave with SGX_MODE=HW

[15:05:08]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin/sgxsdk/SampleCode/SampleEnclave# make SGX_MODE=HW SGX_DEBUG=1
GEN => App/Enclave_u.c
CC <= App/Enclave_u.c
CXX <= App/App.cpp
CXX <= App/Edger8rSyntax/Arrays.cpp
CXX <= App/Edger8rSyntax/Functions.cpp
CXX <= App/Edger8rSyntax/Pointers.cpp
CXX <= App/Edger8rSyntax/Types.cpp
CXX <= App/TrustedLibrary/Libc.cpp
CXX <= App/TrustedLibrary/Libcxx.cpp
CXX <= App/TrustedLibrary/Thread.cpp
LINK => app
GEN => Enclave/Enclave_t.c
CC <= Enclave/Enclave_t.c
CXX <= Enclave/Enclave.cpp
CXX <= Enclave/Edger8rSyntax/Arrays.cpp
CXX <= Enclave/Edger8rSyntax/Functions.cpp
CXX <= Enclave/Edger8rSyntax/Pointers.cpp
CXX <= Enclave/Edger8rSyntax/Types.cpp
CXX <= Enclave/TrustedLibrary/Libc.cpp
CXX <= Enclave/TrustedLibrary/Libcxx.cpp
CXX <= Enclave/TrustedLibrary/Thread.cpp
LINK => enclave.so
<EnclaveConfiguration>
  <ProdID>0</ProdID>
  <ISVSVN>0</ISVSVN>
  <StackMaxSize>0x40000</StackMaxSize>
  <HeapMaxSize>0x100000</HeapMaxSize>
  <TCSNum>10</TCSNum>
  <TCSPolicy>1</TCSPolicy>
  <DisableDebug>0</DisableDebug>
  <MiscSelect>0</MiscSelect>
  <MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>
Parsing key file is OK.
[build_secs /home/young/repos/linux-sgx/psw/urts/loader.cpp:385] enclave start address = (nil), size = 800000
RSAVerify() returns success. The signature_verified is 1
Succeed.
SIGN => enclave.signed.so
[15:05:14]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin/sgxsdk/SampleCode/SampleEnclave# ./app
Please use the correct uRTS library from PSW package.
Error: Unexpected error occurred.
Enter a character before exit ...

About my Installation

I have successfully installed the sgx driver with this tutorial and loaded it by following https://github.com/01org/linux-sgx-driver

[14:21:18]root@young-Inspiron-13-7359:/home/young/repos/SGX-hardware# lsmod | grep sgx
isgx                   53248  1

I have successfully installed The SGX SDK and SGX PSW by following https://github.com/01org/linux-sgx-driver

[15:08:50]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin# sudo service aesmd restart
aesmd stop/waiting
aesmd start/running, process 4546
[15:09:10]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin# ps aux | grep 4546
aesmd     4546  0.0  0.1 280716 10452 ?        Ssl  15:09   0:00 /opt/intel/sgxpsw/aesm/aesm_service
root      4555  0.0  0.0  15944  2540 pts/33   S+   15:09   0:00 grep --color=auto 4546
[15:09:18]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin#

About my hardware

I'm using dell laptop Inspiron i7359-6790SLV

I'm sure that SGX is available for my CPU and enabled in BIOS by running this script https://github.com/ayeks/SGX-hardware/blob/master/test-sgx.c
Here is my result

eax: 406e3 ebx: 1100800 ecx: 7ffafbbf edx: bfebfbff
stepping 3
model 14
family 6
processor type 0
extended model 4
extended family 0
smx: 0

Extended feature bits (EAX=07H, ECX=0H)
eax: 0 ebx: 29c67af ecx: 0 edx: 0
sgx available: 1

CPUID Leaf 12H, Sub-Leaf 0 of Intel SGX Capabilities (EAX=12H,ECX=0)
eax: 1 ebx: 0 ecx: 0 edx: 241f
sgx 1 supported: 1
sgx 2 supported: 0
MaxEnclaveSize_Not64: 1f
MaxEnclaveSize_64: 24

CPUID Leaf 12H, Sub-Leaf 1 of Intel SGX Capabilities (EAX=12H,ECX=1)
eax: 36 ebx: 0 ecx: 1f edx: 0

CPUID Leaf 12H, Sub-Leaf 2 of Intel SGX Capabilities (EAX=12H,ECX=2)
eax: 80200001 ebx: 0 ecx: 5d80001 edx: 0

CPUID Leaf 12H, Sub-Leaf 3 of Intel SGX Capabilities (EAX=12H,ECX=3)
eax: 0 ebx: 0 ecx: 0 edx: 0

CPUID Leaf 12H, Sub-Leaf 4 of Intel SGX Capabilities (EAX=12H,ECX=4)
eax: 0 ebx: 0 ecx: 0 edx: 0

CPUID Leaf 12H, Sub-Leaf 5 of Intel SGX Capabilities (EAX=12H,ECX=5)
eax: 0 ebx: 0 ecx: 0 edx: 0

CPUID Leaf 12H, Sub-Leaf 6 of Intel SGX Capabilities (EAX=12H,ECX=6)
eax: 0 ebx: 0 ecx: 0 edx: 0

CPUID Leaf 12H, Sub-Leaf 7 of Intel SGX Capabilities (EAX=12H,ECX=7)
eax: 0 ebx: 0 ecx: 0 edx: 0

CPUID Leaf 12H, Sub-Leaf 8 of Intel SGX Capabilities (EAX=12H,ECX=8)
eax: 0 ebx: 0 ecx: 0 edx: 0

CPUID Leaf 12H, Sub-Leaf 9 of Intel SGX Capabilities (EAX=12H,ECX=9)
eax: 0 ebx: 0 ecx: 0 edx: 0

About my OS

[15:16:58]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin/sgxsdk/SampleCode/SampleEnclave# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty
[15:20:53]root@young-Inspiron-13-7359:/home/young/repos/linux-sgx/linux/installer/bin/sgxsdk/SampleCode/SampleEnclave# uname -r
4.2.0-41-generic

Any comments will be appreciated.
Thanks!!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions