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.32k stars 539 forks source link

Unable to start `aesm_service`: "init_enclave failed" #834

Open Time0o opened 2 years ago

Time0o commented 2 years ago

I'm trying to launch aesm_service inside a Ubuntu 20.04 docker container running on Arch with Kernel 5.16.10-arch1-1. I have installed the SGX driver on the host system via this AUR package as well the SDK and PSW as per the official intructions, I am able to run SGX application in simulation mode.

However, running

LD_LIBRARY_PATH=/opt/intel/sgx-aesm-service/aesm /opt/intel/sgx-aesm-service/aesm/aesm_service --no-daemon

produces the following output:

The path of system bundle: System Bundle
[CEnclavePool /linux-sgx/psw/urts/enclave.cpp:638] enter CEnclavePool constructor
ecdsa_quote_service_bundle_name:2.0.0
epid_quote_service_bundle_name:2.0.0
le_launch_service_bundle_name:2.0.0
linux_network_service_bundle_name:2.0.0
pce_service_bundle_name:2.0.0
quote_ex_service_bundle_name:2.0.0
system_bundle:4.0.0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 3, ptr = 55fd0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 2, ptr = 18
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 17, ptr = 4d550
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 14, ptr = 7
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 7, ptr = 4cb48
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 8, ptr = a08
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 9, ptr = 18
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffff9, ptr = 6a
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 15, ptr = 0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6, ptr = 4c9f0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = b, ptr = 18
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 5, ptr = 4ca80
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = a, ptr = 59
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffef5, ptr = 4cae0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 4, ptr = 4cb18
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 1a, ptr = 55d78
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 1c, ptr = 28
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 10, ptr = 0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 1e, ptr = a
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffffb, ptr = 8000001
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .dynstr: sh_addr = 4ca80, sh_size = 59, sh_offset = 4ba80, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .dynstr: sh_addr = 4ca80, sh_size = 59, sh_offset = 4ba80, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .gnu.hash: sh_addr = 4cae0, sh_size = 34, sh_offset = 4bae0, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .hash: sh_addr = 4cb18, sh_size = 2c, sh_offset = 4bb18, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .rela.dyn: sh_addr = 4cb48, sh_size = a08, sh_offset = 4bb48, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .dynstr: sh_addr = 4ca80, sh_size = 59, sh_offset = 4ba80, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .gnu.hash: sh_addr = 4cae0, sh_size = 34, sh_offset = 4bae0, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .hash: sh_addr = 4cb18, sh_size = 2c, sh_offset = 4bb18, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .rela.dyn: sh_addr = 4cb48, sh_size = a08, sh_offset = 4bb48, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.plt: sh_addr = 4d550, sh_size = 18, sh_offset = 4c550, sh_name = 56
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .dynstr: sh_addr = 4ca80, sh_size = 59, sh_offset = 4ba80, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .gnu.hash: sh_addr = 4cae0, sh_size = 34, sh_offset = 4bae0, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .hash: sh_addr = 4cb18, sh_size = 2c, sh_offset = 4bb18, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .rela.dyn: sh_addr = 4cb48, sh_size = a08, sh_offset = 4bb48, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.plt: sh_addr = 4d550, sh_size = 18, sh_offset = 4c550, sh_name = 56
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [12] .rodata: sh_addr = 4d580, sh_size = 11f0, sh_offset = 4c580, sh_name = 60
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [13] .niprod: sh_addr = 4e780, sh_size = 8c0, sh_offset = 4d780, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [14] .eh_frame: sh_addr = 4f040, sh_size = 4288, sh_offset = 4e040, sh_name = 70
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [15] .eh_frame_hdr: sh_addr = 532c8, sh_size = a34, sh_offset = 522c8, sh_name = 7a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [16] .data.rel.ro.local: sh_addr = 55a40, sh_size = 2e0, sh_offset = 53a40, sh_name = 88
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [17] .data.rel.ro: sh_addr = 55d20, sh_size = 58, sh_offset = 53d20, sh_name = 9b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [18] .fini_array: sh_addr = 55d78, sh_size = 28, sh_offset = 53d78, sh_name = a8
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [19] .dynamic: sh_addr = 55da0, sh_size = 1a0, sh_offset = 53da0, sh_name = b4
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [20] .got: sh_addr = 55f40, sh_size = 90, sh_offset = 53f40, sh_name = bd
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [21] .got.plt: sh_addr = 55fd0, sh_size = 20, sh_offset = 53fd0, sh_name = c2
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [22] .data: sh_addr = 56000, sh_size = 378, sh_offset = 54000, sh_name = cb
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [23] .nipd: sh_addr = 56378, sh_size = 8, sh_offset = 54378, sh_name = d1
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [24] .bss: sh_addr = 56380, sh_size = 10630, sh_offset = 54380, sh_name = d7
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [25] .note.sgxmeta: sh_addr = 0, sh_size = 501c, sh_offset = 54380, sh_name = dc
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [26] .note.gnu.gold-version: sh_addr = 0, sh_size = 1c, sh_offset = 5939c, sh_name = ea
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [27] .shstrtab: sh_addr = 0, sh_size = 101, sh_offset = 593b8, sh_name = 1
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .dynstr: sh_addr = 4ca80, sh_size = 59, sh_offset = 4ba80, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .gnu.hash: sh_addr = 4cae0, sh_size = 34, sh_offset = 4bae0, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .hash: sh_addr = 4cb18, sh_size = 2c, sh_offset = 4bb18, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .rela.dyn: sh_addr = 4cb48, sh_size = a08, sh_offset = 4bb48, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.plt: sh_addr = 4d550, sh_size = 18, sh_offset = 4c550, sh_name = 56
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [12] .rodata: sh_addr = 4d580, sh_size = 11f0, sh_offset = 4c580, sh_name = 60
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [13] .niprod: sh_addr = 4e780, sh_size = 8c0, sh_offset = 4d780, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [14] .eh_frame: sh_addr = 4f040, sh_size = 4288, sh_offset = 4e040, sh_name = 70
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [15] .eh_frame_hdr: sh_addr = 532c8, sh_size = a34, sh_offset = 522c8, sh_name = 7a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [16] .data.rel.ro.local: sh_addr = 55a40, sh_size = 2e0, sh_offset = 53a40, sh_name = 88
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [17] .data.rel.ro: sh_addr = 55d20, sh_size = 58, sh_offset = 53d20, sh_name = 9b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [18] .fini_array: sh_addr = 55d78, sh_size = 28, sh_offset = 53d78, sh_name = a8
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [19] .dynamic: sh_addr = 55da0, sh_size = 1a0, sh_offset = 53da0, sh_name = b4
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [20] .got: sh_addr = 55f40, sh_size = 90, sh_offset = 53f40, sh_name = bd
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [21] .got.plt: sh_addr = 55fd0, sh_size = 20, sh_offset = 53fd0, sh_name = c2
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [22] .data: sh_addr = 56000, sh_size = 378, sh_offset = 54000, sh_name = cb
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [23] .nipd: sh_addr = 56378, sh_size = 8, sh_offset = 54378, sh_name = d1
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [24] .bss: sh_addr = 56380, sh_size = 10630, sh_offset = 54380, sh_name = d7
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [25] .note.sgxmeta: sh_addr = 0, sh_size = 501c, sh_offset = 54380, sh_name = dc
LOAD Section: 1
Flags = 0x0000000000000005
VAddr = 0x0000000000000000
Size  = 0x000000000004B975

