-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PAL/Linux-SGX] Add
sgx.insecure__allow_memfaults_without_exinfo
op…
…tion Commits "[PAL/Linux-SGX] Disallow memfault handling with no faulting address reported" and "[PAL/Linux-SGX] Cross-verify SW signals vs HW exceptions" hardened Gramine's exception handling in the SGX PAL. In particular, memory faults (#PF and #GP) became allowed only when the SGX EXINFO feature is available on the CPU and is enabled in the manifest (via `sgx.use_exinfo`). Otherwise Gramine immediately terminated the SGX enclave. However, some applications (Java runtimes in particular) rely on exception handling of memory faults, even if the related MADDR (faulting address) and ERRCD (error code) have dummy zero values. The two mentioned commits effectively forbade such applications from running on older CPUs that don't have EXINFO. This is unfortunate because frequently, the development/testing machines have old SGX CPUs. To work around the problem of old CPUs, this commit introduces the `sgx.insecure__allow_memfaults_without_exinfo` manifest option, that restores the previous (insecure) Gramine behavior. This is only a temporary solution; it will be removed in the near future. Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
- Loading branch information
Dmitrii Kuvaiskii
committed
Feb 12, 2024
1 parent
748514a
commit c06a4ae
Showing
4 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters