Removed various patches (accepted upstream).

This commit is contained in:
Sebastian Lackner 2015-05-04 19:02:31 +02:00
parent 5848db0ab8
commit e0390d0bdb
11 changed files with 17 additions and 463 deletions

View File

@ -185,7 +185,7 @@ for more details.*
* Improvement for heap allocation performance
* Jedi Knight: Dark Forces II crashes with winmm set to native ([Wine Bug #37983](https://bugs.winehq.org/show_bug.cgi?id=37983))
* Lego Stunt Rally requires DXTn software de/encoding support ([Wine Bug #25486](https://bugs.winehq.org/show_bug.cgi?id=25486))
* Lockfree algorithm for filedescriptor cache (improves file access speed)
* ~~Lockfree algorithm for filedescriptor cache (improves file access speed)~~
* MSVCRT crashes when NULL is passed as string to atof or strtod ([Wine Bug #32550](https://bugs.winehq.org/show_bug.cgi?id=32550))
* MSYS2 expects correct handling of WRITECOPY memory protection ([Wine Bug #35561](https://bugs.winehq.org/show_bug.cgi?id=35561))
* Make it possible to change media center / tablet pc status ([Wine Bug #18732](https://bugs.winehq.org/show_bug.cgi?id=18732))

5
debian/changelog vendored
View File

@ -1,3 +1,8 @@
wine-staging (1.7.43) UNRELEASED; urgency=low
* Removed patch to use lockfree implementation for FD cache.
* Partially removed patches to test behaviour of VirtualProtect / NtProtectVirtualMemory.
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 04 May 2015 19:02:02 +0200
wine-staging (1.7.42) unstable; urgency=low
* Added patch with stub for advapi32.ImpersonateAnonymousToken (fixes Wine Staging Bug #254).
* Added patch to implement FileFsFullSizeInformation information class.

View File

@ -1,207 +0,0 @@
From 65cdd8fabe3124792f9dc3c14ae4bdb96b47c481 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 30 Apr 2015 05:43:16 +0200
Subject: ntdll: Use lockfree implementation for get_cached_fd. (try 2)
v2: Avoid #ifdefs and simplify code a bit. On PowerPC all interlocked operations will use
interlocked_cmpxchg64, which means that we can implement it using a pthread lock.
---
dlls/ntdll/server.c | 105 ++++++++++++++++++++++++++++++++++------------------
1 file changed, 68 insertions(+), 37 deletions(-)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 69d01be..652a1aa 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -75,6 +75,8 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winnt.h"
#include "wine/library.h"
#include "wine/server.h"
#include "wine/debug.h"
@@ -126,6 +128,17 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
};
static RTL_CRITICAL_SECTION fd_cache_section = { &critsect_debug, -1, 0, 0, 0, 0 };
+/* atomically exchange a 64-bit value */
+static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
+{
+#ifdef _WIN64
+ return (LONG64)interlocked_xchg_ptr( (void **)dest, (void *)val );
+#else
+ LONG64 tmp = *dest;
+ while (interlocked_cmpxchg64( dest, val, tmp ) != tmp) tmp = *dest;
+ return tmp;
+#endif
+}
#ifdef __GNUC__
static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2)));
@@ -790,19 +803,27 @@ static int receive_fd( obj_handle_t *handle )
/***********************************************************************/
/* fd cache support */
-struct fd_cache_entry
+#include "pshpack1.h"
+union fd_cache_entry
{
- int fd;
- enum server_fd_type type : 5;
- unsigned int access : 3;
- unsigned int options : 24;
+ LONG64 data;
+ struct
+ {
+ int fd;
+ enum server_fd_type type : 5;
+ unsigned int access : 3;
+ unsigned int options : 24;
+ } s;
};
+#include "poppack.h"
-#define FD_CACHE_BLOCK_SIZE (65536 / sizeof(struct fd_cache_entry))
+C_ASSERT( sizeof(union fd_cache_entry) == sizeof(LONG64) );
+
+#define FD_CACHE_BLOCK_SIZE (65536 / sizeof(union fd_cache_entry))
#define FD_CACHE_ENTRIES 128
-static struct fd_cache_entry *fd_cache[FD_CACHE_ENTRIES];
-static struct fd_cache_entry fd_cache_initial_block[FD_CACHE_BLOCK_SIZE];
+static union fd_cache_entry *fd_cache[FD_CACHE_ENTRIES];
+static union fd_cache_entry fd_cache_initial_block[FD_CACHE_BLOCK_SIZE];
static inline unsigned int handle_to_index( HANDLE handle, unsigned int *entry )
{
@@ -821,6 +842,7 @@ static BOOL add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
unsigned int access, unsigned int options )
{
unsigned int entry, idx = handle_to_index( handle, &entry );
+ union fd_cache_entry cache;
if (entry >= FD_CACHE_ENTRIES)
{
@@ -833,26 +855,26 @@ static BOOL add_fd_to_cache( HANDLE handle, int fd, enum server_fd_type type,
if (!entry) fd_cache[0] = fd_cache_initial_block;
else
{
- void *ptr = wine_anon_mmap( NULL, FD_CACHE_BLOCK_SIZE * sizeof(struct fd_cache_entry),
+ void *ptr = wine_anon_mmap( NULL, FD_CACHE_BLOCK_SIZE * sizeof(union fd_cache_entry),
PROT_READ | PROT_WRITE, 0 );
if (ptr == MAP_FAILED) return FALSE;
fd_cache[entry] = ptr;
}
}
+
/* store fd+1 so that 0 can be used as the unset value */
- fd = interlocked_xchg( &fd_cache[entry][idx].fd, fd + 1 );
- fd_cache[entry][idx].type = type;
- fd_cache[entry][idx].access = access;
- fd_cache[entry][idx].options = options;
- assert( !fd );
+ cache.s.fd = fd + 1;
+ cache.s.type = type;
+ cache.s.access = access;
+ cache.s.options = options;
+ cache.data = interlocked_xchg64( &fd_cache[entry][idx].data, cache.data );
+ assert( !cache.s.fd );
return TRUE;
}
/***********************************************************************
* get_cached_fd
- *
- * Caller must hold fd_cache_section.
*/
static inline int get_cached_fd( HANDLE handle, enum server_fd_type *type,
unsigned int *access, unsigned int *options )
@@ -862,10 +884,12 @@ static inline int get_cached_fd( HANDLE handle, enum server_fd_type *type,
if (entry < FD_CACHE_ENTRIES && fd_cache[entry])
{
- fd = fd_cache[entry][idx].fd - 1;
- if (type) *type = fd_cache[entry][idx].type;
- if (access) *access = fd_cache[entry][idx].access;
- if (options) *options = fd_cache[entry][idx].options;
+ union fd_cache_entry cache;
+ cache.data = interlocked_cmpxchg64( &fd_cache[entry][idx].data, 0, 0 );
+ fd = cache.s.fd - 1;
+ if (type) *type = cache.s.type;
+ if (access) *access = cache.s.access;
+ if (options) *options = cache.s.options;
}
return fd;
}
@@ -880,7 +904,11 @@ int server_remove_fd_from_cache( HANDLE handle )
int fd = -1;
if (entry < FD_CACHE_ENTRIES && fd_cache[entry])
- fd = interlocked_xchg( &fd_cache[entry][idx].fd, 0 ) - 1;
+ {
+ union fd_cache_entry cache;
+ cache.data = interlocked_xchg64( &fd_cache[entry][idx].data, 0 );
+ fd = cache.s.fd - 1;
+ }
return fd;
}
@@ -903,33 +931,36 @@ int server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd,
*needs_close = 0;
wanted_access &= FILE_READ_DATA | FILE_WRITE_DATA | FILE_APPEND_DATA;
- server_enter_uninterrupted_section( &fd_cache_section, &sigset );
-
fd = get_cached_fd( handle, type, &access, options );
if (fd != -1) goto done;
- SERVER_START_REQ( get_handle_fd )
+ server_enter_uninterrupted_section( &fd_cache_section, &sigset );
+ fd = get_cached_fd( handle, type, &access, options );
+ if (fd == -1)
{
- req->handle = wine_server_obj_handle( handle );
- if (!(ret = wine_server_call( req )))
+ SERVER_START_REQ( get_handle_fd )
{
- if (type) *type = reply->type;
- if (options) *options = reply->options;
- access = reply->access;
- if ((fd = receive_fd( &fd_handle )) != -1)
+ req->handle = wine_server_obj_handle( handle );
+ if (!(ret = wine_server_call( req )))
{
- assert( wine_server_ptr_handle(fd_handle) == handle );
- *needs_close = (!reply->cacheable ||
- !add_fd_to_cache( handle, fd, reply->type,
- reply->access, reply->options ));
+ if (type) *type = reply->type;
+ if (options) *options = reply->options;
+ access = reply->access;
+ if ((fd = receive_fd( &fd_handle )) != -1)
+ {
+ assert( wine_server_ptr_handle(fd_handle) == handle );
+ *needs_close = (!reply->cacheable ||
+ !add_fd_to_cache( handle, fd, reply->type,
+ reply->access, reply->options ));
+ }
+ else ret = STATUS_TOO_MANY_OPENED_FILES;
}
- else ret = STATUS_TOO_MANY_OPENED_FILES;
}
+ SERVER_END_REQ;
}
- SERVER_END_REQ;
+ server_leave_uninterrupted_section( &fd_cache_section, &sigset );
done:
- server_leave_uninterrupted_section( &fd_cache_section, &sigset );
if (!ret && ((access & wanted_access) != wanted_access))
{
ret = STATUS_ACCESS_DENIED;
--
2.3.5

View File

@ -1 +0,0 @@
Fixes: Lockfree algorithm for filedescriptor cache (improves file access speed)

View File

@ -1,73 +0,0 @@
From e99c972628d923d9fa53a57899b6835844ec83a2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 2 May 2015 18:37:26 +0200
Subject: kernel32/tests: Add tests for calling VirtualProtect with NULL as
last argument.
---
dlls/kernel32/tests/virtual.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index 75e91d5..311e87b 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -47,6 +47,7 @@ static struct _TEB * (WINAPI *pNtCurrentTeb)(void);
static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTION_HANDLER);
static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID);
static BOOL (WINAPI *pGetProcessDEPPolicy)(HANDLE, LPDWORD, PBOOL);
+static NTSTATUS (WINAPI *pNtProtectVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG, ULONG *);
/* ############################### */
@@ -2478,6 +2479,9 @@ static void test_VirtualProtect(void)
DWORD ret, old_prot, rw_prot, exec_prot, i, j;
MEMORY_BASIC_INFORMATION info;
SYSTEM_INFO si;
+ void *addr;
+ SIZE_T size;
+ NTSTATUS status;
GetSystemInfo(&si);
trace("system page size %#x\n", si.dwPageSize);
@@ -2486,6 +2490,29 @@ static void test_VirtualProtect(void)
base = VirtualAlloc(0, si.dwPageSize, MEM_RESERVE | MEM_COMMIT, PAGE_NOACCESS);
ok(base != NULL, "VirtualAlloc failed %d\n", GetLastError());
+ SetLastError(0xdeadbeef);
+ ret = VirtualProtect(base, si.dwPageSize, PAGE_READONLY, NULL);
+ todo_wine
+ ok(!ret, "VirtualProtect should fail\n");
+ todo_wine
+ ok(GetLastError() == ERROR_NOACCESS, "expected ERROR_NOACCESS, got %d\n", GetLastError());
+ old_prot = 0xdeadbeef;
+ ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot);
+ ok(ret, "VirtualProtect failed %d\n", GetLastError());
+ todo_wine
+ ok(old_prot == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", old_prot);
+
+ addr = base; size = si.dwPageSize;
+ status = pNtProtectVirtualMemory(GetCurrentProcess(), &addr, &size, PAGE_READONLY, NULL);
+ todo_wine
+ ok(status == STATUS_ACCESS_VIOLATION, "NtProtectVirtualMemory should fail, got %08x\n", status);
+ old_prot = 0xdeadbeef;
+ addr = base; size = si.dwPageSize;
+ status = pNtProtectVirtualMemory(GetCurrentProcess(), &addr, &size, PAGE_NOACCESS, &old_prot);
+ ok(status == STATUS_SUCCESS, "NtProtectVirtualMemory should succeed, got %08x\n", status);
+ todo_wine
+ ok(old_prot == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", old_prot);
+
for (i = 0; i < sizeof(td)/sizeof(td[0]); i++)
{
SetLastError(0xdeadbeef);
@@ -3477,6 +3504,7 @@ START_TEST(virtual)
pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" );
pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlAddVectoredExceptionHandler" );
pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlRemoveVectoredExceptionHandler" );
+ pNtProtectVirtualMemory = (void *)GetProcAddress( hntdll, "NtProtectVirtualMemory" );
test_shared_memory(FALSE);
test_shared_memory_ro(FALSE, FILE_MAP_READ|FILE_MAP_WRITE);
--
2.3.5

View File

@ -1,4 +1,4 @@
From 4fa917bcdc3685a9181df8d1d7c1b3b07d816fc6 Mon Sep 17 00:00:00 2001
From eb6ad80caabe5a150874986f52461a2fc2a2c01a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 2 May 2015 18:46:38 +0200
Subject: ntdll: Return failure in NtProtectVirtualMemory when last argument is
@ -10,10 +10,10 @@ Subject: ntdll: Return failure in NtProtectVirtualMemory when last argument is
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index 311e87b..1c70eca 100644
index 2dea156..4f50df8 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -2492,25 +2492,20 @@ static void test_VirtualProtect(void)
@@ -2492,27 +2492,22 @@ static void test_VirtualProtect(void)
SetLastError(0xdeadbeef);
ret = VirtualProtect(base, si.dwPageSize, PAGE_READONLY, NULL);
@ -27,12 +27,14 @@ index 311e87b..1c70eca 100644
- todo_wine
ok(old_prot == PAGE_NOACCESS, "got %#x != expected PAGE_NOACCESS\n", old_prot);
addr = base; size = si.dwPageSize;
addr = base;
size = si.dwPageSize;
status = pNtProtectVirtualMemory(GetCurrentProcess(), &addr, &size, PAGE_READONLY, NULL);
- todo_wine
ok(status == STATUS_ACCESS_VIOLATION, "NtProtectVirtualMemory should fail, got %08x\n", status);
addr = base;
size = si.dwPageSize;
old_prot = 0xdeadbeef;
addr = base; size = si.dwPageSize;
status = pNtProtectVirtualMemory(GetCurrentProcess(), &addr, &size, PAGE_NOACCESS, &old_prot);
ok(status == STATUS_SUCCESS, "NtProtectVirtualMemory should succeed, got %08x\n", status);
- todo_wine
@ -54,5 +56,5 @@ index 9d29c33..0629816 100644
{
apc_call_t call;
--
2.3.5
2.3.7

View File

@ -1,33 +0,0 @@
From 6e645b3f441ca310a17a06487b0a55fa629aa0d1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 2 May 2015 18:42:09 +0200
Subject: kernel32: Do not omit mandatory argument for VirtualProtect.
---
dlls/kernel32/except.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c
index bd50e88..2a7dbaa 100644
--- a/dlls/kernel32/except.c
+++ b/dlls/kernel32/except.c
@@ -401,6 +401,7 @@ static BOOL start_debugger_atomic(PEXCEPTION_POINTERS epointers)
*/
static inline BOOL check_resource_write( void *addr )
{
+ DWORD old_prot;
void *rsrc;
DWORD size;
MEMORY_BASIC_INFORMATION info;
@@ -412,7 +413,7 @@ static inline BOOL check_resource_write( void *addr )
return FALSE;
if (addr < rsrc || (char *)addr >= (char *)rsrc + size) return FALSE;
TRACE( "Broken app is writing to the resource data, enabling work-around\n" );
- VirtualProtect( rsrc, size, PAGE_READWRITE, NULL );
+ VirtualProtect( rsrc, size, PAGE_READWRITE, &old_prot );
return TRUE;
}
--
2.3.5

View File

@ -1,68 +0,0 @@
From 0c9bbd27acb0df45ec7e6a501cb5e2b14bd69161 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 2 May 2015 18:43:05 +0200
Subject: krnl386.exe16: Do not omit mandatory argument for VirtualProtect.
---
dlls/krnl386.exe16/dosmem.c | 6 ++++--
dlls/krnl386.exe16/dosvm.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/krnl386.exe16/dosmem.c b/dlls/krnl386.exe16/dosmem.c
index f0feba9..b899f7b 100644
--- a/dlls/krnl386.exe16/dosmem.c
+++ b/dlls/krnl386.exe16/dosmem.c
@@ -302,6 +302,7 @@ BOOL DOSMEM_InitDosMemory(void)
{
static BOOL done;
static HANDLE hRunOnce;
+ DWORD old_prot;
if (done) return TRUE;
@@ -317,7 +318,7 @@ BOOL DOSMEM_InitDosMemory(void)
/* ok, we're the winning thread */
if (!(ret = VirtualProtect( DOSMEM_dosmem + DOSMEM_protect,
DOSMEM_SIZE - DOSMEM_protect,
- PAGE_READWRITE, NULL )))
+ PAGE_READWRITE, &old_prot )))
ERR("Cannot load access low 1Mb, DOS subsystem unavailable\n");
RemoveVectoredExceptionHandler( vectored_handler );
@@ -650,10 +651,11 @@ UINT DOSMEM_Available(void)
BOOL DOSMEM_MapDosLayout(void)
{
static BOOL already_mapped;
+ DWORD old_prot;
if (!already_mapped)
{
- if (DOSMEM_dosmem || !VirtualProtect( NULL, DOSMEM_SIZE, PAGE_EXECUTE_READWRITE, NULL ))
+ if (DOSMEM_dosmem || !VirtualProtect( NULL, DOSMEM_SIZE, PAGE_EXECUTE_READWRITE, &old_prot ))
{
ERR( "Need full access to the first megabyte for DOS mode\n" );
ExitProcess(1);
diff --git a/dlls/krnl386.exe16/dosvm.c b/dlls/krnl386.exe16/dosvm.c
index 87adf33..4e76215 100644
--- a/dlls/krnl386.exe16/dosvm.c
+++ b/dlls/krnl386.exe16/dosvm.c
@@ -827,6 +827,7 @@ LPVOID DOSVM_AllocDataUMB( DWORD size, WORD *segment, WORD *selector )
*/
void DOSVM_InitSegments(void)
{
+ DWORD old_prot;
LPSTR ptr;
int i;
@@ -966,7 +967,7 @@ void DOSVM_InitSegments(void)
/*
* As we store code in UMB we should make sure it is executable
*/
- VirtualProtect((void *)DOSVM_UMB_BOTTOM, DOSVM_UMB_TOP - DOSVM_UMB_BOTTOM, PAGE_EXECUTE_READWRITE, NULL);
+ VirtualProtect((void *)DOSVM_UMB_BOTTOM, DOSVM_UMB_TOP - DOSVM_UMB_BOTTOM, PAGE_EXECUTE_READWRITE, &old_prot);
event_notifier = CreateEventW(NULL, FALSE, FALSE, NULL);
}
--
2.3.5

View File

@ -1,25 +0,0 @@
From 7eacc14beee477a470f66c2d7524054f0a38ff86 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 2 May 2015 18:43:24 +0200
Subject: ntdll: Do not omit mandatory argument for VirtualProtect.
---
dlls/ntdll/loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 9810f07..921bf57 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -685,7 +685,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d
done:
/* restore old protection of the import address table */
- NtProtectVirtualMemory( NtCurrentProcess(), &protect_base, &protect_size, protect_old, NULL );
+ NtProtectVirtualMemory( NtCurrentProcess(), &protect_base, &protect_size, protect_old, &protect_old );
return wmImp;
}
--
2.3.5

View File

@ -1,33 +0,0 @@
From 52dd3d51573897cc41a78f86a66518946d2dca40 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 2 May 2015 18:43:34 +0200
Subject: winedevice: Do not omit mandatory argument for VirtualProtect.
---
programs/winedevice/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c
index 9677a82..ef1e1ef 100644
--- a/programs/winedevice/device.c
+++ b/programs/winedevice/device.c
@@ -98,14 +98,14 @@ static HMODULE load_driver_module( const WCHAR *name )
VirtualProtect( page, info.PageSize, PAGE_EXECUTE_READWRITE, &old );
rel = LdrProcessRelocationBlock( page, (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT),
(USHORT *)(rel + 1), delta );
- if (old != PAGE_EXECUTE_READWRITE) VirtualProtect( page, info.PageSize, old, NULL );
+ if (old != PAGE_EXECUTE_READWRITE) VirtualProtect( page, info.PageSize, old, &old );
if (!rel) goto error;
}
/* make sure we don't try again */
size = FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + nt->FileHeader.SizeOfOptionalHeader;
VirtualProtect( nt, size, PAGE_READWRITE, &old );
nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress = 0;
- VirtualProtect( nt, size, old, NULL );
+ VirtualProtect( nt, size, old, &old );
}
}
--
2.3.5

View File

@ -3502,14 +3502,12 @@ fi
# Patchset ntdll-FD_Cache
# |
# | Modified files:
# | * dlls/ntdll/server.c, libs/port/interlocked.c
# | * libs/port/interlocked.c
# |
if test "$enable_ntdll_FD_Cache" -eq 1; then
patch_apply ntdll-FD_Cache/0001-libs-Implement-interlocked_cmpxchg64-on-PowerPC-usin.patch
patch_apply ntdll-FD_Cache/0002-ntdll-Use-lockfree-implementation-for-get_cached_fd..patch
(
echo '+ { "Sebastian Lackner", "libs: Implement interlocked_cmpxchg64 on PowerPC using pthread mutex.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Use lockfree implementation for get_cached_fd.", 2 },';
) >> "$patchlist"
fi
@ -3621,22 +3619,11 @@ fi
# | * [#38495] Return failure in NtProtectVirtualMemory when last argument is omitted
# |
# | Modified files:
# | * dlls/kernel32/except.c, dlls/kernel32/tests/virtual.c, dlls/krnl386.exe16/dosmem.c, dlls/krnl386.exe16/dosvm.c,
# | dlls/ntdll/loader.c, dlls/ntdll/virtual.c, programs/winedevice/device.c
# | * dlls/kernel32/tests/virtual.c, dlls/ntdll/virtual.c
# |
if test "$enable_ntdll_NtProtectVirtualMemory" -eq 1; then
patch_apply ntdll-NtProtectVirtualMemory/0001-kernel32-tests-Add-tests-for-calling-VirtualProtect-.patch
patch_apply ntdll-NtProtectVirtualMemory/0002-kernel32-Do-not-omit-mandatory-argument-for-VirtualP.patch
patch_apply ntdll-NtProtectVirtualMemory/0003-krnl386.exe16-Do-not-omit-mandatory-argument-for-Vir.patch
patch_apply ntdll-NtProtectVirtualMemory/0004-ntdll-Do-not-omit-mandatory-argument-for-VirtualProt.patch
patch_apply ntdll-NtProtectVirtualMemory/0005-winedevice-Do-not-omit-mandatory-argument-for-Virtua.patch
patch_apply ntdll-NtProtectVirtualMemory/0006-ntdll-Return-failure-in-NtProtectVirtualMemory-when-.patch
patch_apply ntdll-NtProtectVirtualMemory/0001-ntdll-Return-failure-in-NtProtectVirtualMemory-when-.patch
(
echo '+ { "Sebastian Lackner", "kernel32/tests: Add tests for calling VirtualProtect with NULL as last argument.", 1 },';
echo '+ { "Sebastian Lackner", "kernel32: Do not omit mandatory argument for VirtualProtect.", 1 },';
echo '+ { "Sebastian Lackner", "krnl386.exe16: Do not omit mandatory argument for VirtualProtect.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Do not omit mandatory argument for VirtualProtect.", 1 },';
echo '+ { "Sebastian Lackner", "winedevice: Do not omit mandatory argument for VirtualProtect.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Return failure in NtProtectVirtualMemory when last argument is omitted.", 1 },';
) >> "$patchlist"
fi