diff --git a/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch b/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch index a44fd12b..dd2468da 100644 --- a/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch +++ b/patches/ntdll-LdrRegisterDllNotification/0001-ntdll-Implement-LdrRegisterDllNotification-and-LdrUn.patch @@ -1,7 +1,7 @@ -From 69d9fedb1a587fbc8706daa3a29293637238573f Mon Sep 17 00:00:00 2001 +From 6502de27751f8e34231d33694faa432f17f9d6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 22 Jul 2017 03:56:26 +0200 -Subject: ntdll: Implement LdrRegisterDllNotification and +Subject: [PATCH] ntdll: Implement LdrRegisterDllNotification and LdrUnregisterDllNotification. --- @@ -12,7 +12,7 @@ Subject: ntdll: Implement LdrRegisterDllNotification and 4 files changed, 381 insertions(+) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 15ed31452e1..de2800c260a 100644 +index 9451dfa520..d64433c58d 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -40,6 +40,7 @@ @@ -23,7 +23,7 @@ index 15ed31452e1..de2800c260a 100644 #include "wine/server.h" #include "ntdll_misc.h" #include "ddk/wdm.h" -@@ -64,6 +65,15 @@ WINE_DECLARE_DEBUG_CHANNEL(pid); +@@ -63,6 +64,15 @@ WINE_DECLARE_DEBUG_CHANNEL(imports); typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID); typedef void (CALLBACK *LDRENUMPROC)(LDR_MODULE *, void *, BOOLEAN *); @@ -38,8 +38,8 @@ index 15ed31452e1..de2800c260a 100644 + #define IS_OPTION_TRUE(ch) ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1') - static BOOL process_attaching = TRUE; /* set on process attach to avoid calling callbacks too early */ -@@ -355,6 +365,39 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) + static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */ +@@ -348,6 +358,39 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) static inline ULONG_PTR allocate_stub( const char *dll, const char *name ) { return 0xdeadbeef; } #endif /* __i386__ */ @@ -79,7 +79,7 @@ index 15ed31452e1..de2800c260a 100644 /************************************************************************* * is_cli_only_image -@@ -1408,16 +1451,23 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved ) +@@ -1375,16 +1418,23 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved ) { WINE_MODREF *prev = current_modref; current_modref = wm; @@ -103,7 +103,7 @@ index 15ed31452e1..de2800c260a 100644 current_modref = prev; } -@@ -1486,6 +1536,7 @@ static void process_detach(void) +@@ -1453,6 +1503,7 @@ static void process_detach(void) mod->Flags &= ~LDR_PROCESS_ATTACHED; MODULE_InitDLL( CONTAINING_RECORD(mod, WINE_MODREF, ldr), DLL_PROCESS_DETACH, ULongToPtr(process_detaching) ); @@ -111,10 +111,11 @@ index 15ed31452e1..de2800c260a 100644 /* Restart at head of WINE_MODREF list, as entries might have been added and/or removed while performing the call ... */ -@@ -1612,6 +1663,54 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback, +@@ -1561,6 +1612,54 @@ NTSTATUS WINAPI LdrEnumerateLoadedModules( void *unknown, LDRENUMPROC callback, + return STATUS_SUCCESS; } - /****************************************************************** ++/****************************************************************** + * LdrRegisterDllNotification (NTDLL.@) + */ +NTSTATUS WINAPI LdrRegisterDllNotification(ULONG flags, PLDR_DLL_NOTIFICATION_FUNCTION callback, @@ -162,20 +163,19 @@ index 15ed31452e1..de2800c260a 100644 + return STATUS_SUCCESS; +} + -+/****************************************************************** + /****************************************************************** * LdrLockLoaderLock (NTDLL.@) * - * Note: some flags are not implemented. -@@ -2171,6 +2270,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo +@@ -2147,6 +2246,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, LPCWSTR fakemo TRACE_(loaddll)( "Loaded %s at %p: native\n", debugstr_w(wm->ldr.FullDllName.Buffer), module ); wm->ldr.LoadCount = 1; + *pwm = wm; - status = STATUS_SUCCESS; - done: + return STATUS_SUCCESS; + } diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 4511e8efd26..42f26298dce 100644 +index 264ae0d5a9..0950f78a8a 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -84,6 +84,7 @@ @@ -195,19 +195,19 @@ index 4511e8efd26..42f26298dce 100644 @ extern NlsAnsiCodePage @ extern NlsMbCodePageTag diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c -index 4700f4ac54a..93415ee5da0 100644 +index 02ae1c1875..8358cd5430 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c -@@ -112,6 +112,8 @@ static BOOL (WINAPI *pRtlIsCriticalSectionLockedByThread)(CRITICAL_SECTION - static NTSTATUS (WINAPI *pRtlInitializeCriticalSectionEx)(CRITICAL_SECTION *, ULONG, ULONG); - static NTSTATUS (WINAPI *pLdrEnumerateLoadedModules)(void *, void *, void *); +@@ -105,6 +105,8 @@ static NTSTATUS (WINAPI *pLdrEnumerateLoadedModules)(void *, void *, void *); static NTSTATUS (WINAPI *pRtlQueryPackageIdentity)(HANDLE, WCHAR*, SIZE_T*, WCHAR*, SIZE_T*, BOOLEAN*); + static NTSTATUS (WINAPI *pRtlMakeSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD); + static NTSTATUS (WINAPI *pRtlAbsoluteToSelfRelativeSD)(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PULONG); +static NTSTATUS (WINAPI *pLdrRegisterDllNotification)(ULONG, PLDR_DLL_NOTIFICATION_FUNCTION, void *, void **); +static NTSTATUS (WINAPI *pLdrUnregisterDllNotification)(void *); static HMODULE hkernel32 = 0; static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); -@@ -119,6 +121,9 @@ static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); +@@ -112,6 +114,9 @@ static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); #define LEN 16 static const char* src_src = "This is a test!"; /* 16 bytes long, incl NUL */ @@ -217,16 +217,16 @@ index 4700f4ac54a..93415ee5da0 100644 static ULONG src_aligned_block[4]; static ULONG dest_aligned_block[32]; static const char *src = (const char*)src_aligned_block; -@@ -175,6 +180,8 @@ static void InitFunctionPtrs(void) - pRtlInitializeCriticalSectionEx = (void *)GetProcAddress(hntdll, "RtlInitializeCriticalSectionEx"); - pLdrEnumerateLoadedModules = (void *)GetProcAddress(hntdll, "LdrEnumerateLoadedModules"); +@@ -162,6 +167,8 @@ static void InitFunctionPtrs(void) pRtlQueryPackageIdentity = (void *)GetProcAddress(hntdll, "RtlQueryPackageIdentity"); + pRtlMakeSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlMakeSelfRelativeSD"); + pRtlAbsoluteToSelfRelativeSD = (void *)GetProcAddress(hntdll, "RtlAbsoluteToSelfRelativeSD"); + pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification"); + pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification"); } hkernel32 = LoadLibraryA("kernel32.dll"); ok(hkernel32 != 0, "LoadLibrary failed\n"); -@@ -3345,6 +3352,248 @@ done: +@@ -2334,6 +2341,248 @@ done: CoUninitialize(); } @@ -475,17 +475,17 @@ index 4700f4ac54a..93415ee5da0 100644 START_TEST(rtl) { InitFunctionPtrs(); -@@ -3384,4 +3633,5 @@ START_TEST(rtl) - test_RtlLeaveCriticalSection(); +@@ -2369,4 +2618,5 @@ START_TEST(rtl) test_LdrEnumerateLoadedModules(); test_RtlQueryPackageIdentity(); + test_RtlMakeSelfRelativeSD(); + test_LdrRegisterDllNotification(); } diff --git a/include/winternl.h b/include/winternl.h -index 133653adfca..140669b0105 100644 +index bc8b92798e..2d3350507d 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -2186,6 +2186,32 @@ typedef struct _LDR_MODULE +@@ -2162,6 +2162,32 @@ typedef struct _LDR_MODULE HANDLE SectionHandle; } LDR_MODULE, *PLDR_MODULE; @@ -518,7 +518,7 @@ index 133653adfca..140669b0105 100644 /* those defines are (some of the) regular LDR_MODULE.Flags values */ #define LDR_IMAGE_IS_DLL 0x00000004 #define LDR_LOAD_IN_PROGRESS 0x00001000 -@@ -2204,6 +2230,9 @@ typedef struct _LDR_MODULE +@@ -2180,6 +2206,9 @@ typedef struct _LDR_MODULE /* FIXME: to be checked */ #define MAXIMUM_FILENAME_LENGTH 256 @@ -529,5 +529,5 @@ index 133653adfca..140669b0105 100644 { PVOID Reserved1; /* 00/00 */ -- -2.13.1 +2.16.1 diff --git a/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch b/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch index b6caf36a..a308f629 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch @@ -1,7 +1,7 @@ -From 66e9d350993b7349f2309edd72945e01b6233d1c Mon Sep 17 00:00:00 2001 +From e850c163a62a5932bff154e8fafd0547c55065eb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 May 2017 11:17:26 +0200 -Subject: ntdll: Resolve drive symlinks before returning section name. +Subject: [PATCH] ntdll: Resolve drive symlinks before returning section name. --- dlls/ntdll/directory.c | 2 +- @@ -11,10 +11,10 @@ Subject: ntdll: Resolve drive symlinks before returning section name. 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 2fb30febd63..8f50a81610b 100644 +index b6e89bb19a..53409014ee 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c -@@ -2927,7 +2927,7 @@ static NTSTATUS nt_to_unix_file_name_internal( const UNICODE_STRING *nameW, ANSI +@@ -2929,7 +2929,7 @@ static NTSTATUS nt_to_unix_file_name_internal( const UNICODE_STRING *nameW, ANSI } /* read the contents of an NT symlink object */ @@ -24,7 +24,7 @@ index 2fb30febd63..8f50a81610b 100644 OBJECT_ATTRIBUTES attr; UNICODE_STRING targetW; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 823024215e0..a61638cdc06 100644 +index f9c6031778..6e1ca3d72f 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -169,6 +169,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S @@ -32,11 +32,11 @@ index 823024215e0..a61638cdc06 100644 /* virtual memory */ +extern NTSTATUS read_nt_symlink( HANDLE root, UNICODE_STRING *name, WCHAR *target, size_t length ) DECLSPEC_HIDDEN; - extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_HIDDEN; - extern NTSTATUS virtual_create_builtin_view( void *base ) DECLSPEC_HIDDEN; - extern NTSTATUS virtual_alloc_thread_stack( TEB *teb, SIZE_T reserve_size, SIZE_T commit_size ) DECLSPEC_HIDDEN; + extern NTSTATUS virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG zero_bits, SIZE_T commit_size, + const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr, ULONG protect, + pe_image_info_t *image_info ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 164186f274b..85a7f4dc059 100644 +index 9912b1a20c..0fd91b4624 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -56,6 +56,7 @@ @@ -56,7 +56,7 @@ index 164186f274b..85a7f4dc059 100644 static struct file_view *view_block_start, *view_block_end, *next_free_view; static const size_t view_block_size = 0x100000; static void *preload_reserve_start; -@@ -2780,12 +2783,15 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, +@@ -2969,12 +2972,15 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, MEMORY_SECTION_NAME *info, SIZE_T len, SIZE_T *res_len ) { @@ -73,7 +73,7 @@ index 164186f274b..85a7f4dc059 100644 if (!addr || !info || !res_len) return STATUS_INVALID_PARAMETER; -@@ -2844,14 +2850,34 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, +@@ -3033,14 +3039,34 @@ static NTSTATUS get_section_name( HANDLE process, LPCVOID addr, } found: @@ -114,10 +114,10 @@ index 164186f274b..85a7f4dc059 100644 else status = (len < sizeof(MEMORY_SECTION_NAME)) ? STATUS_INFO_LENGTH_MISMATCH : STATUS_BUFFER_OVERFLOW; diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c -index 6014d6fc152..8704123642e 100644 +index b3e6b3aa28..d917cd561f 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c -@@ -446,7 +446,6 @@ static void test_GetMappedFileName(void) +@@ -450,7 +450,6 @@ static void test_GetMappedFileName(void) ret = pGetMappedFileNameA(GetCurrentProcess(), base, map_name, sizeof(map_name)); ok(ret, "GetMappedFileName error %d\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); @@ -125,7 +125,7 @@ index 6014d6fc152..8704123642e 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); SetLastError(0xdeadbeef); -@@ -458,7 +457,6 @@ todo_wine +@@ -462,7 +461,6 @@ todo_wine { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -133,7 +133,7 @@ index 6014d6fc152..8704123642e 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } -@@ -471,7 +469,6 @@ todo_wine +@@ -475,7 +473,6 @@ todo_wine { ok(memcmp(map_nameW, nt_map_name, lstrlenW(map_nameW)) == 0, "map name does not start with a device name: %s\n", map_name); WideCharToMultiByte(CP_ACP, 0, map_nameW, -1, map_name, MAX_PATH, NULL, NULL); @@ -141,7 +141,7 @@ index 6014d6fc152..8704123642e 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); } -@@ -479,7 +476,6 @@ todo_wine +@@ -483,7 +480,6 @@ todo_wine ret = pGetMappedFileNameA(GetCurrentProcess(), base + 0x2000, map_name, sizeof(map_name)); ok(ret, "GetMappedFileName error %d\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); @@ -149,7 +149,7 @@ index 6014d6fc152..8704123642e 100644 ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); SetLastError(0xdeadbeef); -@@ -564,7 +560,7 @@ static void test_GetProcessImageFileName(void) +@@ -568,7 +564,7 @@ static void test_GetProcessImageFileName(void) { /* Windows returns 2*strlen-1 */ ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret); @@ -159,5 +159,5 @@ index 6014d6fc152..8704123642e 100644 SetLastError(0xdeadbeef); -- -2.14.1 +2.16.1 diff --git a/patches/ntdll-Signal_Handler/0001-ntdll-Avoid-stack-protector-frame-in-signal-handler-.patch b/patches/ntdll-Signal_Handler/0001-ntdll-Avoid-stack-protector-frame-in-signal-handler-.patch index e9cd2cb3..702c23c7 100644 --- a/patches/ntdll-Signal_Handler/0001-ntdll-Avoid-stack-protector-frame-in-signal-handler-.patch +++ b/patches/ntdll-Signal_Handler/0001-ntdll-Avoid-stack-protector-frame-in-signal-handler-.patch @@ -52,15 +52,6 @@ index c46d50eb271..8a637f23825 100644 { WORD fs, gs; void *stack = init_handler( sigcontext, &fs, &gs ); -@@ -2231,7 +2238,7 @@ done: - * immediately set VIP_FLAG, causing pending events to be handled - * as early as possible. - */ --static void usr2_handler( int signal, siginfo_t *siginfo, void *sigcontext ) -+static void SIGNALFUNC usr2_handler( int signal, siginfo_t *siginfo, void *sigcontext ) - { - EXCEPTION_RECORD *rec = setup_exception( sigcontext, raise_vm86_sti_exception ); - rec->ExceptionCode = EXCEPTION_VM86_STI; @@ -2245,7 +2252,7 @@ static void usr2_handler( int signal, siginfo_t *siginfo, void *sigcontext ) * Handler for SIGSEGV and related errors. Used only during the initialization * of the process to handle virtual faults. diff --git a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch index 0efb72ff..1e3fad46 100644 --- a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch +++ b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch @@ -1,36 +1,23 @@ -From 44f9d4109dfcd0a9e49b3396bd8f8a1f1c2ca1a0 Mon Sep 17 00:00:00 2001 +From a34c31eaedc464322d204c1f0a8df624aac19867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 4 Oct 2014 02:53:22 +0200 -Subject: ntdll: Setup a temporary signal handler during process startup to - handle page faults. (v2) +Subject: [PATCH] ntdll: Setup a temporary signal handler during process + startup to handle page faults. (v2) --- - dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/signal_arm.c | 6 +++++ dlls/ntdll/signal_arm64.c | 6 +++++ dlls/ntdll/signal_i386.c | 53 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/signal_powerpc.c | 6 +++++ dlls/ntdll/signal_x86_64.c | 6 +++++ dlls/ntdll/thread.c | 1 + - 7 files changed, 79 insertions(+) + 6 files changed, 78 insertions(+) -diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index fafad135f29..ec3b1746f84 100644 ---- a/dlls/ntdll/ntdll_misc.h -+++ b/dlls/ntdll/ntdll_misc.h -@@ -68,6 +68,7 @@ extern NTSTATUS signal_alloc_thread( TEB **teb ) DECLSPEC_HIDDEN; - extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN; - extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN; - extern void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) DECLSPEC_HIDDEN; -+extern void signal_init_early(void) DECLSPEC_HIDDEN; - extern void version_init( const WCHAR *appname ) DECLSPEC_HIDDEN; - extern void debug_init(void) DECLSPEC_HIDDEN; - extern HANDLE thread_init(void) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c -index e5e314049e8..61c9ead5682 100644 +index 79aeb2a452..80a15830f6 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c -@@ -1019,6 +1019,12 @@ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) +@@ -1024,6 +1024,12 @@ void signal_init_process(void) exit(1); } @@ -42,13 +29,13 @@ index e5e314049e8..61c9ead5682 100644 +} /********************************************************************** - * __wine_enter_vm86 (NTDLL.@) + * RtlAddFunctionTable (NTDLL.@) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c -index 5b3e8879b8f..6e4a4f12343 100644 +index 7be64fdb81..8fdead1549 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c -@@ -890,6 +890,12 @@ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) - exit(1); +@@ -883,6 +883,12 @@ void signal_init_thread( TEB *teb ) + pthread_setspecific( teb_key, teb ); } +/********************************************************************** @@ -59,13 +46,13 @@ index 5b3e8879b8f..6e4a4f12343 100644 +} /********************************************************************** - * __wine_enter_vm86 (NTDLL.@) + * signal_init_process diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c -index c8b85936fbf..3442851e65a 100644 +index 223894489f..e60f28cca7 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c -@@ -2181,6 +2181,31 @@ static void usr2_handler( int signal, siginfo_t *siginfo, void *sigcontext ) - #endif /* __HAVE_VM86 */ +@@ -1968,6 +1968,31 @@ static void WINAPI raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *cont + } +/********************************************************************** @@ -96,7 +83,7 @@ index c8b85936fbf..3442851e65a 100644 /********************************************************************** * segv_handler * -@@ -2621,6 +2646,34 @@ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) +@@ -2382,6 +2407,34 @@ void signal_init_process(void) exit(1); } @@ -129,14 +116,14 @@ index c8b85936fbf..3442851e65a 100644 + exit(1); +} - #ifdef __HAVE_VM86 - /********************************************************************** + /******************************************************************* + * RtlUnwind (NTDLL.@) diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c -index e5a009c2aa2..dcbc1c4fa0b 100644 +index 39e8f42c03..721035489f 100644 --- a/dlls/ntdll/signal_powerpc.c +++ b/dlls/ntdll/signal_powerpc.c -@@ -1092,6 +1092,12 @@ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) - exit(1); +@@ -1045,6 +1045,12 @@ void signal_init_thread( TEB *teb ) + pthread_setspecific( teb_key, teb ); } +/********************************************************************** @@ -147,12 +134,12 @@ index e5a009c2aa2..dcbc1c4fa0b 100644 +} /********************************************************************** - * __wine_enter_vm86 (NTDLL.@) + * signal_init_process diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c -index 691ee1ffdbf..1148f0224aa 100644 +index 653024e741..fe0680f494 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c -@@ -3158,6 +3158,12 @@ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) +@@ -3228,6 +3228,12 @@ void signal_init_process(void) exit(1); } @@ -166,10 +153,10 @@ index 691ee1ffdbf..1148f0224aa 100644 /********************************************************************** * RtlAddFunctionTable (NTDLL.@) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 85ceb2bbeac..cc0159dd87b 100644 +index 1eec3983a3..6d6743b589 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -280,6 +280,7 @@ HANDLE thread_init(void) +@@ -446,6 +446,7 @@ HANDLE thread_init(void) static struct debug_info debug_info; /* debug info for initial thread */ virtual_init(); @@ -178,5 +165,5 @@ index 85ceb2bbeac..cc0159dd87b 100644 /* reserve space for shared user data */ -- -2.14.1 +2.16.1 diff --git a/patches/ntdll-call_thread_func_wrapper/0001-ntdll-Reserve-some-more-stack-space-in-call_thread_f.patch b/patches/ntdll-call_thread_func_wrapper/0001-ntdll-Reserve-some-more-stack-space-in-call_thread_f.patch index 6ff3e1b2..24e4a6ad 100644 --- a/patches/ntdll-call_thread_func_wrapper/0001-ntdll-Reserve-some-more-stack-space-in-call_thread_f.patch +++ b/patches/ntdll-call_thread_func_wrapper/0001-ntdll-Reserve-some-more-stack-space-in-call_thread_f.patch @@ -1,17 +1,18 @@ -From 067bfef2398869f7f2e0e93e43458350f73d733c Mon Sep 17 00:00:00 2001 +From e6bfa67377478b11fdb37eda1351d9392f60b63a Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sat, 27 Feb 2016 18:05:25 +0100 -Subject: ntdll: Reserve some more stack space in call_thread_func_wrapper. +Subject: [PATCH] ntdll: Reserve some more stack space in + call_thread_func_wrapper. --- dlls/ntdll/signal_i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c -index 59dca6c..cf3611d 100644 +index abbc094c75..70fed467a0 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c -@@ -2740,7 +2740,7 @@ __ASM_GLOBAL_FUNC(call_thread_func_wrapper, +@@ -2674,7 +2674,7 @@ __ASM_GLOBAL_FUNC(call_thread_func_wrapper, __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") @@ -19,7 +20,7 @@ index 59dca6c..cf3611d 100644 + "subl $20,%esp\n\t" "pushl 12(%ebp)\n\t" "call *8(%ebp)\n\t" - "leal -4(%ebp),%esp\n\t" + "leave\n\t" -- -2.7.1 +2.16.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 7261d05f..c1fc644e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -8489,20 +8489,20 @@ fi # | Modified files: # | * dlls/user32/message.c, dlls/user32/tests/input.c, dlls/winex11.drv/bitblt.c, server/protocol.def, server/window.c # | -if test "$enable_user32_Mouse_Message_Hwnd" -eq 1; then - patch_apply user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch - patch_apply user32-Mouse_Message_Hwnd/0002-user32-tests-Add-tests-for-clicking-through-layered-.patch - patch_apply user32-Mouse_Message_Hwnd/0003-user32-tests-Add-tests-for-window-region-of-layered-.patch - patch_apply user32-Mouse_Message_Hwnd/0004-user32-tests-Add-tests-for-DC-region.patch - patch_apply user32-Mouse_Message_Hwnd/0005-server-Add-support-for-a-layered-window-region.-v2.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Try harder to find a target for mouse messages.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "user32/tests: Add tests for clicking through layered window.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "user32/tests: Add tests for window region of layered windows.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "user32/tests: Add tests for DC region.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "server: Add support for a layered window region.", 3 },'; - ) >> "$patchlist" -fi +#if test "$enable_user32_Mouse_Message_Hwnd" -eq 1; then +# patch_apply user32-Mouse_Message_Hwnd/0001-user32-Try-harder-to-find-a-target-for-mouse-message.patch +# patch_apply user32-Mouse_Message_Hwnd/0002-user32-tests-Add-tests-for-clicking-through-layered-.patch +# patch_apply user32-Mouse_Message_Hwnd/0003-user32-tests-Add-tests-for-window-region-of-layered-.patch +# patch_apply user32-Mouse_Message_Hwnd/0004-user32-tests-Add-tests-for-DC-region.patch +# patch_apply user32-Mouse_Message_Hwnd/0005-server-Add-support-for-a-layered-window-region.-v2.patch +# ( +# printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Try harder to find a target for mouse messages.", 1 },'; +# printf '%s\n' '+ { "Sebastian Lackner", "user32/tests: Add tests for clicking through layered window.", 1 },'; +# printf '%s\n' '+ { "Sebastian Lackner", "user32/tests: Add tests for window region of layered windows.", 1 },'; +# printf '%s\n' '+ { "Sebastian Lackner", "user32/tests: Add tests for DC region.", 1 },'; +# printf '%s\n' '+ { "Dmitry Timoshkov", "server: Add support for a layered window region.", 3 },'; +# ) >> "$patchlist" +#fi # Patchset user32-PNG_Support # | diff --git a/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch b/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch index 633d0206..e3b35131 100644 --- a/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch +++ b/patches/server-Pipe_ObjectName/0001-server-Store-a-reference-to-the-parent-object-for-pi.patch @@ -1,4 +1,4 @@ -From aea2466a7e48d05a176fcd29f68035b15a7a23b7 Mon Sep 17 00:00:00 2001 +From 918650a7ed93edf05284b0ae2903cce44cdd1899 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 17 Aug 2015 01:11:47 +0200 Subject: [PATCH] server: Store a reference to the parent object for pipe @@ -12,10 +12,10 @@ Subject: [PATCH] server: Store a reference to the parent object for pipe 4 files changed, 52 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c -index 43c5ee4..9a1ba67 100644 +index b58f76365f..84b783b80a 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c -@@ -1487,14 +1487,11 @@ static void test_query_object(void) +@@ -1503,14 +1503,11 @@ static void test_query_object(void) status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len ); ok( status == STATUS_SUCCESS , "NtQueryObject returned %x\n", status ); str = (UNICODE_STRING *)buffer; @@ -31,10 +31,10 @@ index 43c5ee4..9a1ba67 100644 "name too short %s\n", wine_dbgstr_w(str->Buffer) ); trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len ); diff --git a/server/named_pipe.c b/server/named_pipe.c -index c6b37ce..825216e 100644 +index c8796b2142..f4cb5fdc12 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c -@@ -151,6 +151,8 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue ); +@@ -152,6 +152,8 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue ); /* server end functions */ static void pipe_server_dump( struct object *obj, int verbose ); static void pipe_server_destroy( struct object *obj); @@ -43,7 +43,7 @@ index c6b37ce..825216e 100644 static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static void pipe_server_get_file_info( struct fd *fd, unsigned int info_class ); -@@ -169,8 +171,8 @@ static const struct object_ops pipe_server_ops = +@@ -170,8 +172,8 @@ static const struct object_ops pipe_server_ops = default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ @@ -52,9 +52,9 @@ index c6b37ce..825216e 100644 + pipe_server_link_name, /* link_name */ + pipe_server_unlink_name, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ - pipe_server_destroy /* destroy */ -@@ -193,6 +195,8 @@ static const struct fd_ops pipe_server_fd_ops = +@@ -195,6 +197,8 @@ static const struct fd_ops pipe_server_fd_ops = /* client end functions */ static void pipe_client_dump( struct object *obj, int verbose ); @@ -63,7 +63,7 @@ index c6b37ce..825216e 100644 static void pipe_client_destroy( struct object *obj ); static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static void pipe_client_get_file_info( struct fd *fd, unsigned int info_class ); -@@ -212,8 +216,8 @@ static const struct object_ops pipe_client_ops = +@@ -214,8 +218,8 @@ static const struct object_ops pipe_client_ops = default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ @@ -72,9 +72,9 @@ index c6b37ce..825216e 100644 + pipe_client_link_name, /* link_name */ + pipe_client_unlink_name, /* unlink_name */ no_open_file, /* open_file */ + no_alloc_handle, /* alloc_handle */ fd_close_handle, /* close_handle */ - pipe_client_destroy /* destroy */ -@@ -409,6 +413,17 @@ static void pipe_end_destroy( struct pipe_end *pipe_end ) +@@ -413,6 +417,17 @@ static void pipe_end_destroy( struct pipe_end *pipe_end ) if (pipe_end->fd) release_object( pipe_end->fd ); } @@ -92,7 +92,7 @@ index c6b37ce..825216e 100644 static void pipe_server_destroy( struct object *obj) { struct pipe_server *server = (struct pipe_server *)obj; -@@ -431,6 +446,17 @@ static void pipe_server_destroy( struct object *obj) +@@ -435,6 +450,17 @@ static void pipe_server_destroy( struct object *obj) release_object( server->pipe ); } @@ -110,7 +110,7 @@ index c6b37ce..825216e 100644 static void pipe_client_destroy( struct object *obj) { struct pipe_client *client = (struct pipe_client *)obj; -@@ -956,9 +982,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags, d +@@ -959,9 +985,10 @@ static void init_pipe_end( struct pipe_end *pipe_end, unsigned int pipe_flags, d static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned int options, unsigned int pipe_flags ) { @@ -122,7 +122,7 @@ index c6b37ce..825216e 100644 if (!server) return NULL; -@@ -979,12 +1006,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned +@@ -982,12 +1009,13 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned return server; } @@ -138,7 +138,7 @@ index c6b37ce..825216e 100644 if (!client) return NULL; -@@ -1062,7 +1090,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc +@@ -1065,7 +1093,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc return NULL; } @@ -148,7 +148,7 @@ index c6b37ce..825216e 100644 set_no_fd_status( server->pipe_end.fd, STATUS_BAD_DEVICE_TYPE ); allow_fd_caching( server->pipe_end.fd ); diff --git a/server/object.c b/server/object.c -index 4455718..81f8d1b 100644 +index d0750c5934..f40aebe4dd 100644 --- a/server/object.c +++ b/server/object.c @@ -176,7 +176,7 @@ WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len ) @@ -202,10 +202,10 @@ index 4455718..81f8d1b 100644 /* dump the name of an object to stderr */ diff --git a/server/object.h b/server/object.h -index b5c50e1..258a5e7 100644 +index 9ff123ebff..4a5d282a47 100644 --- a/server/object.h +++ b/server/object.h -@@ -133,6 +133,8 @@ extern WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len ); +@@ -135,6 +135,8 @@ extern WCHAR *get_object_full_name( struct object *obj, data_size_t *ret_len ); extern void dump_object_name( struct object *obj ); extern struct object *lookup_named_object( struct object *root, const struct unicode_str *name, unsigned int attr, struct unicode_str *name_left ); @@ -215,5 +215,5 @@ index b5c50e1..258a5e7 100644 const struct unicode_str *name, unsigned int attributes, const struct security_descriptor *sd ); -- -2.7.4 +2.16.1 diff --git a/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch b/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch index 34263644..6bc4313a 100644 --- a/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch +++ b/patches/server-Shared_Memory/0001-ntdll-Implement-virtual_map_shared_memory.patch @@ -13,12 +13,12 @@ diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index c97b1e1f73f..9a5578c946d 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -164,6 +164,7 @@ extern NTSTATUS nt_to_unix_file_name_attr( const OBJECT_ATTRIBUTES *attr, ANSI_S - extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_HIDDEN; +@@ -172,6 +172,7 @@ extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_H extern NTSTATUS virtual_create_builtin_view( void *base ) DECLSPEC_HIDDEN; - extern NTSTATUS virtual_alloc_thread_stack( TEB *teb, SIZE_T reserve_size, SIZE_T commit_size ) DECLSPEC_HIDDEN; + extern NTSTATUS virtual_alloc_thread_stack( TEB *teb, SIZE_T reserve_size, + SIZE_T commit_size, SIZE_T *pthread_size ) DECLSPEC_HIDDEN; +extern NTSTATUS virtual_map_shared_memory( int fd, PVOID *addr_ptr, ULONG zero_bits, SIZE_T *size_ptr, ULONG protect ) DECLSPEC_HIDDEN; - extern void virtual_clear_thread_stack(void) DECLSPEC_HIDDEN; + extern void virtual_clear_thread_stack( void *stack_end ) DECLSPEC_HIDDEN; extern BOOL virtual_handle_stack_fault( void *addr ) DECLSPEC_HIDDEN; extern BOOL virtual_is_valid_code_address( const void *addr, SIZE_T size ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c diff --git a/patches/server-Shared_Memory/0002-server-Implement-support-for-global-and-local-shared.patch b/patches/server-Shared_Memory/0002-server-Implement-support-for-global-and-local-shared.patch index 1e3d8769..d7fa7a61 100644 --- a/patches/server-Shared_Memory/0002-server-Implement-support-for-global-and-local-shared.patch +++ b/patches/server-Shared_Memory/0002-server-Implement-support-for-global-and-local-shared.patch @@ -1,8 +1,8 @@ -From 50af842c68f0588edc927f5ad0de4f1f0b33b6e9 Mon Sep 17 00:00:00 2001 +From 4807c8a852d4e3d315bf0ddcede36344b3a2045c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 19 Mar 2015 01:22:34 +0100 -Subject: server: Implement support for global and local shared memory blocks - based on memfd. +Subject: [PATCH] server: Implement support for global and local shared memory + blocks based on memfd. --- dlls/ntdll/ntdll_misc.h | 1 + @@ -20,10 +20,10 @@ Subject: server: Implement support for global and local shared memory blocks 12 files changed, 215 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 6e24ac364a..7fe818941f 100644 +index 29a92e5e0b..4ad1a825e0 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -100,6 +100,7 @@ extern int server_pipe( int fd[2] ) DECLSPEC_HIDDEN; +@@ -107,6 +107,7 @@ extern int server_pipe( int fd[2] ) DECLSPEC_HIDDEN; extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret, data_size_t *ret_len ) DECLSPEC_HIDDEN; extern NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr ) DECLSPEC_HIDDEN; @@ -32,13 +32,14 @@ index 6e24ac364a..7fe818941f 100644 /* module handling */ extern LIST_ENTRY tls_links DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c -index c02a12ab19..80d061abd8 100644 +index aca63dcd55..428d2b4d39 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c -@@ -973,6 +973,66 @@ done: +@@ -1003,6 +1003,66 @@ done: + } - /*********************************************************************** ++/*********************************************************************** + * server_get_shared_memory_fd + * + * Receive a file descriptor to a server shared memory block. @@ -98,11 +99,10 @@ index c02a12ab19..80d061abd8 100644 +} + + -+/*********************************************************************** + /*********************************************************************** * wine_server_fd_to_handle (NTDLL.@) * - * Allocate a file handle for a Unix file descriptor. -@@ -1501,6 +1561,10 @@ size_t server_init_thread( void *entry_point ) +@@ -1537,6 +1597,10 @@ size_t server_init_thread( void *entry_point, BOOL *suspend ) } SERVER_END_REQ; @@ -114,18 +114,18 @@ index c02a12ab19..80d061abd8 100644 ntdll_get_thread_data()->wow64_redir = is_wow64; diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 9a02b8d3da..63a9c4f90b 100644 +index 72031638b6..5c0497c4fc 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c -@@ -380,6 +380,7 @@ void terminate_thread( int status ) - void exit_thread( int status ) +@@ -615,6 +615,7 @@ void exit_thread( int status ) + void WINAPI RtlExitUserThread( ULONG status ) { static void *prev_teb; + shmlocal_t *shmlocal; sigset_t sigset; TEB *teb; -@@ -403,6 +404,9 @@ void exit_thread( int status ) +@@ -639,6 +640,9 @@ void WINAPI RtlExitUserThread( ULONG status ) LdrShutdownThread(); RtlFreeThreadActivationContextStack(); @@ -158,23 +158,23 @@ index d573d1f7ad..9889b95aaf 100644 /* macros for server requests */ diff --git a/include/winternl.h b/include/winternl.h -index 5cd1664f1f..52bf022cdb 100644 +index e0f3245b09..dc351de561 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -366,7 +366,7 @@ typedef struct _TEB +@@ -395,7 +395,7 @@ typedef struct _TEB PVOID Spare4; /* f7c/1750 */ PVOID ReservedForOle; /* f80/1758 */ ULONG WaitingOnLoaderLock; /* f84/1760 */ - PVOID Reserved5[3]; /* f88/1768 */ + PVOID Reserved5[3]; /* f88/1768 used for x86_64 OSX and wineserver shared memory */ PVOID *TlsExpansionSlots; /* f94/1780 */ - ULONG ImpersonationLocale; /* f98/1788 */ - ULONG IsImpersonating; /* f9c/178c */ + #ifdef _WIN64 + PVOID DeallocationBStore; /* /1788 */ diff --git a/server/fd.c b/server/fd.c -index 3c8f1bd6c3..5f7519866c 100644 +index 15a0b9545c..385590b167 100644 --- a/server/fd.c +++ b/server/fd.c -@@ -2487,6 +2487,33 @@ DECL_HANDLER(write) +@@ -2616,6 +2616,33 @@ DECL_HANDLER(write) release_object( fd ); } @@ -209,10 +209,10 @@ index 3c8f1bd6c3..5f7519866c 100644 DECL_HANDLER(ioctl) { diff --git a/server/file.h b/server/file.h -index 5ea8f0f5cb..123f8b3ca7 100644 +index 36d297d31f..b4b1c780ac 100644 --- a/server/file.h +++ b/server/file.h -@@ -154,6 +154,14 @@ extern struct object *create_mailslot_device( struct object *root, const struct +@@ -168,6 +168,14 @@ extern struct object *create_mailslot_device( struct object *root, const struct extern struct object *create_unix_device( struct object *root, const struct unicode_str *name, const char *unix_path ); @@ -240,7 +240,7 @@ index 7aed338e96..f984bfc1e3 100644 return 0; } diff --git a/server/mapping.c b/server/mapping.c -index f03ea7a6f6..d071ed95b3 100644 +index 650bdc963f..4eb36ae275 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -29,8 +29,32 @@ @@ -276,7 +276,7 @@ index f03ea7a6f6..d071ed95b3 100644 #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" -@@ -115,6 +139,10 @@ static struct list shared_list = LIST_INIT(shared_list); +@@ -190,6 +214,10 @@ static const struct fd_ops mapping_fd_ops = static size_t page_mask; @@ -287,7 +287,7 @@ index f03ea7a6f6..d071ed95b3 100644 #define ROUND_SIZE(size) (((size) + page_mask) & ~page_mask) -@@ -159,6 +187,52 @@ static int check_current_dir_for_exec(void) +@@ -261,6 +289,52 @@ static int check_current_dir_for_exec(void) return (ret != MAP_FAILED); } @@ -341,7 +341,7 @@ index f03ea7a6f6..d071ed95b3 100644 static int create_temp_file( file_pos_t size ) { diff --git a/server/protocol.def b/server/protocol.def -index 87285a4038..1bb679261d 100644 +index 00fb838ec2..294e176b11 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -69,6 +69,15 @@ struct request_max_size @@ -360,7 +360,7 @@ index 87285a4038..1bb679261d 100644 /* debug event data */ typedef union -@@ -1240,6 +1249,12 @@ enum server_fd_type +@@ -1275,6 +1284,12 @@ enum server_fd_type @END @@ -374,10 +374,10 @@ index 87285a4038..1bb679261d 100644 @REQ(flush) async_data_t async; /* async I/O parameters */ diff --git a/server/thread.c b/server/thread.c -index ba308ee9ab..6bfa8a4467 100644 +index 31b4efd51a..e9d37c2684 100644 --- a/server/thread.c +++ b/server/thread.c -@@ -199,6 +199,8 @@ static inline void init_thread_structure( struct thread *thread ) +@@ -202,6 +202,8 @@ static inline void init_thread_structure( struct thread *thread ) thread->desktop_users = 0; thread->token = NULL; thread->exit_poll = NULL; @@ -386,7 +386,7 @@ index ba308ee9ab..6bfa8a4467 100644 thread->creation_time = current_time; thread->exit_time = 0; -@@ -300,6 +302,8 @@ static void cleanup_thread( struct thread *thread ) +@@ -303,6 +305,8 @@ static void cleanup_thread( struct thread *thread ) thread->inflight[i].client = thread->inflight[i].server = -1; } } @@ -395,7 +395,7 @@ index ba308ee9ab..6bfa8a4467 100644 thread->req_data = NULL; thread->reply_data = NULL; thread->request_fd = NULL; -@@ -308,6 +312,9 @@ static void cleanup_thread( struct thread *thread ) +@@ -311,6 +315,9 @@ static void cleanup_thread( struct thread *thread ) thread->context = NULL; thread->suspend_context = NULL; thread->desktop = 0; @@ -406,10 +406,10 @@ index ba308ee9ab..6bfa8a4467 100644 /* destroy a thread when its refcount is 0 */ diff --git a/server/thread.h b/server/thread.h -index ac9af24086..59ef2505bd 100644 +index 5d6d3906a6..7351c420d6 100644 --- a/server/thread.h +++ b/server/thread.h -@@ -89,6 +89,8 @@ struct thread +@@ -90,6 +90,8 @@ struct thread timeout_t exit_time; /* Thread exit time */ struct token *token; /* security token associated with this thread */ struct timeout_user *exit_poll; /* poll if the thread/process has exited already */ @@ -419,5 +419,5 @@ index ac9af24086..59ef2505bd 100644 struct thread_snapshot -- -2.11.0 +2.16.1 diff --git a/patches/user32-PNG_Support/0001-user32-Add-support-for-PNG-icons.-v4.patch b/patches/user32-PNG_Support/0001-user32-Add-support-for-PNG-icons.-v4.patch index 0f9b2c62..ce4bacb6 100644 --- a/patches/user32-PNG_Support/0001-user32-Add-support-for-PNG-icons.-v4.patch +++ b/patches/user32-PNG_Support/0001-user32-Add-support-for-PNG-icons.-v4.patch @@ -1,7 +1,7 @@ -From 063b754b9246809133a5608a38626a13a6488070 Mon Sep 17 00:00:00 2001 +From 77c6c5ca40e3de151a8c7a6a416c26ee9a08d14b Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 7 Apr 2016 21:18:44 +0800 -Subject: user32: Add support for PNG icons. (v5) +Subject: [PATCH] user32: Add support for PNG icons. (v5) --- dlls/user32/Makefile.in | 1 + @@ -9,7 +9,7 @@ Subject: user32: Add support for PNG icons. (v5) 2 files changed, 335 insertions(+), 5 deletions(-) diff --git a/dlls/user32/Makefile.in b/dlls/user32/Makefile.in -index b5c80a84b3..d0381f301e 100644 +index 246c424155..931a715763 100644 --- a/dlls/user32/Makefile.in +++ b/dlls/user32/Makefile.in @@ -2,6 +2,7 @@ EXTRADEFS = -D_USER32_ -D_WINABLE_ @@ -21,7 +21,7 @@ index b5c80a84b3..d0381f301e 100644 C_SRCS = \ diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c -index 33ce5cb2e4..1b0de9bdd3 100644 +index 85aedfdc12..6bb25ca880 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -6,6 +6,8 @@ @@ -61,8 +61,8 @@ index 33ce5cb2e4..1b0de9bdd3 100644 static struct list icon_cache = LIST_INIT( icon_cache ); /********************************************************************** -@@ -103,6 +114,307 @@ static HDC get_screen_dc(void) - return screen_dc; +@@ -108,6 +119,307 @@ static int get_display_bpp(void) + return ret; } +#ifdef SONAME_LIBPNG @@ -369,7 +369,7 @@ index 33ce5cb2e4..1b0de9bdd3 100644 static HICON alloc_icon_handle( BOOL is_ani, UINT num_steps ) { struct cursoricon_object *obj; -@@ -518,6 +830,8 @@ static int CURSORICON_FindBestIcon( LPCVOID dir, DWORD size, fnGetCIEntry get_en +@@ -523,6 +835,8 @@ static int CURSORICON_FindBestIcon( LPCVOID dir, DWORD size, fnGetCIEntry get_en /* Find Best Colors for Best Fit */ for ( i = 0; get_entry( dir, size, i, &cx, &cy, &bits ); i++ ) { @@ -378,9 +378,9 @@ index 33ce5cb2e4..1b0de9bdd3 100644 if(abs(width - cx) == iXDiff && abs(height - cy) == iYDiff) { iTempColorDiff = abs(depth - bits); -@@ -662,7 +976,11 @@ static BOOL CURSORICON_GetFileEntry( LPCVOID dir, DWORD size, int n, - return FALSE; +@@ -680,7 +994,11 @@ static BOOL CURSORICON_GetFileEntry( LPCVOID dir, DWORD size, int n, entry = &filedir->idEntries[n]; + if (entry->dwDIBOffset > size - sizeof(info->biSize)) return FALSE; info = (const BITMAPINFOHEADER *)((const char *)dir + entry->dwDIBOffset); - if (info->biSize != sizeof(BITMAPCOREHEADER)) + if (info->biSize == PNG_SIGN) @@ -391,7 +391,7 @@ index 33ce5cb2e4..1b0de9bdd3 100644 { if ((const char *)(info + 1) - (const char *)dir > size) return FALSE; *bits = info->biBitCount; -@@ -807,6 +1125,21 @@ static HICON create_icon_from_bmi( const BITMAPINFO *bmi, DWORD maxsize, HMODULE +@@ -824,6 +1142,21 @@ static HICON create_icon_from_bmi( const BITMAPINFO *bmi, DWORD maxsize, HMODULE /* Check bitmap header */ @@ -413,7 +413,7 @@ index 33ce5cb2e4..1b0de9bdd3 100644 if (maxsize < sizeof(BITMAPCOREHEADER)) { WARN( "invalid size %u\n", maxsize ); -@@ -987,10 +1320,6 @@ done: +@@ -1001,10 +1334,6 @@ done: /********************************************************************** * .ANI cursor support */ @@ -425,5 +425,5 @@ index 33ce5cb2e4..1b0de9bdd3 100644 #define ANI_LIST_ID RIFF_FOURCC('L', 'I', 'S', 'T') #define ANI_ACON_ID RIFF_FOURCC('A', 'C', 'O', 'N') -- -2.12.2 +2.16.1 diff --git a/patches/uxtheme-GTK_Theming/0001-uxthemegtk-Add-configure-check-and-stub-dll.patch b/patches/uxtheme-GTK_Theming/0001-uxthemegtk-Add-configure-check-and-stub-dll.patch index f159c6e5..3298b0c1 100644 --- a/patches/uxtheme-GTK_Theming/0001-uxthemegtk-Add-configure-check-and-stub-dll.patch +++ b/patches/uxtheme-GTK_Theming/0001-uxthemegtk-Add-configure-check-and-stub-dll.patch @@ -1,7 +1,7 @@ -From 6ac2abea561f3cb10dad4dc39ab758180b440423 Mon Sep 17 00:00:00 2001 +From 95eab098efeadb0332b80e070c118bfd92464de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 9 Aug 2015 02:38:18 +0200 -Subject: uxthemegtk: Add configure check and stub dll. +Subject: [PATCH] uxthemegtk: Add configure check and stub dll. List of functions updated by Ivan Akulinchev . --- @@ -20,10 +20,10 @@ List of functions updated by Ivan Akulinchev . create mode 100644 dlls/uxtheme-gtk/version.rc diff --git a/aclocal.m4 b/aclocal.m4 -index 9364188e334..ad6a4f50fca 100644 +index 633f080f4a..ab81abd807 100644 --- a/aclocal.m4 +++ b/aclocal.m4 -@@ -109,6 +109,26 @@ test -z "$ac_libs" || ac_libs=`echo " $ac_libs" | sed 's/ -L\([[^/]]\)/ -L\$(top +@@ -125,6 +125,26 @@ test -z "$ac_libs" || ac_libs=`echo " $ac_libs" | sed 's/ -L\([[^/]]\)/ -L\$(top AS_VAR_POPDEF([ac_libs])dnl AS_VAR_POPDEF([ac_cflags])])dnl @@ -51,18 +51,18 @@ index 9364188e334..ad6a4f50fca 100644 dnl dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]]) diff --git a/configure.ac b/configure.ac -index 735dec3cc72..5bd9a75fa18 100644 +index cb9d4b2b9c..086cc8880c 100644 --- a/configure.ac +++ b/configure.ac -@@ -54,6 +54,7 @@ AC_ARG_WITH(gnutls, AS_HELP_STRING([--without-gnutls],[do not use GnuTLS (sch - AC_ARG_WITH(gsm, AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06.10 codec support)]), +@@ -56,6 +56,7 @@ AC_ARG_WITH(gsm, AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06 [if test "x$withval" = "xno"; then ac_cv_header_gsm_h=no; ac_cv_header_gsm_gsm_h=no; fi]) + AC_ARG_WITH(gssapi, AS_HELP_STRING([--without-gssapi],[do not use GSSAPI (Kerberos SSP support)])) AC_ARG_WITH(gstreamer, AS_HELP_STRING([--without-gstreamer],[do not use GStreamer (codecs support)])) +AC_ARG_WITH(gtk3, AS_HELP_STRING([--without-gtk3],[do not use gtk3 (gtk3 theming support)])) AC_ARG_WITH(hal, AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)])) AC_ARG_WITH(jpeg, AS_HELP_STRING([--without-jpeg],[do not use JPEG])) AC_ARG_WITH(krb5, AS_HELP_STRING([--without-krb5],[do not use krb5 (Kerberos)])) -@@ -1418,6 +1419,26 @@ fi +@@ -1489,6 +1490,26 @@ fi WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms2_cmsOpenProfileFromFile" != "yes"], [liblcms2 ${notice_platform}development files not found, Color Management won't be supported.]) @@ -89,7 +89,7 @@ index 735dec3cc72..5bd9a75fa18 100644 dnl **** Check for FreeType 2 **** if test "x$with_freetype" != "xno" then -@@ -3554,6 +3575,7 @@ WINE_CONFIG_TEST(dlls/userenv/tests) +@@ -3713,6 +3734,7 @@ WINE_CONFIG_TEST(dlls/userenv/tests) WINE_CONFIG_DLL(usp10,,[implib]) WINE_CONFIG_TEST(dlls/usp10/tests) WINE_CONFIG_LIB(uuid) @@ -99,7 +99,7 @@ index 735dec3cc72..5bd9a75fa18 100644 WINE_CONFIG_DLL(vbscript,,[clean]) diff --git a/dlls/uxtheme-gtk/Makefile.in b/dlls/uxtheme-gtk/Makefile.in new file mode 100644 -index 00000000000..07cf3a0fb57 +index 0000000000..07cf3a0fb5 --- /dev/null +++ b/dlls/uxtheme-gtk/Makefile.in @@ -0,0 +1,7 @@ @@ -112,14 +112,14 @@ index 00000000000..07cf3a0fb57 +RC_SRCS = version.rc diff --git a/dlls/uxtheme-gtk/uxtheme-gtk.spec b/dlls/uxtheme-gtk/uxtheme-gtk.spec new file mode 100644 -index 00000000000..b7db25411d0 +index 0000000000..b7db25411d --- /dev/null +++ b/dlls/uxtheme-gtk/uxtheme-gtk.spec @@ -0,0 +1 @@ +# Empty diff --git a/dlls/uxtheme-gtk/uxtheme.c b/dlls/uxtheme-gtk/uxtheme.c new file mode 100644 -index 00000000000..cd5e3c04cf1 +index 0000000000..cd5e3c04cf --- /dev/null +++ b/dlls/uxtheme-gtk/uxtheme.c @@ -0,0 +1,218 @@ @@ -343,7 +343,7 @@ index 00000000000..cd5e3c04cf1 +} diff --git a/dlls/uxtheme-gtk/uxthemegtk.h b/dlls/uxtheme-gtk/uxthemegtk.h new file mode 100644 -index 00000000000..42e47840878 +index 0000000000..42e4784087 --- /dev/null +++ b/dlls/uxtheme-gtk/uxthemegtk.h @@ -0,0 +1,88 @@ @@ -437,7 +437,7 @@ index 00000000000..42e47840878 +#endif /* UXTHEMEGTK_H */ diff --git a/dlls/uxtheme-gtk/version.rc b/dlls/uxtheme-gtk/version.rc new file mode 100644 -index 00000000000..38db52103be +index 0000000000..38db52103b --- /dev/null +++ b/dlls/uxtheme-gtk/version.rc @@ -0,0 +1,21 @@ @@ -463,5 +463,5 @@ index 00000000000..38db52103be + +#include -- -2.14.2 +2.16.1