Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Commit b52bd10

Browse files
committed
[Pal/Linux-SGX] tools: Support upstreamed driver in is_sgx_available
Signed-off-by: Michał Kowalczyk <[email protected]>
1 parent 0cd4d10 commit b52bd10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Pal/src/host/Linux-SGX/tools/is-sgx-available/is_sgx_available.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ class SgxCpuChecker {
165165
};
166166

167167
bool sgx_driver_loaded() {
168-
// /dev/isgx is for LKM version, /dev/sgx is for in-kernel support.
169-
return file_exists("/dev/isgx") || file_exists("/dev/sgx");
168+
return file_exists("/dev/isgx") // LKM version
169+
|| file_exists("/dev/sgx") // old in-kernel patchset (<= 5.10) or DCAP drivers
170+
|| file_exists("/dev/sgx_enclave"); // upstreamed drivers (>= 5.11)
170171
}
171172

172173
bool psw_installed() {

0 commit comments

Comments
 (0)