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

Commit

Permalink
[Pal/Linux-SGX] tools: Support upstreamed driver in is_sgx_available
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Kowalczyk <[email protected]>
  • Loading branch information
mkow committed Jun 12, 2021
1 parent f9ed396 commit 0b9eafb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ 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");
return file_exists("/dev/isgx") // LKM version
|| file_exists("/dev/sgx") // old in-kernel patchset (<= 5.10) or DCAP drivers
|| file_exists("/dev/sgx_enclave"); // upstreamed drivers (>= 5.11)
}

bool psw_installed() {
Expand Down

0 comments on commit 0b9eafb

Please sign in to comment.