Fix CET - remove writing to shadow stack#103171
Merged
mangod9 merged 1 commit intodotnet:mainfrom Jun 8, 2024
Merged
Conversation
Member
Author
|
The reason why I have not detected that when testing my previous change locally was that I was testing it on machine with non-english Windows. I haven't realized the coreclr test results parsing scripts crash when parsing output on windows that are not running with english locale and so only the results of the tests that were not combined into the large test units are shown. And none of those tests was hitting the problem. |
mangod9
approved these changes
Jun 7, 2024
In my recent fix for failures with CET enabled, I have also added a call to the _wrssq intrinsic to push an address to shadow stack. It turns out that instruction is privileged and cannot be used by user code. Moreover, I have realized that it is not needed at all there, so I am removing it.
dda965c to
e98caa1
Compare
Member
|
I was wondering if the instruction must be privileged, but figured “if tests pass, it might be not” :) |
Member
|
The docs are somewhat arcane on what instructions are allowed and when. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In my recent fix for failures with CET enabled, I have also added a call to the
_wrssqintrinsic to push an address to shadow stack. It turns out that instruction is privileged and cannot be used by user code. Moreover, I have realized that it is not needed at all there, so I am removing it.