diff --git a/psw/enclave_common/sgx_enclave_common.cpp b/psw/enclave_common/sgx_enclave_common.cpp index 9867ecc86..86e22b7ae 100644 --- a/psw/enclave_common/sgx_enclave_common.cpp +++ b/psw/enclave_common/sgx_enclave_common.cpp @@ -480,11 +480,11 @@ static void enclave_set_provision_access(int hdevice, void* enclave_base) if (s_driver_type == SGX_DRIVER_IN_KERNEL) { - hdev_prov = open("/dev/sgx/provision", O_RDWR); + hdev_prov = open("/dev/sgx_provision", O_RDWR); if (-1 == hdev_prov) { - //if /dev/sgx/provision is not present, try to open /dev/sgx_provision - hdev_prov = open("/dev/sgx_provision", O_RDWR); + //if /dev/sgx_provision is not present, try to open /dev/sgx/provision + hdev_prov = open("/dev/sgx/provision", O_RDWR); } if (-1 == hdev_prov) { diff --git a/psw/urts/linux/edmm_utility.cpp b/psw/urts/linux/edmm_utility.cpp index 49f2b9aa9..fc537a846 100644 --- a/psw/urts/linux/edmm_utility.cpp +++ b/psw/urts/linux/edmm_utility.cpp @@ -99,11 +99,11 @@ bool get_driver_type(int *driver_type) *driver_type = sgx_driver_type; } - int hdev = open("/dev/sgx/enclave", O_RDWR); //attempt to open the in-kernel driver + int hdev = open("/dev/sgx_enclave", O_RDWR); //attempt to open the in-kernel driver if (-1 == hdev) { - //if /dev/sgx/enclave is not present, try to open /dev/sgx_enclave - hdev = open("/dev/sgx_enclave", O_RDWR); + //if /dev/sgx_enclave is not present, try to open /dev/sgx/enclave + hdev = open("/dev/sgx/enclave", O_RDWR); } if (-1 == hdev) { @@ -154,11 +154,11 @@ extern "C" bool open_se_device(int driver_type, int *hdevice) *hdevice = -1; if (driver_type == SGX_DRIVER_IN_KERNEL) { - *hdevice = open("/dev/sgx/enclave", O_RDWR); //attempt to open the in-kernel driver - //if /dev/sgx/enclave is not present, try to open /dev/sgx_enclave + *hdevice = open("/dev/sgx_enclave", O_RDWR); //attempt to open the in-kernel driver + //if /dev/sgx_enclave is not present, try to open /dev/sgx/enclave if(-1 == *hdevice) { - *hdevice = open("/dev/sgx_enclave", O_RDWR); + *hdevice = open("/dev/sgx/enclave", O_RDWR); } } else if (driver_type == SGX_DRIVER_DCAP)