From 89efcdb8cd95ea798187fe4062a73fa5d2fca456 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 4 Jul 2017 02:05:11 +0200 Subject: Windows Driver: correctly save and restore extended processor state when performing AVX operations on Windows 7 and later. Enhance readability of code handling save/restore of floating point state. --- src/Driver/DumpFilter.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/Driver/DumpFilter.c') diff --git a/src/Driver/DumpFilter.c b/src/Driver/DumpFilter.c index 1b57bdbf..18feca06 100644 --- a/src/Driver/DumpFilter.c +++ b/src/Driver/DumpFilter.c @@ -14,6 +14,7 @@ #include "DriveFilter.h" #include "Ntdriver.h" #include "Tests.h" +#include "cpu.h" static DriveFilterExtension *BootDriveFilterExtension = NULL; static LARGE_INTEGER DumpPartitionOffset; @@ -63,7 +64,21 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT // KeSaveFloatingPointState() may generate a bug check during crash dump #if !defined (_WIN64) if (filterExtension->DumpType == DumpTypeCrashdump) + { dumpConfig.HwEncryptionEnabled = FALSE; + // disable also SSE optimizations + HasMMX() = 0; + HasISSE() = 0; + HasSSE2() = 0; + HasSSSE3() = 0; + HasSSE41() = 0; + HasSSE42() = 0; + HasAESNI() = 0; + HasCLMUL() = 0; + HasSAVX() = 0; + HasSAVX2() = 0; + HasSBMI2() = 0; + } #endif EnableHwEncryption (dumpConfig.HwEncryptionEnabled); -- cgit v1.2.3