VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-10 18:43:15 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-10 18:44:49 +0200
commit458bb091bb8e6ffa73a1c7c9736e93b52a0a95d7 (patch)
tree89310156a81efcddc26062f69a3f5cd523929e41 /src/Common
parentc7cd89a24a3663cb375f9d6a901d34586d0d9192 (diff)
downloadVeraCrypt-458bb091bb8e6ffa73a1c7c9736e93b52a0a95d7.tar.gz
VeraCrypt-458bb091bb8e6ffa73a1c7c9736e93b52a0a95d7.zip
Windows Driver Security: Use enhanced protection of NX pool under Windows 8 and later.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Tcdefs.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h
index 149603a2..7c8382c3 100644
--- a/src/Common/Tcdefs.h
+++ b/src/Common/Tcdefs.h
@@ -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