Closed pbeza closed 1 year ago
It looks like this is related to the in-kernel SGX driver (a bug preventing debug enclaves from being launched?) and upgrading to Linux 6.5 may fix the issue.
At least that was the case when we encountered a similar issue so do try it out.
Thank you for the quick reply! I was about to update my post with this link claiming what you just mentioned.
I will try to upgrade the kernel on the system I'm using which is Ubuntu 22.04.3 LTS (jammy)
.
Unbelievable! Running:
sudo apt install linux-oem-22.04d
(that effectively installed Linux kernel version 6.5) and rebooting my machine worked! 🙌🏼
$ cargo new --bin hello-world
Created binary (application) `hello-world` package
$ cd hello-world/
$ cargo run --target x86_64-fortanix-unknown-sgx
Compiling hello-world v0.1.0 (/tmp/hello-world)
Finished dev [unoptimized + debuginfo] target(s) in 0.53s
Running `ftxsgx-runner-cargo target/x86_64-fortanix-unknown-sgx/debug/hello-world`
Hello, world!
sgx-detect
is fixed now too:
$ sgx-detect
Detecting SGX, this may take a minute...
✔ SGX instruction set
✔ CPU support
✔ CPU configuration
✔ Enclave attributes
✔ Enclave Page Cache
SGX features
✔ SGX2 ✔ EXINFO ✘ ENCLV ✘ OVERSUB ✔ KSS
Total EPC size: 32.0GiB (no integrity protection)
✔ Flexible launch control
✔ CPU support
? CPU configuration
✔ Able to launch production mode enclave
✔ SGX system software
✔ SGX kernel device (/dev/sgx_enclave)
✔ libsgx_enclave_common
✔ AESM service
✔ Able to launch enclaves
✔ Debug mode
✔ Production mode
✔ Production mode (Intel whitelisted)
You're all set to start running SGX programs!
Thank you @kostko!
I'm trying to run
hello-world
as described in theREADME
but I'm getting the following error:Any idea what I'm doing wrong?
Full log:
sgx-detect
output: