diff options
Diffstat (limited to 'src/Driver')
-rw-r--r-- | src/Driver/DriveFilter.c | 24 | ||||
-rw-r--r-- | src/Driver/DumpFilter.c | 13 | ||||
-rw-r--r-- | src/Driver/Ntdriver.c | 12 | ||||
-rw-r--r-- | src/Driver/Ntvol.c | 2 |
4 files changed, 0 insertions, 51 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c index 140c31d1..f549cc08 100644 --- a/src/Driver/DriveFilter.c +++ b/src/Driver/DriveFilter.c @@ -644,13 +644,11 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, Extension->Queue.MaxReadAheadOffset = BootDriveLength; /* encrypt keys */ -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { VcProtectKeys (Extension->HeaderCryptoInfo, VcGetEncryptionID (Extension->HeaderCryptoInfo)); VcProtectKeys (Extension->Queue.CryptoInfo, VcGetEncryptionID (Extension->Queue.CryptoInfo)); } -#endif status = EncryptedIoQueueStart (&Extension->Queue); if (!NT_SUCCESS (status)) @@ -722,7 +720,6 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) uint64 encryptedAreaLength = Extension->Queue.EncryptedAreaEnd + 1 - Extension->Queue.EncryptedAreaStart; uint8 *fieldPos = header + TC_HEADER_OFFSET_ENCRYPTED_AREA_LENGTH; PCRYPTO_INFO pCryptoInfo = Extension->HeaderCryptoInfo; -#ifdef _WIN64 CRYPTO_INFO tmpCI; if (IsRamEncryptionEnabled()) { @@ -730,7 +727,6 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) VcUnprotectKeys (&tmpCI, VcGetEncryptionID (pCryptoInfo)); pCryptoInfo = &tmpCI; } -#endif DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); @@ -748,12 +744,10 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) mputLong (fieldPos, headerCrc32); EncryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); -#ifdef _WIN64 if (IsRamEncryptionEnabled()) { burn (&tmpCI, sizeof (CRYPTO_INFO)); } -#endif } status = TCWriteDevice (Extension->LowerDeviceObject, header, offset, TC_BOOT_ENCRYPTION_VOLUME_HEADER_SIZE); @@ -991,9 +985,7 @@ static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilte && irpSp->Parameters.Power.Type == DevicePowerState) { DismountDrive (Extension, TRUE); -#ifdef _WIN64 ClearSecurityParameters (); -#endif } PoStartNextPowerIrp (Irp); @@ -1224,15 +1216,9 @@ typedef NTSTATUS (*HiberDriverWriteFunctionB) (PLARGE_INTEGER writeOffset, PMDL typedef struct { -#ifdef _WIN64 uint8 FieldPad1[64]; HiberDriverWriteFunctionB WriteFunctionB; uint8 FieldPad2[56]; -#else - uint8 FieldPad1[48]; - HiberDriverWriteFunctionB WriteFunctionB; - uint8 FieldPad2[32]; -#endif HiberDriverWriteFunctionA WriteFunctionA; uint8 FieldPad3[24]; LARGE_INTEGER PartitionStartOffset; @@ -1243,18 +1229,10 @@ typedef NTSTATUS (*HiberDriverEntry) (PVOID arg0, HiberDriverContext *hiberDrive typedef struct { LIST_ENTRY ModuleList; -#ifdef _WIN64 uint8 FieldPad1[32]; -#else - uint8 FieldPad1[16]; -#endif PVOID ModuleBaseAddress; HiberDriverEntry ModuleEntryAddress; -#ifdef _WIN64 uint8 FieldPad2[24]; -#else - uint8 FieldPad2[12]; -#endif UNICODE_STRING ModuleName; } ModuleTableItem; @@ -2180,10 +2158,8 @@ static VOID DecoySystemWipeThreadProc (PVOID threadArg) goto err; } -#ifdef _WIN64 if (IsRamEncryptionEnabled ()) VcProtectKeys (wipeCryptoInfo, VcGetEncryptionID (wipeCryptoInfo)); -#endif EncryptDataUnits (wipeRandBuffer, &dataUnit, wipeBlockSize / ENCRYPTION_DATA_UNIT_SIZE, wipeCryptoInfo); memcpy (wipeRandChars, wipeRandBuffer, sizeof (wipeRandChars)); diff --git a/src/Driver/DumpFilter.c b/src/Driver/DumpFilter.c index 94a130d9..f858bb7c 100644 --- a/src/Driver/DumpFilter.c +++ b/src/Driver/DumpFilter.c @@ -61,15 +61,6 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT goto err; } - // KeSaveFloatingPointState() may generate a bug check during crash dump -#if !defined (_WIN64) - if (filterExtension->DumpType == DumpTypeCrashdump) - { - dumpConfig.HwEncryptionEnabled = FALSE; - // disable also CPU extended features used in optimizations - DisableCPUExtendedFeatures (); - } -#endif EnableHwEncryption (dumpConfig.HwEncryptionEnabled); @@ -129,11 +120,7 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT WriteFilterBufferSize = ((SIZE_T)filterInitData->MaxPagesPerWrite) * PAGE_SIZE; -#ifdef _WIN64 highestAcceptableWriteBufferAddr.QuadPart = 0x7FFffffFFFFLL; -#else - highestAcceptableWriteBufferAddr.QuadPart = 0xffffFFFFLL; -#endif WriteFilterBuffer = MmAllocateContiguousMemory (WriteFilterBufferSize, highestAcceptableWriteBufferAddr); if (!WriteFilterBuffer) diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index 0edc6941..63e95d69 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -217,13 +217,6 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) WHIRLPOOL_CTX tctx; size_t count; -#ifndef _WIN64 - KFLOATING_SAVE floatingPointState; - NTSTATUS saveStatus = STATUS_INVALID_PARAMETER; - if (HasISSE()) - saveStatus = KeSaveFloatingPointState (&floatingPointState); -#endif - while (cbRandSeed) { WHIRLPOOL_init (&tctx); @@ -279,11 +272,6 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) pbRandSeed += count; } -#if !defined (_WIN64) - if (NT_SUCCESS (saveStatus)) - KeRestoreFloatingPointState (&floatingPointState); -#endif - FAST_ERASE64 (digest, sizeof (digest)); FAST_ERASE64 (&iSeed.QuadPart, 8); FAST_ERASE64 (&iSeed2.QuadPart, 8); diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 0486219e..7bd59831 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -634,10 +634,8 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, goto error; } -#ifdef _WIN64 if (IsRamEncryptionEnabled() && (volumeType == TC_VOLUME_TYPE_NORMAL || !mount->bProtectHiddenVolume)) VcProtectKeys (Extension->cryptoInfo, VcGetEncryptionID (Extension->cryptoInfo)); -#endif Dump ("Volume header decrypted\n"); Dump ("Required program version = %x\n", (int) Extension->cryptoInfo->RequiredProgramVersion); |