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 @@ -643,15 +643,13 @@ static NTSTATUS MountDrive (DriveFilterExtension *Extension, Password *password, else 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)) TC_BUG_CHECK (status); @@ -721,17 +719,15 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) uint32 headerCrc32; 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()) { memcpy (&tmpCI, pCryptoInfo, sizeof (CRYPTO_INFO)); VcUnprotectKeys (&tmpCI, VcGetEncryptionID (pCryptoInfo)); pCryptoInfo = &tmpCI; } -#endif DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo); if (GetHeaderField32 (header, TC_HEADER_OFFSET_MAGIC) != 0x56455241) @@ -747,14 +743,12 @@ static NTSTATUS SaveDriveVolumeHeader (DriveFilterExtension *Extension) fieldPos = header + TC_HEADER_OFFSET_HEADER_CRC; 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); if (!NT_SUCCESS (status)) @@ -990,11 +984,9 @@ static NTSTATUS DispatchPower (PDEVICE_OBJECT DeviceObject, PIRP Irp, DriveFilte && irpSp->MinorFunction == IRP_MN_SET_POWER && irpSp->Parameters.Power.Type == DevicePowerState) { DismountDrive (Extension, TRUE); -#ifdef _WIN64 ClearSecurityParameters (); -#endif } PoStartNextPowerIrp (Irp); @@ -1223,17 +1215,11 @@ typedef NTSTATUS (*HiberDriverWriteFunctionA) (ULONG arg0, PLARGE_INTEGER writeO typedef NTSTATUS (*HiberDriverWriteFunctionB) (PLARGE_INTEGER writeOffset, PMDL dataMdl); 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; } HiberDriverContext; @@ -1242,20 +1228,12 @@ 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; @@ -2179,12 +2157,10 @@ static VOID DecoySystemWipeThreadProc (PVOID threadArg) DecoySystemWipeResult = STATUS_INVALID_PARAMETER; 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 @@ -60,17 +60,8 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT status = STATUS_CRC_ERROR; 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); if (!AutoTestAlgorithms()) @@ -128,13 +119,9 @@ 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 @@ -216,15 +216,8 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) uint8 digest[WHIRLPOOL_DIGESTSIZE]; 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); // we hash current content of digest buffer which is uninitialized the first time @@ -278,13 +271,8 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) cbRandSeed -= count; 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); burn (&tctx, sizeof(tctx)); 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 @@ -633,12 +633,10 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject, ntStatus = STATUS_SUCCESS; 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); Dump ("Legacy volume = %d\n", (int) Extension->cryptoInfo->LegacyVolume); |