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 543 forks source link

Failed to open Intel SGX device. #684

Open Ruk1ng001 opened 3 years ago

Ruk1ng001 commented 3 years ago

I use these files to run:

sgx_linux_x64_driver_1.41.bin 
sgx_linux_x64_sdk_2.13.100.4.bin

but when I run sgx_linux_x64_driver_1.41.bin, I get info as follow:

Unpacking Intel SGX Driver ... done.
Verifying the integrity of the install package ... done.
Installing Intel SGX Driver ...
/tmp/sgx-driver-7w9vk8 /home/timechainer/wp/run_sgx
install -d /opt/intel/sgxdriver/package
install -d /opt/intel/sgxdriver/scripts
cp -r package/* /opt/intel/sgxdriver/package
install scripts/* /opt/intel/sgxdriver/scripts
/home/timechainer/wp/run_sgx

Creating symlink /var/lib/dkms/sgx/1.41/source ->
                 /usr/src/sgx-1.41

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

This is a error?

Finnally, I get error when I run ./app:

# ./app 
[get_driver_type /home/sgx/jenkins/linux-ubuntuServer-release-build-trunk-213/build_target/PROD/label/Builder-UbuntuSrv18/label_exp/ubuntu64/linux-trunk-opensource/psw/urts/linux/edmm_utility.cpp:111] Failed to open Intel SGX device.
Info: Please make sure SGX module is enabled in the BIOS, and install SGX driver afterwards.
Error: Invalid SGX device.
Enter a character before exit ...

How to fix this errer , I want to mount /dev/sgx, but it cant be find.

xiangquanliu commented 3 years ago

Please check if the platform supports SGX/FLC.

Ruk1ng001 commented 3 years ago

Yes, I can successfully install this driver (sgx_linux_x64_driver_2.11.0_0373e2e.bin).But get error when I install sgx_linux_x64_driver_1.41.bin

xiangquanliu commented 3 years ago

Seems not all the driver installation messages are attached. Please check if the messages includes "You may need to run /sbin/modprobe intel_sgx (--allow-unsupported) or reboot system manually!"

Ruk1ng001 commented 3 years ago

Yes, I hava this message.

xiangquanliu commented 3 years ago

So please run /sbin/modprobe intel_sgx (--allow-unsupported) manually and check if it is successful. If not, please check if the platform supports SGX/FLC.

Ruk1ng001 commented 3 years ago

When I run this :

# /sbin/modprobe intel_sgx
modprobe: ERROR: could not insert 'intel_sgx': No such device

And how to check if it is supported?

xiangquanliu commented 3 years ago

From the above message, I think it is not supported.