Added patch to support AT_ROUND_TO_PAGE flag in NtMapViewOfSection.

This commit is contained in:
Sebastian Lackner
2015-06-05 07:47:14 +02:00
parent 4d919d4d83
commit 0af6df6bc0
8 changed files with 510 additions and 83 deletions

View File

@@ -1,4 +1,4 @@
From 8ae00b9ad7636141e206f76ca685286311e44aca Mon Sep 17 00:00:00 2001
From 10503470d7495f2cd04287742e773aa9a87569f6 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 16 Oct 2014 23:26:35 +0200
Subject: kernel32/tests: Add tests for NtQuerySection. (try 2)
@@ -8,15 +8,17 @@ Subject: kernel32/tests: Add tests for NtQuerySection. (try 2)
1 file changed, 258 insertions(+)
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index 1c70eca..fcfb254 100644
index d10d85d..ba49193 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -47,10 +47,28 @@ static struct _TEB * (WINAPI *pNtCurrentTeb)(void);
static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTION_HANDLER);
@@ -48,12 +48,30 @@ static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTI
static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID);
static BOOL (WINAPI *pGetProcessDEPPolicy)(HANDLE, LPDWORD, PBOOL);
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
+static NTSTATUS (WINAPI *pNtQuerySection)(HANDLE, int, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI *pNtProtectVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG, ULONG *);
static NTSTATUS (WINAPI *pNtAllocateVirtualMemory)(HANDLE, PVOID *, ULONG, SIZE_T *, ULONG, ULONG);
static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG);
/* ############################### */
@@ -40,7 +42,7 @@ index 1c70eca..fcfb254 100644
static HANDLE create_target_process(const char *arg)
{
char **argv;
@@ -3447,6 +3465,244 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
@@ -3631,6 +3649,244 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
CloseHandle(mapping);
}
@@ -285,15 +287,15 @@ index 1c70eca..fcfb254 100644
START_TEST(virtual)
{
int argc;
@@ -3499,6 +3755,7 @@ START_TEST(virtual)
@@ -3684,6 +3940,7 @@ START_TEST(virtual)
pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" );
pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlAddVectoredExceptionHandler" );
pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlRemoveVectoredExceptionHandler" );
+ pNtQuerySection = (void *)GetProcAddress( hntdll, "NtQuerySection" );
pNtProtectVirtualMemory = (void *)GetProcAddress( hntdll, "NtProtectVirtualMemory" );
test_shared_memory(FALSE);
@@ -3506,6 +3763,7 @@ START_TEST(virtual)
pNtAllocateVirtualMemory = (void *)GetProcAddress( hntdll, "NtAllocateVirtualMemory" );
pNtFreeVirtualMemory = (void *)GetProcAddress( hntdll, "NtFreeVirtualMemory" );
@@ -3693,6 +3950,7 @@ START_TEST(virtual)
test_shared_memory_ro(FALSE, FILE_MAP_COPY);
test_shared_memory_ro(FALSE, FILE_MAP_COPY|FILE_MAP_WRITE);
test_mapping();
@@ -302,5 +304,5 @@ index 1c70eca..fcfb254 100644
test_VirtualAlloc_protection();
test_VirtualProtect();
--
2.3.5
2.4.2

View File

@@ -1 +1,2 @@
Fixes: [37338] Support for NtQuerySection
Depends: ntdll-AT_ROUND_TO_PAGE