mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against d2789ef0678619d7c56a9e0c1aaa06f582a41ee3.
This commit is contained in:
parent
9c995c8d8e
commit
09808df495
@ -1,4 +1,4 @@
|
||||
From 72dcf52735e6306fa67f25f49fd78da24d7d89cb Mon Sep 17 00:00:00 2001
|
||||
From ebca5e5a6d9e498ca1f7c0f823e40c25be547500 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Thu, 10 Nov 2022 18:40:18 -0600
|
||||
Subject: [PATCH] ntdll: Handle NULL process handle in MapViewOfFile3().
|
||||
@ -10,10 +10,10 @@ Based on a patch by Nikolay Sivov.
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c
|
||||
index c01fe817972..ee12f6abb91 100644
|
||||
index 4188eebf181..19381e00b31 100644
|
||||
--- a/dlls/kernelbase/memory.c
|
||||
+++ b/dlls/kernelbase/memory.c
|
||||
@@ -255,6 +255,8 @@ LPVOID WINAPI DECLSPEC_HOTPATCH MapViewOfFile3( HANDLE handle, HANDLE process, P
|
||||
@@ -265,6 +265,8 @@ LPVOID WINAPI DECLSPEC_HOTPATCH MapViewOfFile3( HANDLE handle, HANDLE process, P
|
||||
LARGE_INTEGER off;
|
||||
void *addr;
|
||||
|
||||
@ -23,10 +23,10 @@ index c01fe817972..ee12f6abb91 100644
|
||||
off.QuadPart = offset;
|
||||
if (!set_ntstatus( NtMapViewOfSectionEx( handle, process, &addr, &off, &size, alloc_type, protection,
|
||||
diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c
|
||||
index 0dccb35bd27..486efabaf70 100644
|
||||
index ffa462f579f..559ba484d60 100644
|
||||
--- a/dlls/ntdll/tests/virtual.c
|
||||
+++ b/dlls/ntdll/tests/virtual.c
|
||||
@@ -1060,6 +1060,13 @@ static void test_NtMapViewOfSection(void)
|
||||
@@ -1131,6 +1131,13 @@ static void test_NtMapViewOfSection(void)
|
||||
process = create_target_process("sleep");
|
||||
ok(process != NULL, "Can't start process\n");
|
||||
|
||||
@ -40,7 +40,7 @@ index 0dccb35bd27..486efabaf70 100644
|
||||
ptr = NULL;
|
||||
size = 0;
|
||||
offset.QuadPart = 0;
|
||||
@@ -1303,6 +1310,12 @@ static void test_NtMapViewOfSectionEx(void)
|
||||
@@ -1404,6 +1411,12 @@ static void test_NtMapViewOfSectionEx(void)
|
||||
process = create_target_process("sleep");
|
||||
ok(process != NULL, "Can't start process\n");
|
||||
|
||||
@ -51,8 +51,8 @@ index 0dccb35bd27..486efabaf70 100644
|
||||
+ ok(status == STATUS_INVALID_HANDLE, "Unexpected status %08lx\n", status);
|
||||
+
|
||||
ptr = NULL;
|
||||
size = 0;
|
||||
size = 0x1000;
|
||||
offset.QuadPart = 0;
|
||||
--
|
||||
2.38.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 326a1a51a7fa3869a13522cf52a7b4c575aebc81 Mon Sep 17 00:00:00 2001
|
||||
From 81be823356cc1752e878a0c26529d8a579d96a54 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Thu, 10 Nov 2022 18:48:14 -0600
|
||||
Subject: [PATCH] ntdll: Pass allocation type to map_view().
|
||||
@ -9,10 +9,10 @@ Based on a patch by Nikolay Sivov.
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 55d453c2504..69c8977250a 100644
|
||||
index 418ad19d990..71cf44bec39 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -1990,8 +1990,9 @@ static NTSTATUS map_fixed_area( void *base, size_t size, unsigned int vprot )
|
||||
@@ -2012,8 +2012,9 @@ static NTSTATUS map_fixed_area( void *base, size_t size, unsigned int vprot )
|
||||
* virtual_mutex must be held by caller.
|
||||
*/
|
||||
static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
@ -23,7 +23,7 @@ index 55d453c2504..69c8977250a 100644
|
||||
void *ptr;
|
||||
NTSTATUS status;
|
||||
|
||||
@@ -2208,7 +2209,7 @@ static NTSTATUS allocate_dos_memory( struct file_view **view, unsigned int vprot
|
||||
@@ -2230,7 +2231,7 @@ static NTSTATUS allocate_dos_memory( struct file_view **view, unsigned int vprot
|
||||
if (mmap_is_in_reserved_area( low_64k, dosmem_size - 0x10000 ) != 1)
|
||||
{
|
||||
addr = anon_mmap_tryfixed( low_64k, dosmem_size - 0x10000, unix_prot, 0 );
|
||||
@ -32,15 +32,15 @@ index 55d453c2504..69c8977250a 100644
|
||||
}
|
||||
|
||||
/* now try to allocate the low 64K too */
|
||||
@@ -3220,7 +3221,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, ULONG_PTR zero_bits, SI
|
||||
@@ -3371,7 +3372,7 @@ NTSTATUS virtual_alloc_thread_stack( INITIAL_TEB *stack, ULONG_PTR limit, SIZE_T
|
||||
|
||||
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
|
||||
- if ((status = map_view( &view, NULL, size, FALSE, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED,
|
||||
+ if ((status = map_view( &view, NULL, size, 0, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED,
|
||||
get_zero_bits_mask( zero_bits ), 0 )) != STATUS_SUCCESS)
|
||||
goto done;
|
||||
- status = map_view( &view, NULL, size, FALSE, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED, limit, 0 );
|
||||
+ status = map_view( &view, NULL, size, 0, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED, limit, 0 );
|
||||
if (status != STATUS_SUCCESS) goto done;
|
||||
|
||||
#ifdef VALGRIND_STACK_REGISTER
|
||||
--
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From dda1364400c5fea03e6d34c035f1d7b34649158e Mon Sep 17 00:00:00 2001
|
||||
From ed0aa7cbd5dcaad27598466c273ed4fb96c71a60 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Thu, 10 Nov 2022 18:53:10 -0600
|
||||
Subject: [PATCH] ntdll: Support MEM_RESERVE_PLACEHOLDER in
|
||||
@ -10,10 +10,10 @@ Based on a patch by Nikolay Sivov.
|
||||
1 file changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index c8e0f15eef4..dd146126361 100644
|
||||
index 71cf44bec39..d0f1a1d37b1 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -4072,8 +4072,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
@@ -4045,8 +4045,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
|
||||
/* Compute the alloc type flags */
|
||||
|
||||
@ -23,7 +23,7 @@ index c8e0f15eef4..dd146126361 100644
|
||||
{
|
||||
WARN("called with wrong alloc type flags (%08x) !\n", (int)type);
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
@@ -4081,6 +4080,12 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
@@ -4054,6 +4053,12 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
|
||||
if (!arm64ec_map && (attributes & MEM_EXTENDED_PARAMETER_EC_CODE)) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
@ -36,7 +36,7 @@ index c8e0f15eef4..dd146126361 100644
|
||||
/* Reserve the memory */
|
||||
|
||||
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
@@ -4091,6 +4096,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
@@ -4064,6 +4069,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
{
|
||||
if (type & MEM_COMMIT) vprot |= VPROT_COMMITTED;
|
||||
if (type & MEM_WRITE_WATCH) vprot |= VPROT_WRITEWATCH;
|
||||
@ -44,7 +44,7 @@ index c8e0f15eef4..dd146126361 100644
|
||||
if (protect & PAGE_NOCACHE) vprot |= SEC_NOCACHE;
|
||||
|
||||
if (vprot & VPROT_WRITECOPY) status = STATUS_INVALID_PAGE_PROTECTION;
|
||||
@@ -4110,6 +4116,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
@@ -4083,6 +4089,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
{
|
||||
if (!(view = find_view( base, size ))) status = STATUS_NOT_MAPPED_VIEW;
|
||||
else if (view->protect & SEC_FILE) status = STATUS_ALREADY_COMMITTED;
|
||||
@ -52,7 +52,7 @@ index c8e0f15eef4..dd146126361 100644
|
||||
else if (!(status = set_protection( view, base, size, protect )) && (view->protect & SEC_RESERVE))
|
||||
{
|
||||
SERVER_START_REQ( add_mapping_committed_range )
|
||||
@@ -4145,6 +4152,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
@@ -4118,6 +4125,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
|
||||
NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR zero_bits,
|
||||
SIZE_T *size_ptr, ULONG type, ULONG protect )
|
||||
{
|
||||
@ -60,7 +60,7 @@ index c8e0f15eef4..dd146126361 100644
|
||||
ULONG_PTR limit;
|
||||
|
||||
TRACE("%p %p %08lx %x %08x\n", process, *ret, *size_ptr, (int)type, (int)protect );
|
||||
@@ -4156,6 +4164,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
|
||||
@@ -4129,6 +4137,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
|
||||
if (!is_old_wow64() && zero_bits >= 32) return STATUS_INVALID_PARAMETER_3;
|
||||
#endif
|
||||
|
||||
@ -73,7 +73,7 @@ index c8e0f15eef4..dd146126361 100644
|
||||
if (process != NtCurrentProcess())
|
||||
{
|
||||
apc_call_t call;
|
||||
@@ -4198,6 +4212,8 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
|
||||
@@ -4231,6 +4245,8 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
|
||||
ULONG protect, MEM_EXTENDED_PARAMETER *parameters,
|
||||
ULONG count )
|
||||
{
|
||||
@ -82,9 +82,9 @@ index c8e0f15eef4..dd146126361 100644
|
||||
ULONG_PTR limit = 0;
|
||||
ULONG_PTR align = 0;
|
||||
ULONG attributes = 0;
|
||||
@@ -4209,6 +4225,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
|
||||
|
||||
if (count && !parameters) return STATUS_INVALID_PARAMETER;
|
||||
@@ -4239,6 +4255,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
|
||||
TRACE( "%p %p %08lx %x %08x %p %u\n",
|
||||
process, *ret, *size_ptr, (int)type, (int)protect, parameters, (int)count );
|
||||
|
||||
+ if (type & ~type_mask)
|
||||
+ {
|
||||
@ -92,9 +92,9 @@ index c8e0f15eef4..dd146126361 100644
|
||||
+ return STATUS_INVALID_PARAMETER;
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
switch (parameters[i].Type)
|
||||
status = get_extended_params( parameters, count, &limit, &align, &attributes );
|
||||
if (status) return status;
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f44017255bb3f5858d3393ed29ad6415ec307896 Mon Sep 17 00:00:00 2001
|
||||
From 96519657b5925777d613f6a6c0e93bc4d85897b9 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Thu, 10 Nov 2022 19:01:50 -0600
|
||||
Subject: [PATCH] ntdll: Support MEM_REPLACE_PLACEHOLDER in
|
||||
@ -6,23 +6,22 @@ Subject: [PATCH] ntdll: Support MEM_REPLACE_PLACEHOLDER in
|
||||
|
||||
Based on a patch by Nikolay Sivov.
|
||||
---
|
||||
dlls/ntdll/unix/virtual.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
dlls/ntdll/unix/virtual.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 4d8dd54554c..60203bd4380 100644
|
||||
index a36d2c47269..7f57b436b55 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -2719,7 +2719,8 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
|
||||
@@ -2857,7 +2857,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
|
||||
|
||||
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
|
||||
- res = map_view( &view, base, size, alloc_type & MEM_TOP_DOWN, vprot, get_zero_bits_mask( zero_bits ), 0 );
|
||||
+ res = map_view( &view, base, size, alloc_type & (MEM_TOP_DOWN | MEM_REPLACE_PLACEHOLDER),
|
||||
+ vprot, get_zero_bits_mask( zero_bits ), 0 );
|
||||
- res = map_view( &view, base, size, alloc_type & MEM_TOP_DOWN, vprot, limit, 0 );
|
||||
+ res = map_view( &view, base, size, alloc_type & (MEM_TOP_DOWN | MEM_REPLACE_PLACEHOLDER), vprot, limit, 0 );
|
||||
if (res) goto done;
|
||||
|
||||
TRACE( "handle=%p size=%lx offset=%s\n", handle, size, wine_dbgstr_longlong(offset.QuadPart) );
|
||||
--
|
||||
2.38.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3106c711fd02bdbdcac1361a389a651494d2f3b3 Mon Sep 17 00:00:00 2001
|
||||
From 41d2b081fcdf72704cfc9a7a0e0f53215074346c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Fri, 11 Nov 2022 12:41:31 -0600
|
||||
Subject: [PATCH] ntdll: Factor out unmap_view_of_section() function.
|
||||
@ -8,11 +8,11 @@ Subject: [PATCH] ntdll: Factor out unmap_view_of_section() function.
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 226c99c5512..d96facb6aa3 100644
|
||||
index ed6d9be8b6f..320596c740e 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -5009,11 +5009,7 @@ NTSTATUS WINAPI NtMapViewOfSectionEx( HANDLE handle, HANDLE process, PVOID *addr
|
||||
return NtMapViewOfSection( handle, process, addr_ptr, 0, 0, offset_ptr, size_ptr, ViewShare, alloc_type, protect );
|
||||
@@ -5208,11 +5208,7 @@ NTSTATUS WINAPI NtMapViewOfSectionEx( HANDLE handle, HANDLE process, PVOID *addr
|
||||
return virtual_map_section( handle, addr_ptr, limit, 0, offset_ptr, size_ptr, alloc_type, protect );
|
||||
}
|
||||
|
||||
-/***********************************************************************
|
||||
@ -24,7 +24,7 @@ index 226c99c5512..d96facb6aa3 100644
|
||||
{
|
||||
struct file_view *view;
|
||||
unsigned int status = STATUS_NOT_MAPPED_VIEW;
|
||||
@@ -5070,6 +5066,15 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
@@ -5269,6 +5265,15 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index 226c99c5512..d96facb6aa3 100644
|
||||
/***********************************************************************
|
||||
* NtUnmapViewOfSectionEx (NTDLL.@)
|
||||
* ZwUnmapViewOfSectionEx (NTDLL.@)
|
||||
@@ -5077,7 +5082,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
@@ -5276,7 +5281,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
NTSTATUS WINAPI NtUnmapViewOfSectionEx( HANDLE process, PVOID addr, ULONG flags )
|
||||
{
|
||||
if (flags) FIXME("Ignoring flags %#x.\n", (int)flags);
|
||||
@ -50,5 +50,5 @@ index 226c99c5512..d96facb6aa3 100644
|
||||
|
||||
/******************************************************************************
|
||||
--
|
||||
2.38.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cd27d91f8c74141651568af082c29c09ec6ade52 Mon Sep 17 00:00:00 2001
|
||||
From af7dcbb2688ca53aa22421b30f02e2b7b08601ca Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Fri, 11 Nov 2022 12:54:19 -0600
|
||||
Subject: [PATCH] ntdll: Support MEM_PRESERVE_PLACEHOLDER in
|
||||
@ -12,7 +12,7 @@ Subject: [PATCH] ntdll: Support MEM_PRESERVE_PLACEHOLDER in
|
||||
4 files changed, 73 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/tests/process.c b/dlls/kernelbase/tests/process.c
|
||||
index 0d75c6e2dda..5221a102863 100644
|
||||
index 03f76a1b73a..448369a3743 100644
|
||||
--- a/dlls/kernelbase/tests/process.c
|
||||
+++ b/dlls/kernelbase/tests/process.c
|
||||
@@ -41,6 +41,7 @@ static PVOID (WINAPI *pVirtualAllocFromApp)(PVOID, SIZE_T, DWORD, DWORD);
|
||||
@ -105,7 +105,7 @@ index 0d75c6e2dda..5221a102863 100644
|
||||
ret = VirtualFree(p1, size / 2, MEM_RELEASE | MEM_PRESERVE_PLACEHOLDER);
|
||||
ok(ret, "Failed to split a placeholder.\n");
|
||||
check_region_size(p1, size / 2);
|
||||
@@ -447,6 +493,7 @@ static void init_funcs(void)
|
||||
@@ -462,6 +508,7 @@ static void init_funcs(void)
|
||||
X(VirtualAlloc2);
|
||||
X(VirtualAlloc2FromApp);
|
||||
X(VirtualAllocFromApp);
|
||||
@ -114,10 +114,10 @@ index 0d75c6e2dda..5221a102863 100644
|
||||
hmod = GetModuleHandleA("ntdll.dll");
|
||||
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index f23a3d383f6..77eb2c0aaeb 100644
|
||||
index c143560e360..40efda551e0 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -553,7 +553,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
|
||||
@@ -618,7 +618,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
|
||||
result->type = call->type;
|
||||
addr = wine_server_get_ptr( call->unmap_view.addr );
|
||||
if ((ULONG_PTR)addr == call->unmap_view.addr)
|
||||
@ -127,11 +127,11 @@ index f23a3d383f6..77eb2c0aaeb 100644
|
||||
result->unmap_view.status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index d96facb6aa3..881f7fd8f59 100644
|
||||
index 320596c740e..493f6b80419 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -5009,7 +5009,7 @@ NTSTATUS WINAPI NtMapViewOfSectionEx( HANDLE handle, HANDLE process, PVOID *addr
|
||||
return NtMapViewOfSection( handle, process, addr_ptr, 0, 0, offset_ptr, size_ptr, ViewShare, alloc_type, protect );
|
||||
@@ -5208,7 +5208,7 @@ NTSTATUS WINAPI NtMapViewOfSectionEx( HANDLE handle, HANDLE process, PVOID *addr
|
||||
return virtual_map_section( handle, addr_ptr, limit, 0, offset_ptr, size_ptr, alloc_type, protect );
|
||||
}
|
||||
|
||||
-NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
@ -139,7 +139,7 @@ index d96facb6aa3..881f7fd8f59 100644
|
||||
{
|
||||
struct file_view *view;
|
||||
unsigned int status = STATUS_NOT_MAPPED_VIEW;
|
||||
@@ -5024,6 +5024,7 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
@@ -5223,6 +5223,7 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
|
||||
call.unmap_view.type = APC_UNMAP_VIEW;
|
||||
call.unmap_view.addr = wine_server_client_ptr( addr );
|
||||
@ -147,7 +147,7 @@ index d96facb6aa3..881f7fd8f59 100644
|
||||
status = server_queue_process_apc( process, &call, &result );
|
||||
if (status == STATUS_SUCCESS) status = result.unmap_view.status;
|
||||
return status;
|
||||
@@ -5032,6 +5033,11 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
@@ -5231,6 +5232,11 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
if ((view = find_view( addr, 0 )) && !is_view_valloc( view ))
|
||||
{
|
||||
@ -159,7 +159,7 @@ index d96facb6aa3..881f7fd8f59 100644
|
||||
if (view->protect & VPROT_SYSTEM)
|
||||
{
|
||||
struct builtin_module *builtin;
|
||||
@@ -5058,10 +5064,21 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
@@ -5257,10 +5263,21 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
if (!status)
|
||||
{
|
||||
if (view->protect & SEC_IMAGE) release_builtin_module( view->base );
|
||||
@ -182,7 +182,7 @@ index d96facb6aa3..881f7fd8f59 100644
|
||||
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
return status;
|
||||
}
|
||||
@@ -5072,7 +5089,7 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
@@ -5271,7 +5288,7 @@ NTSTATUS unmap_view_of_section( HANDLE process, PVOID addr )
|
||||
*/
|
||||
NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
{
|
||||
@ -191,7 +191,7 @@ index d96facb6aa3..881f7fd8f59 100644
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -5082,7 +5099,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
@@ -5281,7 +5298,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
NTSTATUS WINAPI NtUnmapViewOfSectionEx( HANDLE process, PVOID addr, ULONG flags )
|
||||
{
|
||||
if (flags) FIXME("Ignoring flags %#x.\n", (int)flags);
|
||||
@ -201,10 +201,10 @@ index d96facb6aa3..881f7fd8f59 100644
|
||||
|
||||
/******************************************************************************
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index e3e9d3641aa..825c25693cc 100644
|
||||
index 8f5202792b4..10729e3ff64 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -602,6 +602,7 @@ typedef union
|
||||
@@ -615,6 +615,7 @@ typedef union
|
||||
enum apc_type type; /* APC_UNMAP_VIEW */
|
||||
int __pad;
|
||||
client_ptr_t addr; /* view address */
|
||||
@ -213,5 +213,5 @@ index e3e9d3641aa..825c25693cc 100644
|
||||
struct
|
||||
{
|
||||
--
|
||||
2.38.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1 +1 @@
|
||||
de034b36b7fbad0edae0a2700376273c74e48ac6
|
||||
d2789ef0678619d7c56a9e0c1aaa06f582a41ee3
|
||||
|
Loading…
Reference in New Issue
Block a user