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

[Pal/Linux-SGX] tools: Support upstreamed driver in is_sgx_available #2438

Merged
merged 1 commit into from
Jun 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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