From 8e6416b9ee45f378456c9ffe6b8a808dafa0664a Mon Sep 17 00:00:00 2001 From: Scott Raynor Date: Mon, 7 Jun 2021 10:43:25 -0400 Subject: [PATCH] Corrected check for in-kernel driver. Signed-off-by: Scott Raynor --- .../Linux-SGX/tools/is-sgx-available/is_sgx_available.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pal/src/host/Linux-SGX/tools/is-sgx-available/is_sgx_available.cpp b/Pal/src/host/Linux-SGX/tools/is-sgx-available/is_sgx_available.cpp index adc348bbc0..104305c918 100644 --- a/Pal/src/host/Linux-SGX/tools/is-sgx-available/is_sgx_available.cpp +++ b/Pal/src/host/Linux-SGX/tools/is-sgx-available/is_sgx_available.cpp @@ -165,8 +165,8 @@ class SgxCpuChecker { }; bool sgx_driver_loaded() { - // /dev/isgx is for LKM version, /dev/sgx is for in-kernel support. - return file_exists("/dev/isgx") || file_exists("/dev/sgx"); + // /dev/isgx is for LKM version, /dev/sgx_enclave and /dev/sgx_provision are for in-kernel support. + return file_exists("/dev/isgx") || (file_exists("/dev/sgx_enclave") && file_exists("/dev/sgx_provision")); } bool psw_installed() {