From 39ecbe0ed850fa6d6d4f0ebe1917bca1e154e82d Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Sat, 8 Jun 2024 07:52:29 +0200 Subject: [PATCH] Fix CET - remove writing to shadow stack (#103171) 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. Co-authored-by: Jan Vorlicek --- src/coreclr/vm/exceptionhandling.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index b7e02a436de96..c7cc10a94de74 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -7865,7 +7865,6 @@ extern "C" void * QCALLTYPE CallCatchFunclet(QCall::ObjectHandleOnStack exceptio if (targetSSP != 0) { targetSSP -= sizeof(size_t); - _wrssq(pvRegDisplay->pCurrentContext->Rip, (void*)targetSSP); } #endif // HOST_WINDOWS #elif defined(HOST_X86)