-
Notifications
You must be signed in to change notification settings - Fork 180
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] Correctly set masks in SIGSTRUCT
Previously, SIGSTRUCT.ATTRIBUTEMASK (which contains the masks for enclave attributes such as DEBUG and for XFRM/XCR0 bits) and SIGSTRUCT.MISCMASK (which contains the mask for Extended SSA frame features) were incorrectly set to mirror SIGSTRUCT.ATTRIBUTES and SIGSTRUCT.MISCSELECT. This commit replaces this incorrect logic with hard-coded values for SIGSTRUCT.ATTRIBUTEMASK and SIGSTRUCT.MISCMASK. In particular, all bits in the masks are set to one (meaning "EINIT checks each attribute"). The only exceptions currently are not-security-critical AVX and AVX512 bits -- they are not reflected in the mask, and they are set in SIGSTRUCT.ATTRIBUTES if the system supports them during generation of the `.token` file. Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
- Loading branch information
Showing
4 changed files
with
75 additions
and
15 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