1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows Driver Security: Use enhanced protection of NX pool under Windows 8 and later.

This commit is contained in:
Mounir IDRASSI
2017-06-10 18:43:15 +02:00
parent c7cd89a24a
commit 458bb091bb
4 changed files with 22 additions and 4 deletions

View File

@@ -235,7 +235,15 @@ void ThrowFatalException(int line);
#include <ntddk.h> /* Standard header file for nt drivers */
#include <ntdddisk.h> /* Standard I/O control codes */
#define TCalloc(size) ((void *) ExAllocatePoolWithTag( NonPagedPool, size, 'MMCV' ))
/* defines needed for using enhanced protection of NX pool under Windows 8 and later */
#define NonPagedPoolNx 512
#define MdlMappingNoExecute 0x40000000
/* variables used in the implementation of enhanced protection of NX pool under Windows 8 and later */
extern POOL_TYPE ExDefaultNonPagedPoolType;
extern ULONG ExDefaultMdlProtection;
#define TCalloc(size) ((void *) ExAllocatePoolWithTag( ExDefaultNonPagedPoolType, size, 'MMCV' ))
#define TCfree(memblock) ExFreePoolWithTag( memblock, 'MMCV' )
#define DEVICE_DRIVER