Add patch to move NtProtectVirtualMemory and NtCreateSection to separate pages.

This commit is contained in:
Michael Müller
2014-08-20 19:30:14 +02:00
parent 13f3004ee7
commit 5f08af6906
4 changed files with 56 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
From 9f83442a212635a7921420c56c217df0c0e46fc4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 20 Aug 2014 19:21:18 +0200
Subject: ntdll: Move NtProtectVirtualMemory and NtCreateSection to separate
pages on x86
---
dlls/ntdll/virtual.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 4819d2d..63ba0a3 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -150,6 +150,13 @@ static void *preload_reserve_end;
static BOOL use_locks;
static BOOL force_exec_prot; /* whether to force PROT_EXEC on all PROT_READ mmaps */
+#if defined(__i386__) && defined(__GNUC__)
+NTSTATUS WINAPI NtProtectVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *size_ptr,
+ ULONG new_prot, ULONG *old_prot ) __attribute__((aligned(4096)));
+NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
+ const LARGE_INTEGER *size, ULONG protect,
+ ULONG sec_flags, HANDLE file ) __attribute__((aligned(4096)));
+#endif
/***********************************************************************
* VIRTUAL_GetProtStr
--
1.9.1

View File

@@ -0,0 +1,4 @@
Author: Michael Müller
Subject: Move NtProtectVirtualMemory and NtCreateSection to separate pages in ntdll on x86.
Revision: 1
Fixes: [33162] Adobe Reader requires NtProtectVirtualMemory and NtCreateSection to be on separate pages