mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows Driver: Fix build error using Windows 10 WDK caused by name conflict for KeSaveExtendedProcessorState/KeRestoreExtendedProcessorState functions
This commit is contained in:
@@ -92,7 +92,7 @@ void hmac_sha256
|
|||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (g_isIntel && HasSAVX())
|
if (g_isIntel && HasSAVX())
|
||||||
saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState);
|
saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState);
|
||||||
#else
|
#else
|
||||||
KFLOATING_SAVE floatingPointState;
|
KFLOATING_SAVE floatingPointState;
|
||||||
if (HasSSE2())
|
if (HasSSE2())
|
||||||
@@ -143,7 +143,7 @@ void hmac_sha256
|
|||||||
#if defined (DEVICE_DRIVER)
|
#if defined (DEVICE_DRIVER)
|
||||||
if (NT_SUCCESS (saveStatus))
|
if (NT_SUCCESS (saveStatus))
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
#else
|
#else
|
||||||
KeRestoreFloatingPointState (&floatingPointState);
|
KeRestoreFloatingPointState (&floatingPointState);
|
||||||
#endif
|
#endif
|
||||||
@@ -219,7 +219,7 @@ void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32
|
|||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (g_isIntel && HasSAVX())
|
if (g_isIntel && HasSAVX())
|
||||||
saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState);
|
saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState);
|
||||||
#else
|
#else
|
||||||
KFLOATING_SAVE floatingPointState;
|
KFLOATING_SAVE floatingPointState;
|
||||||
if (HasSSE2())
|
if (HasSSE2())
|
||||||
@@ -292,7 +292,7 @@ void derive_key_sha256 (char *pwd, int pwd_len, char *salt, int salt_len, uint32
|
|||||||
#if defined (DEVICE_DRIVER)
|
#if defined (DEVICE_DRIVER)
|
||||||
if (NT_SUCCESS (saveStatus))
|
if (NT_SUCCESS (saveStatus))
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
#else
|
#else
|
||||||
KeRestoreFloatingPointState (&floatingPointState);
|
KeRestoreFloatingPointState (&floatingPointState);
|
||||||
#endif
|
#endif
|
||||||
@@ -362,7 +362,7 @@ void hmac_sha512
|
|||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (g_isIntel && HasSAVX())
|
if (g_isIntel && HasSAVX())
|
||||||
saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState);
|
saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState);
|
||||||
#else
|
#else
|
||||||
KFLOATING_SAVE floatingPointState;
|
KFLOATING_SAVE floatingPointState;
|
||||||
if (HasSSSE3() && HasMMX())
|
if (HasSSSE3() && HasMMX())
|
||||||
@@ -414,7 +414,7 @@ void hmac_sha512
|
|||||||
#if defined (DEVICE_DRIVER)
|
#if defined (DEVICE_DRIVER)
|
||||||
if (NT_SUCCESS (saveStatus))
|
if (NT_SUCCESS (saveStatus))
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
#else
|
#else
|
||||||
KeRestoreFloatingPointState (&floatingPointState);
|
KeRestoreFloatingPointState (&floatingPointState);
|
||||||
#endif
|
#endif
|
||||||
@@ -464,7 +464,7 @@ void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32
|
|||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (g_isIntel && HasSAVX())
|
if (g_isIntel && HasSAVX())
|
||||||
saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState);
|
saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState);
|
||||||
#else
|
#else
|
||||||
KFLOATING_SAVE floatingPointState;
|
KFLOATING_SAVE floatingPointState;
|
||||||
if (HasSSSE3() && HasMMX())
|
if (HasSSSE3() && HasMMX())
|
||||||
@@ -537,7 +537,7 @@ void derive_key_sha512 (char *pwd, int pwd_len, char *salt, int salt_len, uint32
|
|||||||
#if defined (DEVICE_DRIVER)
|
#if defined (DEVICE_DRIVER)
|
||||||
if (NT_SUCCESS (saveStatus))
|
if (NT_SUCCESS (saveStatus))
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
#else
|
#else
|
||||||
KeRestoreFloatingPointState (&floatingPointState);
|
KeRestoreFloatingPointState (&floatingPointState);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -310,13 +310,13 @@ typedef ULONG (NTAPI *KeQueryActiveProcessorCountExFn)(
|
|||||||
USHORT GroupNumber
|
USHORT GroupNumber
|
||||||
);
|
);
|
||||||
|
|
||||||
extern NTSTATUS NTAPI KeSaveExtendedProcessorState (
|
extern NTSTATUS NTAPI KeSaveExtendedProcessorStateVC (
|
||||||
__in ULONG64 Mask,
|
__in ULONG64 Mask,
|
||||||
PXSTATE_SAVE XStateSave
|
PXSTATE_SAVE XStateSave
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
extern VOID NTAPI KeRestoreExtendedProcessorState (
|
extern VOID NTAPI KeRestoreExtendedProcessorStateVC (
|
||||||
PXSTATE_SAVE XStateSave
|
PXSTATE_SAVE XStateSave
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1100,7 +1100,7 @@ void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
|
|||||||
{
|
{
|
||||||
#if defined (TC_WINDOWS_DRIVER)
|
#if defined (TC_WINDOWS_DRIVER)
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (NT_SUCCESS (KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState)))
|
if (NT_SUCCESS (KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState)))
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
while (blockCount >= 16)
|
while (blockCount >= 16)
|
||||||
@@ -1111,7 +1111,7 @@ void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
|
|||||||
blockCount -= 16;
|
blockCount -= 16;
|
||||||
}
|
}
|
||||||
#if defined (TC_WINDOWS_DRIVER)
|
#if defined (TC_WINDOWS_DRIVER)
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1136,7 +1136,7 @@ void camellia_decrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
|
|||||||
{
|
{
|
||||||
#if defined (TC_WINDOWS_DRIVER)
|
#if defined (TC_WINDOWS_DRIVER)
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (NT_SUCCESS (KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState)))
|
if (NT_SUCCESS (KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState)))
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
while (blockCount >= 16)
|
while (blockCount >= 16)
|
||||||
@@ -1147,7 +1147,7 @@ void camellia_decrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
|
|||||||
blockCount -= 16;
|
blockCount -= 16;
|
||||||
}
|
}
|
||||||
#if defined (TC_WINDOWS_DRIVER)
|
#if defined (TC_WINDOWS_DRIVER)
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte*
|
|||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
XSTATE_SAVE SaveState;
|
XSTATE_SAVE SaveState;
|
||||||
if (g_isIntel && HasSAVX())
|
if (g_isIntel && HasSAVX())
|
||||||
saveStatus = KeSaveExtendedProcessorState(XSTATE_MASK_GSSE, &SaveState);
|
saveStatus = KeSaveExtendedProcessorStateVC(XSTATE_MASK_GSSE, &SaveState);
|
||||||
#else
|
#else
|
||||||
KFLOATING_SAVE floatingPointState;
|
KFLOATING_SAVE floatingPointState;
|
||||||
if (HasISSE() || (HasSSSE3() && HasMMX()))
|
if (HasISSE() || (HasSSSE3() && HasMMX()))
|
||||||
@@ -405,7 +405,7 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte*
|
|||||||
|
|
||||||
if (NT_SUCCESS (saveStatus))
|
if (NT_SUCCESS (saveStatus))
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
KeRestoreExtendedProcessorState(&SaveState);
|
KeRestoreExtendedProcessorStateVC(&SaveState);
|
||||||
#else
|
#else
|
||||||
KeRestoreFloatingPointState (&floatingPointState);
|
KeRestoreFloatingPointState (&floatingPointState);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4940,7 +4940,7 @@ BOOL IsOSAtLeast (OSVersionEnum reqMinOS)
|
|||||||
>= (major << 16 | minor << 8));
|
>= (major << 16 | minor << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS NTAPI KeSaveExtendedProcessorState (
|
NTSTATUS NTAPI KeSaveExtendedProcessorStateVC (
|
||||||
__in ULONG64 Mask,
|
__in ULONG64 Mask,
|
||||||
PXSTATE_SAVE XStateSave
|
PXSTATE_SAVE XStateSave
|
||||||
)
|
)
|
||||||
@@ -4955,7 +4955,7 @@ NTSTATUS NTAPI KeSaveExtendedProcessorState (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID NTAPI KeRestoreExtendedProcessorState (
|
VOID NTAPI KeRestoreExtendedProcessorStateVC (
|
||||||
PXSTATE_SAVE XStateSave
|
PXSTATE_SAVE XStateSave
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user