LOAD Section: 2
Flags = 0x0000000000000004
VAddr = 0x000000000004C975
Size  = 0x0000000000007387

LOAD Section: 3
Flags = 0x0000000000000006
VAddr = 0x0000000000055A40
Size  = 0x0000000000010F70

[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .plt: sh_addr = 270, sh_size = 20, sh_offset = 270, sh_name = 5b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .text: sh_addr = 2a0, sh_size = 4acf7, sh_offset = 2a0, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .nipx: sh_addr = 4afa0, sh_size = 9d5, sh_offset = 4afa0, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .interp: sh_addr = 4c975, sh_size = 50, sh_offset = 4b975, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .note.gnu.build-id: sh_addr = 4c9c8, sh_size = 24, sh_offset = 4b9c8, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynsym: sh_addr = 4c9f0, sh_size = 90, sh_offset = 4b9f0, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .dynstr: sh_addr = 4ca80, sh_size = 59, sh_offset = 4ba80, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .gnu.hash: sh_addr = 4cae0, sh_size = 34, sh_offset = 4bae0, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .hash: sh_addr = 4cb18, sh_size = 2c, sh_offset = 4bb18, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .rela.dyn: sh_addr = 4cb48, sh_size = a08, sh_offset = 4bb48, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.plt: sh_addr = 4d550, sh_size = 18, sh_offset = 4c550, sh_name = 56
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [12] .rodata: sh_addr = 4d580, sh_size = 11f0, sh_offset = 4c580, sh_name = 60
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [13] .niprod: sh_addr = 4e780, sh_size = 8c0, sh_offset = 4d780, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [14] .eh_frame: sh_addr = 4f040, sh_size = 4288, sh_offset = 4e040, sh_name = 70
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [15] .eh_frame_hdr: sh_addr = 532c8, sh_size = a34, sh_offset = 522c8, sh_name = 7a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [16] .data.rel.ro.local: sh_addr = 55a40, sh_size = 2e0, sh_offset = 53a40, sh_name = 88
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [17] .data.rel.ro: sh_addr = 55d20, sh_size = 58, sh_offset = 53d20, sh_name = 9b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [18] .fini_array: sh_addr = 55d78, sh_size = 28, sh_offset = 53d78, sh_name = a8
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [19] .dynamic: sh_addr = 55da0, sh_size = 1a0, sh_offset = 53da0, sh_name = b4
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [20] .got: sh_addr = 55f40, sh_size = 90, sh_offset = 53f40, sh_name = bd
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [21] .got.plt: sh_addr = 55fd0, sh_size = 20, sh_offset = 53fd0, sh_name = c2
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [22] .data: sh_addr = 56000, sh_size = 378, sh_offset = 54000, sh_name = cb
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [23] .nipd: sh_addr = 56378, sh_size = 8, sh_offset = 54378, sh_name = d1
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [24] .bss: sh_addr = 56380, sh_size = 10630, sh_offset = 54380, sh_name = d7
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [25] .note.sgxmeta: sh_addr = 0, sh_size = 501c, sh_offset = 54380, sh_name = dc
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [26] .note.gnu.gold-version: sh_addr = 0, sh_size = 1c, sh_offset = 5939c, sh_name = ea
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [27] .shstrtab: sh_addr = 0, sh_size = 101, sh_offset = 593b8, sh_name = 1
[enclave_create_ex sgx_enclave_common.cpp:599] 
 secs->attibutes.flags = 24, secs->attributes.xfrm = 7 
[build_image /linux-sgx/psw/urts/loader.cpp:670] 
    Metadata Version = 0x0000000100000004
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    1, HEAP_MIN        , Page Count =    32, Attributes = 0x01, Flags = 0x0000000000000203, RVA = 0x0000000000067000 -> RVA = 0x0000000000067000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =   10, GUARD           , Page Count =    16, Attributes = 0x00, Flags = 0x0000000000000000, RVA = 0x0000000000087000 -> RVA = 0x0000000000087000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    8, STACK_MIN       , Page Count =     3, Attributes = 0x03, Flags = 0x0000000000000203, RVA = 0x0000000000097000 -> RVA = 0x0000000000097000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =   10, GUARD           , Page Count =    16, Attributes = 0x00, Flags = 0x0000000000000000, RVA = 0x000000000009A000 -> RVA = 0x000000000009A000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    4, TCS             , Page Count =     1, Attributes = 0x03, Flags = 0x0000000000000100, RVA = 0x00000000000AA000 -> RVA = 0x00000000000AA000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    6, SSA             , Page Count =     2, Attributes = 0x03, Flags = 0x0000000000000203, RVA = 0x00000000000AB000 -> RVA = 0x00000000000AB000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =   10, GUARD           , Page Count =    16, Attributes = 0x00, Flags = 0x0000000000000000, RVA = 0x00000000000AD000 -> RVA = 0x00000000000AD000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    5, TD              , Page Count =     1, Attributes = 0x03, Flags = 0x0000000000000203, RVA = 0x00000000000BD000 -> RVA = 0x00000000000BD000
build_contexts, step = 0x0000000000000000
    Entry Id( 0) = 4105, THREAD_GROUP    , Entry Count =    7, Load Times = 0,    LStep = 0x0000000000037000
[enclave_initialize sgx_enclave_common.cpp:1222] 
SGX_IOC_ENCLAVE_INIT failed error = 2, errno = 2
[reg_sig_handler sig_handler.cpp:205] vdso_sgx_enter_enclave exists, we won't use signal handler here
[__create_enclave /linux-sgx/psw/urts/urts_com.h:343] add tcs 0x7f3b681aa000
[load_qe ../qe_logic.cpp:671] Call sgx_create_enclave for QE. /lib/x86_64-linux-gnu/libsgx_qe3.signed.so.1
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 3, ptr = 13afd8
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 7, ptr = 129208
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 8, ptr = 25f8
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 9, ptr = 18
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffff9, ptr = 194
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 15, ptr = 0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6, ptr = 129078
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = b, ptr = 18
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 5, ptr = 129108
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = a, ptr = 55
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffef5, ptr = 129160
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 4, ptr = 129198
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 1a, ptr = 13ab48
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 1c, ptr = 30
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 10, ptr = 0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 1e, ptr = a
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffffb, ptr = 1
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffff0, ptr = 1291c4
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffffc, ptr = 1291d0
[parse_dyn /linux-sgx/psw/urts/parser/elfparser.cpp:176] dynamic tag = 6ffffffd, ptr = 2
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .text: sh_addr = 280, sh_size = 1274e2, sh_offset = 280, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .nipx: sh_addr = 127770, sh_size = de7, sh_offset = 127770, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .interp: sh_addr = 129000, sh_size = 50, sh_offset = 129000, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .note.gnu.build-id: sh_addr = 129050, sh_size = 24, sh_offset = 129050, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .dynsym: sh_addr = 129078, sh_size = 90, sh_offset = 129078, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .text: sh_addr = 280, sh_size = 1274e2, sh_offset = 280, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .nipx: sh_addr = 127770, sh_size = de7, sh_offset = 127770, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .interp: sh_addr = 129000, sh_size = 50, sh_offset = 129000, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .note.gnu.build-id: sh_addr = 129050, sh_size = 24, sh_offset = 129050, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .dynsym: sh_addr = 129078, sh_size = 90, sh_offset = 129078, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynstr: sh_addr = 129108, sh_size = 55, sh_offset = 129108, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .text: sh_addr = 280, sh_size = 1274e2, sh_offset = 280, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .nipx: sh_addr = 127770, sh_size = de7, sh_offset = 127770, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .interp: sh_addr = 129000, sh_size = 50, sh_offset = 129000, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .note.gnu.build-id: sh_addr = 129050, sh_size = 24, sh_offset = 129050, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .dynsym: sh_addr = 129078, sh_size = 90, sh_offset = 129078, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynstr: sh_addr = 129108, sh_size = 55, sh_offset = 129108, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .gnu.hash: sh_addr = 129160, sh_size = 34, sh_offset = 129160, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .hash: sh_addr = 129198, sh_size = 2c, sh_offset = 129198, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .gnu.version: sh_addr = 1291c4, sh_size = c, sh_offset = 1291c4, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .gnu.version_d: sh_addr = 1291d0, sh_size = 38, sh_offset = 1291d0, sh_name = 59
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.dyn: sh_addr = 129208, sh_size = 25f8, sh_offset = 129208, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .text: sh_addr = 280, sh_size = 1274e2, sh_offset = 280, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .nipx: sh_addr = 127770, sh_size = de7, sh_offset = 127770, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .interp: sh_addr = 129000, sh_size = 50, sh_offset = 129000, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .note.gnu.build-id: sh_addr = 129050, sh_size = 24, sh_offset = 129050, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .dynsym: sh_addr = 129078, sh_size = 90, sh_offset = 129078, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynstr: sh_addr = 129108, sh_size = 55, sh_offset = 129108, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .gnu.hash: sh_addr = 129160, sh_size = 34, sh_offset = 129160, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .hash: sh_addr = 129198, sh_size = 2c, sh_offset = 129198, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .gnu.version: sh_addr = 1291c4, sh_size = c, sh_offset = 1291c4, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .gnu.version_d: sh_addr = 1291d0, sh_size = 38, sh_offset = 1291d0, sh_name = 59
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.dyn: sh_addr = 129208, sh_size = 25f8, sh_offset = 129208, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [12] .rodata: sh_addr = 12b800, sh_size = 25e8, sh_offset = 12b800, sh_name = 72
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [13] .niprod: sh_addr = 12de00, sh_size = 900, sh_offset = 12de00, sh_name = 7a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [14] .eh_frame: sh_addr = 12e700, sh_size = 8fb8, sh_offset = 12e700, sh_name = 82
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [15] .eh_frame_hdr: sh_addr = 1376b8, sh_size = 14bc, sh_offset = 1376b8, sh_name = 8c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [16] .data.rel.ro.local: sh_addr = 13a7e0, sh_size = 300, sh_offset = 1397e0, sh_name = 9a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [17] .data.rel.ro: sh_addr = 13aae0, sh_size = 68, sh_offset = 139ae0, sh_name = ad
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [18] .fini_array: sh_addr = 13ab48, sh_size = 30, sh_offset = 139b48, sh_name = ba
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [19] .dynamic: sh_addr = 13ab78, sh_size = 1a0, sh_offset = 139b78, sh_name = c6
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [20] .got: sh_addr = 13ad18, sh_size = 2c0, sh_offset = 139d18, sh_name = cf
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [21] .got.plt: sh_addr = 13afd8, sh_size = 18, sh_offset = 139fd8, sh_name = d4
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [22] .data: sh_addr = 13b000, sh_size = 3878, sh_offset = 13a000, sh_name = dd
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [23] .nipd: sh_addr = 13e878, sh_size = 8, sh_offset = 13d878, sh_name = e3
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [24] .bss: sh_addr = 13e880, sh_size = 620, sh_offset = 13d880, sh_name = e9
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [25] .note.sgxmeta: sh_addr = 0, sh_size = 501c, sh_offset = 13d880, sh_name = ee
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [26] .note.gnu.gold-version: sh_addr = 0, sh_size = 1c, sh_offset = 14289c, sh_name = fc
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [27] .shstrtab: sh_addr = 0, sh_size = 113, sh_offset = 1428b8, sh_name = 1
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .text: sh_addr = 280, sh_size = 1274e2, sh_offset = 280, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .nipx: sh_addr = 127770, sh_size = de7, sh_offset = 127770, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .interp: sh_addr = 129000, sh_size = 50, sh_offset = 129000, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .note.gnu.build-id: sh_addr = 129050, sh_size = 24, sh_offset = 129050, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .dynsym: sh_addr = 129078, sh_size = 90, sh_offset = 129078, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynstr: sh_addr = 129108, sh_size = 55, sh_offset = 129108, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .gnu.hash: sh_addr = 129160, sh_size = 34, sh_offset = 129160, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .hash: sh_addr = 129198, sh_size = 2c, sh_offset = 129198, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .gnu.version: sh_addr = 1291c4, sh_size = c, sh_offset = 1291c4, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .gnu.version_d: sh_addr = 1291d0, sh_size = 38, sh_offset = 1291d0, sh_name = 59
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.dyn: sh_addr = 129208, sh_size = 25f8, sh_offset = 129208, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [12] .rodata: sh_addr = 12b800, sh_size = 25e8, sh_offset = 12b800, sh_name = 72
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [13] .niprod: sh_addr = 12de00, sh_size = 900, sh_offset = 12de00, sh_name = 7a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [14] .eh_frame: sh_addr = 12e700, sh_size = 8fb8, sh_offset = 12e700, sh_name = 82
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [15] .eh_frame_hdr: sh_addr = 1376b8, sh_size = 14bc, sh_offset = 1376b8, sh_name = 8c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [16] .data.rel.ro.local: sh_addr = 13a7e0, sh_size = 300, sh_offset = 1397e0, sh_name = 9a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [17] .data.rel.ro: sh_addr = 13aae0, sh_size = 68, sh_offset = 139ae0, sh_name = ad
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [18] .fini_array: sh_addr = 13ab48, sh_size = 30, sh_offset = 139b48, sh_name = ba
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [19] .dynamic: sh_addr = 13ab78, sh_size = 1a0, sh_offset = 139b78, sh_name = c6
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [20] .got: sh_addr = 13ad18, sh_size = 2c0, sh_offset = 139d18, sh_name = cf
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [21] .got.plt: sh_addr = 13afd8, sh_size = 18, sh_offset = 139fd8, sh_name = d4
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [22] .data: sh_addr = 13b000, sh_size = 3878, sh_offset = 13a000, sh_name = dd
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [23] .nipd: sh_addr = 13e878, sh_size = 8, sh_offset = 13d878, sh_name = e3
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [24] .bss: sh_addr = 13e880, sh_size = 620, sh_offset = 13d880, sh_name = e9
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [25] .note.sgxmeta: sh_addr = 0, sh_size = 501c, sh_offset = 13d880, sh_name = ee
LOAD Section: 1
Flags = 0x0000000000000005
VAddr = 0x0000000000000000
Size  = 0x0000000000128557

LOAD Section: 2
Flags = 0x0000000000000004
VAddr = 0x0000000000129000
Size  = 0x000000000000FB74

LOAD Section: 3
Flags = 0x0000000000000006
VAddr = 0x000000000013A7E0
Size  = 0x00000000000046C0

[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [0] : sh_addr = 0, sh_size = 0, sh_offset = 0, sh_name = 0
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [1] .text: sh_addr = 280, sh_size = 1274e2, sh_offset = 280, sh_name = b
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [2] .nipx: sh_addr = 127770, sh_size = de7, sh_offset = 127770, sh_name = 11
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [3] .interp: sh_addr = 129000, sh_size = 50, sh_offset = 129000, sh_name = 17
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [4] .note.gnu.build-id: sh_addr = 129050, sh_size = 24, sh_offset = 129050, sh_name = 1f
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [5] .dynsym: sh_addr = 129078, sh_size = 90, sh_offset = 129078, sh_name = 32
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [6] .dynstr: sh_addr = 129108, sh_size = 55, sh_offset = 129108, sh_name = 3a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [7] .gnu.hash: sh_addr = 129160, sh_size = 34, sh_offset = 129160, sh_name = 42
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [8] .hash: sh_addr = 129198, sh_size = 2c, sh_offset = 129198, sh_name = 46
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [9] .gnu.version: sh_addr = 1291c4, sh_size = c, sh_offset = 1291c4, sh_name = 4c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [10] .gnu.version_d: sh_addr = 1291d0, sh_size = 38, sh_offset = 1291d0, sh_name = 59
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [11] .rela.dyn: sh_addr = 129208, sh_size = 25f8, sh_offset = 129208, sh_name = 68
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [12] .rodata: sh_addr = 12b800, sh_size = 25e8, sh_offset = 12b800, sh_name = 72
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [13] .niprod: sh_addr = 12de00, sh_size = 900, sh_offset = 12de00, sh_name = 7a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [14] .eh_frame: sh_addr = 12e700, sh_size = 8fb8, sh_offset = 12e700, sh_name = 82
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [15] .eh_frame_hdr: sh_addr = 1376b8, sh_size = 14bc, sh_offset = 1376b8, sh_name = 8c
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [16] .data.rel.ro.local: sh_addr = 13a7e0, sh_size = 300, sh_offset = 1397e0, sh_name = 9a
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [17] .data.rel.ro: sh_addr = 13aae0, sh_size = 68, sh_offset = 139ae0, sh_name = ad
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [18] .fini_array: sh_addr = 13ab48, sh_size = 30, sh_offset = 139b48, sh_name = ba
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [19] .dynamic: sh_addr = 13ab78, sh_size = 1a0, sh_offset = 139b78, sh_name = c6
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [20] .got: sh_addr = 13ad18, sh_size = 2c0, sh_offset = 139d18, sh_name = cf
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [21] .got.plt: sh_addr = 13afd8, sh_size = 18, sh_offset = 139fd8, sh_name = d4
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [22] .data: sh_addr = 13b000, sh_size = 3878, sh_offset = 13a000, sh_name = dd
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [23] .nipd: sh_addr = 13e878, sh_size = 8, sh_offset = 13d878, sh_name = e3
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [24] .bss: sh_addr = 13e880, sh_size = 620, sh_offset = 13d880, sh_name = e9
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [25] .note.sgxmeta: sh_addr = 0, sh_size = 501c, sh_offset = 13d880, sh_name = ee
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [26] .note.gnu.gold-version: sh_addr = 0, sh_size = 1c, sh_offset = 14289c, sh_name = fc
[get_section /linux-sgx/psw/urts/parser/elfparser.cpp:82] section [27] .shstrtab: sh_addr = 0, sh_size = 113, sh_offset = 1428b8, sh_name = 1
[enclave_create_ex sgx_enclave_common.cpp:599] 
 secs->attibutes.flags = 14, secs->attributes.xfrm = 7 
[build_image /linux-sgx/psw/urts/loader.cpp:670] 
    Metadata Version = 0x0000000100000004
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    1, HEAP_MIN        , Page Count =     1, Attributes = 0x01, Flags = 0x0000000000000203, RVA = 0x000000000013F000 -> RVA = 0x000000000013F000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    2, HEAP_INIT       , Page Count =    35, Attributes = 0x11, Flags = 0x0000000000000203, RVA = 0x0000000000140000 -> RVA = 0x0000000000140000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =   10, GUARD           , Page Count =    16, Attributes = 0x00, Flags = 0x0000000000000000, RVA = 0x0000000000163000 -> RVA = 0x0000000000163000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    8, STACK_MIN       , Page Count =    68, Attributes = 0x03, Flags = 0x0000000000000203, RVA = 0x0000000000173000 -> RVA = 0x0000000000173000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =   10, GUARD           , Page Count =    16, Attributes = 0x00, Flags = 0x0000000000000000, RVA = 0x00000000001B7000 -> RVA = 0x00000000001B7000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    4, TCS             , Page Count =     1, Attributes = 0x03, Flags = 0x0000000000000100, RVA = 0x00000000001C7000 -> RVA = 0x00000000001C7000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    6, SSA             , Page Count =     2, Attributes = 0x03, Flags = 0x0000000000000203, RVA = 0x00000000001C8000 -> RVA = 0x00000000001C8000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =   10, GUARD           , Page Count =    16, Attributes = 0x00, Flags = 0x0000000000000000, RVA = 0x00000000001CA000 -> RVA = 0x00000000001CA000
build_contexts, step = 0x0000000000000000
    build_context
    Entry Id     =    5, TD              , Page Count =     1, Attributes = 0x03, Flags = 0x0000000000000203, RVA = 0x00000000001DA000 -> RVA = 0x00000000001DA000
build_contexts, step = 0x0000000000000000
    Entry Id( 0) = 4105, THREAD_GROUP    , Entry Count =    7, Load Times = 0,    LStep = 0x0000000000078000
[build_image /linux-sgx/psw/urts/loader.cpp:684] init_enclave failed
aesm_service: /linux-sgx/psw/ae/aesm_service/source/bundles/le_launch_service_bundle/LEClass.cpp:102: int CLEClass::white_list_register(const uint8_t*, uint32_t, bool): Assertion `m_enclave_id' failed.
./aesm.sh: line 3:   965 Aborted                 (core dumped) LD_LIBRARY_PATH=/opt/intel/sgx-aesm-service/aesm /opt/intel/sgx-aesm-service/aesm/aesm_service --no-daemon

I assume the crux is the rather nondescriptive init_enclave failed error. What could be the reason for this?

llly commented 2 years ago

Arch with Kernel 5.16.10-arch1-1 is expected to already contains SGX driver within kernel. You don't need to install linux-sgx-driver.