lsds/sgx-lkl

problem with redis

tregua87 opened this issue · 0 comments

Hi, I am trying the samples in SGX-LKL, in particular redis.

I am in an Ubuntu 18.04. I manged to succesfully run helloworld from the sample folder. Morever, I use to develop SGX appliations with the Intel SGX SDK in the same machine.

When I try the redis sample with SFX-LKL, I run make run-hw (as indicated in the readme).

Then, I received this error:

SGXLKL_TAP=sgxlkl_tap0 SGXLKL_VERBOSE=1 SGXLKL_KERNEL_VERBOSE=0 SGXLKL_TRACE_SIGNAL=0 SGXLKL_TRACE_HOST_SYSCALL=0 SGXLKL_TRACE_LKL_SYSCALL=0 SGXLKL_TRACE_MMAP=0 /home/tregua/sgx-lkl/build/sgx-lkl-run-oe --hw-debug sgxlkl-redis.img /usr/bin/redis-server --bind 10.0.1.1
[   SGX-LKL  ] nproc=8 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='sgxlkl-redis.img', mnt='/', [RW])
[   SGX-LKL  ] get_signed_libsgxlkl_path... result=/home/tregua/sgx-lkl/build_musl/./libsgxlkl.so.signed
[   SGX-LKL  ] get_libsgxlkl_user_path... result=/home/tregua/sgx-lkl/build_musl/./libsgxlkl-user.so
[   SGX-LKL  ] oe_create_enclave...
[   SGX-LKL  ] Enclave config: {"args":["/usr/bin/redis-server","--bind","10.0.1.1"],"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":["SGXLKL_TRACE_HOST_SYSCALL","SGXLKL_TRACE_LKL_SYSCALL","SGXLKL_TRACE_MMAP","SGXLKL_TRACE_SIGNAL"],"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":false,"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":[]}}
result=0 (OE_OK)
[   SGX-LKL  ] sgxlkl_enclave_init(ethread_id=0)
[[  SGX-LKL ]] wg0 has public key NMeMjxSMhf5XxtOpfbYA0+phqXIU+7Wbrr7eLeR8jGo=
[   SGX-LKL  ] FAIL: virtio_net_fd_net_tx: write failed: fd=4 ret=-1 errno=5 Input/output errorMakefile:33: recipe for target 'run-hw' failed
make: *** [run-hw] Error 1

Could it be a problem in the tap interface?

Thanks in advance.