diff options
author | Koundinya Veluri <kouvel@users.noreply.github.com> | 2021-04-28 01:48:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-28 01:48:24 +0300 |
commit | c37257f0a073fed898ed12ce14b6a3ec39d991f2 (patch) | |
tree | 1beec67a8ecca4dff7a82898a88dccf038b41f47 /src/coreclr/pal | |
parent | cb4802635aefaf3963a994b668e77467c512bdeb (diff) |
Add an implementation of `RestoreContext` for Windows/amd64 for use with shadow stacks (#51887)
* Add an implementation of `RestoreContext` for Windows/amd64 for use with shadow stacks
- Added `ClrRestoreNonvolatileContext` to Windows/amd64 similar to the PAL's `RtlRestoreContext` but allowing for example continuing from exception in managed code when shadow stacks are enabled
- Updated to use the new implementation for cases that don't need the volatile register state restored. The two remaining cases that still use `RtlRestoreContext` would have to be changed later to use a different mechanism.
- For other targets, forwarded `ClrRestoreNonvolatileContext` to `RtlRestoreContext` for now
Diffstat (limited to 'src/coreclr/pal')
-rw-r--r-- | src/coreclr/pal/src/arch/amd64/asmconstants.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/coreclr/pal/src/arch/amd64/asmconstants.h b/src/coreclr/pal/src/arch/amd64/asmconstants.h index 1a057225bcc..c23fb7043c7 100644 --- a/src/coreclr/pal/src/arch/amd64/asmconstants.h +++ b/src/coreclr/pal/src/arch/amd64/asmconstants.h @@ -3,6 +3,8 @@ #ifdef HOST_64BIT +// The arch bit is normally set in the flag constants below. Since this is already arch-specific code and the arch bit is not +// relevant, the arch bit is excluded from the flag constants below for simpler tests. #define CONTEXT_AMD64 0x100000 #define CONTEXT_CONTROL 1 // SegSs, Rsp, SegCs, Rip, and EFlags |