From 6f185a694cf917b6777db8015df5d1ca1b24b7f0 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 22 May 2019 08:24:22 +1000 Subject: [PATCH] Rebase against 6a610a325809d47f48bc72f3a757e1a62b193ea8 --- patches/patchinstall.sh | 4 +- ...registry-keys-for-display-devices-an.patch | 20 +++---- ...-not-abuse-WOW32Reserved-field-for-1.patch | 60 +++++++++---------- 3 files changed, 41 insertions(+), 43 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0519d198..f737ee57 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "21ae9ba1ba8ddba3ba49e916ef2b7fbd5ae9713d" + echo "6a610a325809d47f48bc72f3a757e1a62b193ea8" } # Show version information @@ -2262,7 +2262,7 @@ fi # | * [#46564] Add BCryptDestroySecret/BCryptSecretAgreement stubs. # | # | Modified files: -# | * dlls/bcrypt/bcrypt.spec, dlls/bcrypt/bcrypt_main.c, include/bcrypt.h +# | * dlls/bcrypt/bcrypt.spec, dlls/bcrypt/bcrypt_main.c, dlls/ncrypt/ncrypt.spec, include/bcrypt.h # | if test "$enable_bcrypt_BCryptSecretAgreement" -eq 1; then patch_apply bcrypt-BCryptSecretAgreement/0001-bcrypt-Add-BCryptDestroySecret-BCryptSecretAgreement.patch diff --git a/patches/setupapi-Display_Device/0001-setupapi-Create-registry-keys-for-display-devices-an.patch b/patches/setupapi-Display_Device/0001-setupapi-Create-registry-keys-for-display-devices-an.patch index e4b6a9b0..d70c9e98 100644 --- a/patches/setupapi-Display_Device/0001-setupapi-Create-registry-keys-for-display-devices-an.patch +++ b/patches/setupapi-Display_Device/0001-setupapi-Create-registry-keys-for-display-devices-an.patch @@ -1,4 +1,4 @@ -From e9814d73df6ba4589a7da3138c2c0db521e0fc4a Mon Sep 17 00:00:00 2001 +From c9b3268ab753c5d00ba39968eba4311fdc6e6100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 11 Feb 2016 03:17:09 +0100 Subject: [PATCH] setupapi: Create registry keys for display devices and @@ -10,12 +10,12 @@ Subject: [PATCH] setupapi: Create registry keys for display devices and 2 files changed, 98 insertions(+), 6 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c -index 537b3351..19e56f83 100644 +index 9b83c3519be..e666d3bb008 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c -@@ -95,6 +95,15 @@ static const WCHAR Control[] = {'C','o','n','t','r','o','l',0}; - static const WCHAR Linked[] = {'L','i','n','k','e','d',0}; - static const WCHAR emptyW[] = {0}; +@@ -111,6 +111,15 @@ struct driver + WCHAR description[LINE_LEN]; + }; +/* GUIDs */ +static const WCHAR displayGUIDW[] = {'{','4','d','3','6','e','9','6','8','-','e','3','2','5','-', @@ -29,7 +29,7 @@ index 537b3351..19e56f83 100644 /* is used to identify if a DeviceInfoSet pointer is valid or not */ #define SETUP_DEVICE_INFO_SET_MAGIC 0xd00ff056 -@@ -190,6 +199,90 @@ static struct device_iface *get_device_iface(HDEVINFO devinfo, const SP_DEVICE_I +@@ -210,6 +219,90 @@ static struct device_iface *get_device_iface(HDEVINFO devinfo, const SP_DEVICE_I return (struct device_iface *)data->Reserved; } @@ -120,7 +120,7 @@ index 537b3351..19e56f83 100644 static inline void copy_device_data(SP_DEVINFO_DATA *data, const struct device *device) { data->ClassGuid = device->class; -@@ -503,8 +596,7 @@ static HKEY SETUPDI_CreateDevKey(struct device *device) +@@ -523,8 +616,7 @@ static HKEY SETUPDI_CreateDevKey(struct device *device) HKEY enumKey, key = INVALID_HANDLE_VALUE; LONG l; @@ -130,7 +130,7 @@ index 537b3351..19e56f83 100644 if (!l) { RegCreateKeyExW(enumKey, device->instanceId, 0, NULL, 0, -@@ -2099,8 +2191,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet, +@@ -2143,8 +2235,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet, TRACE("%s\n", debugstr_w(enumstr)); @@ -140,7 +140,7 @@ index 537b3351..19e56f83 100644 for (i = 0; !l; i++) { len = ARRAY_SIZE(subKeyName); -@@ -2320,8 +2411,7 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class, +@@ -2364,8 +2455,7 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class, TRACE("%p, %s, %s, %08x\n", DeviceInfoSet, debugstr_guid(class), debugstr_w(enumstr), flags); @@ -151,7 +151,7 @@ index 537b3351..19e56f83 100644 { if (enumstr) diff --git a/loader/wine.inf.in b/loader/wine.inf.in -index 1fe8b115..93c3afb3 100644 +index 4d28a93c359..7a44e0fe713 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -465,6 +465,8 @@ HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"Locale",0x1 diff --git a/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch b/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch index 25b3f491..7e149c62 100644 --- a/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch +++ b/patches/winebuild-Fake_Dlls/0002-krnl386.exe16-Do-not-abuse-WOW32Reserved-field-for-1.patch @@ -1,8 +1,8 @@ -From e36139ae4147ded5ca4e18239ff87e02dac0af51 Mon Sep 17 00:00:00 2001 +From 7d097bf5d20c03203d455501bb04151c3faf3dcb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 16 May 2017 04:37:52 +0200 -Subject: krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit stack - address. +Subject: [PATCH] krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit + stack address. --- dlls/dbghelp/cpu_i386.c | 6 ++--- @@ -24,7 +24,7 @@ Subject: krnl386.exe16: Do not abuse WOW32Reserved field for 16-bit stack 16 files changed, 78 insertions(+), 77 deletions(-) diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c -index 9704cfda5..7a3e08a99 100644 +index 9704cfda538..7a3e08a999e 100644 --- a/dlls/dbghelp/cpu_i386.c +++ b/dlls/dbghelp/cpu_i386.c @@ -213,16 +213,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame, @@ -48,7 +48,7 @@ index 9704cfda5..7a3e08a99 100644 } next_switch = p; diff --git a/dlls/krnl386.exe16/kernel.c b/dlls/krnl386.exe16/kernel.c -index 0a66d1e61..17b0c156c 100644 +index 0a66d1e611a..17b0c156c07 100644 --- a/dlls/krnl386.exe16/kernel.c +++ b/dlls/krnl386.exe16/kernel.c @@ -45,8 +45,8 @@ static void thread_attach(void) @@ -72,7 +72,7 @@ index 0a66d1e61..17b0c156c 100644 } diff --git a/dlls/krnl386.exe16/kernel16_private.h b/dlls/krnl386.exe16/kernel16_private.h -index 284b06374..2f5b006e5 100644 +index 284b063741b..2f5b006e5ad 100644 --- a/dlls/krnl386.exe16/kernel16_private.h +++ b/dlls/krnl386.exe16/kernel16_private.h @@ -170,7 +170,7 @@ extern THHOOK *pThhook DECLSPEC_HIDDEN; @@ -119,7 +119,7 @@ index 284b06374..2f5b006e5 100644 static inline struct kernel_thread_data *kernel_get_thread_data(void) diff --git a/dlls/krnl386.exe16/ne_module.c b/dlls/krnl386.exe16/ne_module.c -index 357a0e98d..4b0b6a0b1 100644 +index 357a0e98d4a..4b0b6a0b114 100644 --- a/dlls/krnl386.exe16/ne_module.c +++ b/dlls/krnl386.exe16/ne_module.c @@ -1217,7 +1217,7 @@ DWORD NE_StartTask(void) @@ -143,7 +143,7 @@ index 357a0e98d..4b0b6a0b1 100644 WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context ); ExitThread( LOWORD(context.Eax) ); diff --git a/dlls/krnl386.exe16/ne_segment.c b/dlls/krnl386.exe16/ne_segment.c -index 000c5760f..30ace05e5 100644 +index 000c5760f84..30ace05e57e 100644 --- a/dlls/krnl386.exe16/ne_segment.c +++ b/dlls/krnl386.exe16/ne_segment.c @@ -378,9 +378,9 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum ) @@ -209,7 +209,7 @@ index 000c5760f..30ace05e5 100644 args[7] = HIWORD(dwReason); args[6] = LOWORD(dwReason); diff --git a/dlls/krnl386.exe16/task.c b/dlls/krnl386.exe16/task.c -index 84d4bf33a..ff69b37cd 100644 +index 84d4bf33a4c..ff69b37cd86 100644 --- a/dlls/krnl386.exe16/task.c +++ b/dlls/krnl386.exe16/task.c @@ -630,7 +630,7 @@ void WINAPI InitTask16( CONTEXT *context ) @@ -267,7 +267,7 @@ index 84d4bf33a..ff69b37cd 100644 context->Esp = OFFSETOF(pData->old_ss_sp) - sizeof(DWORD); /*ret addr*/ pData->old_ss_sp = 0; diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c -index c8ad3824c..69f6f3b2e 100644 +index c8ad3824c0f..69f6f3b2e8c 100644 --- a/dlls/krnl386.exe16/thunk.c +++ b/dlls/krnl386.exe16/thunk.c @@ -435,7 +435,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT *context ) @@ -413,7 +413,7 @@ index c8ad3824c..69f6f3b2e 100644 if (OFFSETOF(frame32->frame16) > lpbuf[2]) { diff --git a/dlls/krnl386.exe16/wowthunk.c b/dlls/krnl386.exe16/wowthunk.c -index da829950b..cf9caad44 100644 +index da829950bed..cf9caad44b2 100644 --- a/dlls/krnl386.exe16/wowthunk.c +++ b/dlls/krnl386.exe16/wowthunk.c @@ -135,7 +135,7 @@ static DWORD call16_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RE @@ -473,7 +473,7 @@ index da829950b..cf9caad44 100644 } } diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c -index b4e88d125..7c6e1b50c 100644 +index b4e88d125f1..7c6e1b50cd4 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -846,7 +846,7 @@ static inline void *init_handler( const ucontext_t *sigcontext, WORD *fs, WORD * @@ -486,7 +486,7 @@ index b4e88d125..7c6e1b50c 100644 return (void *)(ESP_sig(sigcontext) & ~3); } diff --git a/dlls/system.drv16/system.c b/dlls/system.drv16/system.c -index b6fd51c05..695ad7b60 100644 +index b6fd51c05f0..695ad7b6003 100644 --- a/dlls/system.drv16/system.c +++ b/dlls/system.drv16/system.c @@ -70,7 +70,7 @@ static void CALLBACK SYSTEM_TimerTick( LPVOID arg, DWORD low, DWORD high ) @@ -499,10 +499,10 @@ index b6fd51c05..695ad7b60 100644 WOWCallback16Ex( 0, WCB16_REGS, 0, NULL, (DWORD *)&context ); diff --git a/dlls/toolhelp.dll16/toolhelp.c b/dlls/toolhelp.dll16/toolhelp.c -index 47c2d2da0..9c05d7921 100644 +index 02e8d6a8d53..2bccaa63e27 100644 --- a/dlls/toolhelp.dll16/toolhelp.c +++ b/dlls/toolhelp.dll16/toolhelp.c -@@ -461,8 +461,8 @@ BOOL16 WINAPI TaskNext16( TASKENTRY *lpte ) +@@ -460,8 +460,8 @@ BOOL16 WINAPI TaskNext16( TASKENTRY *lpte ) lpte->hTaskParent = pTask->hParent; lpte->hInst = pTask->hInstance; lpte->hModule = pTask->hModule; @@ -513,7 +513,7 @@ index 47c2d2da0..9c05d7921 100644 lpte->wStackTop = pInstData->stacktop; lpte->wStackMinimum = pInstData->stackmin; lpte->wStackBottom = pInstData->stackbottom; -@@ -694,7 +694,7 @@ BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo ) +@@ -687,7 +687,7 @@ BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo ) */ BOOL16 WINAPI SystemHeapInfo16( SYSHEAPINFO *pHeapInfo ) { @@ -523,17 +523,15 @@ index 47c2d2da0..9c05d7921 100644 WORD user = LoadLibrary16( "USER.EXE" ); WORD gdi = LoadLibrary16( "GDI.EXE" ); diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c -index c0b60ad95..bdbac17b5 100644 +index dd15707e9f4..37666e72c1c 100644 --- a/dlls/user.exe16/message.c +++ b/dlls/user.exe16/message.c -@@ -250,13 +250,13 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPA +@@ -242,11 +242,11 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPA /* Window procedures want ax = hInstance, ds = es = ss */ memset(&context, 0, sizeof(context)); - context.SegDs = context.SegEs = SELECTOROF(NtCurrentTeb()->WOW32Reserved); + context.SegDs = context.SegEs = SELECTOROF(NtCurrentTeb()->SystemReserved1[0]); - context.SegFs = wine_get_fs(); - context.SegGs = wine_get_gs(); if (!(context.Eax = GetWindowWord( HWND_32(hwnd), GWLP_HINSTANCE ))) context.Eax = context.SegDs; context.SegCs = SELECTOROF(func); context.Eip = OFFSETOF(func); @@ -542,7 +540,7 @@ index c0b60ad95..bdbac17b5 100644 if (lParam) { -@@ -279,7 +279,7 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPA +@@ -269,7 +269,7 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPA if (size) { memcpy( &args.u, MapSL(lParam), size ); @@ -551,7 +549,7 @@ index c0b60ad95..bdbac17b5 100644 } } -@@ -2104,7 +2104,7 @@ static LRESULT combo_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, +@@ -2094,7 +2094,7 @@ static LRESULT combo_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, static void edit_lock_buffer( HWND hwnd ) { @@ -560,7 +558,7 @@ index c0b60ad95..bdbac17b5 100644 HLOCAL16 hloc16 = GetWindowWord( hwnd, GWW_HANDLE16 ); HANDLE16 oldDS; HLOCAL hloc32; -@@ -2130,7 +2130,7 @@ static void edit_lock_buffer( HWND hwnd ) +@@ -2120,7 +2120,7 @@ static void edit_lock_buffer( HWND hwnd ) static void edit_unlock_buffer( HWND hwnd ) { @@ -569,7 +567,7 @@ index c0b60ad95..bdbac17b5 100644 HLOCAL16 hloc16 = GetWindowWord( hwnd, GWW_HANDLE16 ); HANDLE16 oldDS; HLOCAL hloc32; -@@ -2167,7 +2167,7 @@ static HLOCAL16 edit_get_handle( HWND hwnd ) +@@ -2157,7 +2157,7 @@ static HLOCAL16 edit_get_handle( HWND hwnd ) if (!(hloc = (HLOCAL)wow_handlers32.edit_proc( hwnd, EM_GETHANDLE, 0, 0, FALSE ))) return 0; alloc_size = LocalSize( hloc ); @@ -578,7 +576,7 @@ index c0b60ad95..bdbac17b5 100644 oldDS = stack16->ds; stack16->ds = GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); -@@ -2205,7 +2205,7 @@ done: +@@ -2195,7 +2195,7 @@ done: static void edit_set_handle( HWND hwnd, HLOCAL16 hloc16 ) { @@ -587,7 +585,7 @@ index c0b60ad95..bdbac17b5 100644 HINSTANCE16 hInstance = GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); HANDLE16 oldDS = stack16->ds; HLOCAL hloc32; -@@ -2235,7 +2235,7 @@ static void edit_destroy_handle( HWND hwnd ) +@@ -2225,7 +2225,7 @@ static void edit_destroy_handle( HWND hwnd ) HLOCAL16 hloc16 = GetWindowWord( hwnd, GWW_HANDLE16 ); if (hloc16) { @@ -597,7 +595,7 @@ index c0b60ad95..bdbac17b5 100644 stack16->ds = GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c -index 27b927938..deec596f7 100644 +index 27b92793836..deec596f766 100644 --- a/dlls/user.exe16/user.c +++ b/dlls/user.exe16/user.c @@ -1394,7 +1394,7 @@ DWORD WINAPI GetTabbedTextExtent16( HDC16 hdc, LPCSTR lpstr, INT16 count, @@ -619,7 +617,7 @@ index 27b927938..deec596f7 100644 int userPercent, gdiPercent; diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c -index 10f1389f0..a15bf57e4 100644 +index 10f1389f0a7..a15bf57e482 100644 --- a/dlls/user.exe16/window.c +++ b/dlls/user.exe16/window.c @@ -455,7 +455,7 @@ HWND16 WINAPI GetParent16( HWND16 hwnd ) @@ -632,7 +630,7 @@ index 10f1389f0..a15bf57e4 100644 /* don't use WIN_Handle32 here, we don't care about the full handle */ return IsWindow( HWND_32(hwnd) ); diff --git a/include/winternl.h b/include/winternl.h -index e7f89b005..0e8cf30d7 100644 +index 2d777e0166c..e302f5678d3 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -360,7 +360,7 @@ typedef struct _TEB @@ -645,7 +643,7 @@ index e7f89b005..0e8cf30d7 100644 ACTIVATION_CONTEXT_STACK ActivationContextStack; /* 1a8/02c8 */ BYTE SpareBytes1[24]; /* 1bc/02e8 */ diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c -index 3b1f4cd18..35cbc440e 100644 +index 3b1f4cd18e0..35cbc440ec3 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -31,7 +31,7 @@ @@ -658,5 +656,5 @@ index 3b1f4cd18..35cbc440e 100644 /* fix this if the x86_thread_data structure is changed */ #define GS_OFFSET 0x1d8 /* FIELD_OFFSET(TEB,SystemReserved2) + FIELD_OFFSET(struct x86_thread_data,gs) */ -- -2.21.0 +2.20.1