sgx-lkl icon indicating copy to clipboard operation
sgx-lkl copied to clipboard

helloworld sample case failed in SGX1

Open DrVoyager opened this issue 4 years ago • 0 comments

Hi,

While running the helloworld sample case, I got error message "FAIL: Could not initialise enclave". My machine can only support SGX1. I use the following command to install open enclave: sudo ansible-playbook scripts/ansible/oe-contributors-setup-sgx1.yml.

I suspect it could be related. Below is the execution output. Could you help to take a look? Thank you!

Joe


joe@joe-Latitude-E5470:~/Development/sgx-lkl/sgx-lkl/samples/basic/helloworld$ make run-hw SGXLKL_VERBOSE=1 SGXLKL_KERNEL_VERBOSE=1 /home/joe/Development/sgx-lkl/sgx-lkl/build/sgx-lkl-run-oe --hw-debug --enclave-config enclave_config.json sgx-lkl-rootfs.img helloworld [ SGX-LKL ] nproc=4 ETHREADS=1 CMDLINE="mem=32M" [ SGX-LKL ] HW TLS support: econf->fsgsbase=1 [ SGX-LKL ] WARN: WRFSBASE instruction raises SIGILL and will be emulated within the enclave. Run sgx-lkl-run-oe -t for information about how to fix this performance issue. [ SGX-LKL ] Registering disk 0 (path='sgx-lkl-rootfs.img', mnt='/', [RW]) [ SGX-LKL ] No tap device specified, networking will not be available. [ SGX-LKL ] get_signed_libsgxlkl_path... result=/home/joe/Development/sgx-lkl/sgx-lkl/build_musl/./libsgxlkl.so.signed [ SGX-LKL ] get_libsgxlkl_user_path... result=/home/joe/Development/sgx-lkl/sgx-lkl/build_musl/./libsgxlkl-user.so [ SGX-LKL ] oe_create_enclave... [ SGX-LKL ] Enclave config: {"args":["helloworld"],"clock_res":[{"resolution":"0000000000000001"},{"resolution":"0000000000000001"},{"resolution":"0000000000000000"},{"resolution":"0000000000000000"},{"resolution":"0000000000000001"},{"resolution":"00000000003d0900"},{"resolution":"00000000003d0900"},{"resolution":"0000000000000001"}],"cwd":"/","env":[],"esleep":"16000","espins":"500","ethreads":"1","exit_status":"full","format_version":"1","fsgsbase":true,"host_import_env":[],"hostname":"lkl","hostnet":false,"image_sizes":{"num_heap_pages":"262144","num_stack_pages":"1024"},"io":{"block":true,"console":true,"network":true},"kernel_cmd":"mem=32M","kernel_verbose":true,"max_user_threads":"256","mmap_files":"shared","mode":"hw_debug","mounts":[],"net_gw4":"10.0.1.254","net_ip4":"10.0.1.1","net_mask4":"24","oe_heap_pagecount":"8192","root":{"key":"","key_id":null,"overlay":false,"readonly":false,"roothash":null,"roothash_offset":"0"},"stacksize":"524288","swiotlb":true,"sysctl":null,"tap_mtu":"0","verbose":true,"wg":{"ip":"10.0.2.1","key":null,"listen_port":"56002","peers":[]}} 2021-02-03T04:37:29.000000Z [(H)ERROR] tid(0x7f5d6eda6300) | enclave_initialize failed (err=0x1001) (oe_result_t=OE_PLATFORM_ERROR) [/home/joe/Development/sgx-lkl/sgx-lkl/openenclave/host/sgx/sgxload.c:oe_sgx_initialize_enclave:753] 2021-02-03T04:37:29.000000Z [(H)ERROR] tid(0x7f5d6eda6300) | :OE_PLATFORM_ERROR [/home/joe/Development/sgx-lkl/sgx-lkl/openenclave/host/sgx/create.c:oe_sgx_build_enclave:935] 2021-02-03T04:37:29.000000Z [(H)ERROR] tid(0x7f5d6eda6300) | :OE_PLATFORM_ERROR [/home/joe/Development/sgx-lkl/sgx-lkl/openenclave/host/sgx/create.c:oe_create_enclave:1055] result=21 (OE_PLATFORM_ERROR) [ SGX-LKL ] FAIL: Could not initialise enclave Makefile:29: recipe for target 'run-hw' failed make: *** [run-hw] Error 1

DrVoyager avatar Feb 03 '21 04:02 DrVoyager