sys: on Windows 8+ make Write buffer read-only

This commit is contained in:
Bill Zissimopoulos
2016-04-20 16:01:35 -07:00
parent f30a3ed7f3
commit 57793f9b9a
7 changed files with 40 additions and 9 deletions

View File

@ -165,14 +165,17 @@ NTSTATUS DriverEntry(
static VOID FspDriverMultiVersionInitialize(VOID)
{
UNICODE_STRING Name;
if (RtlIsNtDdiVersionAvailable(NTDDI_WIN7))
{
UNICODE_STRING Name;
RtlInitUnicodeString(&Name, L"CcCoherencyFlushAndPurgeCache");
FspMvCcCoherencyFlushAndPurgeCache =
(FSP_MV_CcCoherencyFlushAndPurgeCache *)(UINT_PTR)MmGetSystemRoutineAddress(&Name);
}
if (RtlIsNtDdiVersionAvailable(NTDDI_WIN8))
FspMvMdlMappingNoWrite = MdlMappingNoWrite;
}
#if defined(FSP_UNLOAD)
@ -201,3 +204,4 @@ FAST_IO_DISPATCH FspFastIoDispatch;
CACHE_MANAGER_CALLBACKS FspCacheManagerCallbacks;
FSP_MV_CcCoherencyFlushAndPurgeCache *FspMvCcCoherencyFlushAndPurgeCache;
ULONG FspMvMdlMappingNoWrite = 0;