From dc9fa12a14e8ebdb9682a735718e8ac0b2815b9f Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 11 Dec 2019 09:43:03 +1100 Subject: [PATCH] Rebase against 626162f7db979360d231698ab1288cda97940bb9 --- ...rnel32-Implement-SetProcessDEPPolicy.patch | 30 +++++++++---------- ...t-for-hiding-wine-version-informatio.patch | 14 ++++----- ...ead-to-update-user_shared_data-time-.patch | 18 +++++------ patches/patchinstall.sh | 8 ++--- ...extremely-noisy-FIXME-in-wined3d_tex.patch | 26 ---------------- ...ub-implementation-of-Wow64Transition.patch | 24 ++++++++------- 6 files changed, 47 insertions(+), 73 deletions(-) delete mode 100644 patches/wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch diff --git a/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch b/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch index 000e1044..232a4090 100644 --- a/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch +++ b/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch @@ -1,17 +1,17 @@ -From 2399eb182bc12b6643953d9182c1c89ba42fcce3 Mon Sep 17 00:00:00 2001 +From 9d11c18b9b5a40114d28445a01347950de0d7df2 Mon Sep 17 00:00:00 2001 From: "Olivier F. R. Dierick" Date: Tue, 19 Apr 2016 07:25:39 +0200 Subject: [PATCH] kernel32: Implement SetProcessDEPPolicy(). --- - dlls/kernel32/process.c | 36 +++++++++++++++++++++++++++++++++--- - 1 file changed, 33 insertions(+), 3 deletions(-) + dlls/kernel32/process.c | 36 ++++++++++++++++++++++++++++++++---- + 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index e5e51a93d..e582c6d5b 100644 +index 71d6800f547..5423adced3c 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c -@@ -70,6 +70,8 @@ typedef struct +@@ -71,6 +71,8 @@ typedef struct DWORD dwReserved; } LOADPARMS32; @@ -20,7 +20,7 @@ index e5e51a93d..e582c6d5b 100644 HMODULE kernel32_handle = 0; SYSTEM_BASIC_INFORMATION system_info = { 0 }; -@@ -85,6 +87,7 @@ const WCHAR DIR_System[] = {'C',':','\\','w','i','n','d','o','w','s', +@@ -86,6 +88,7 @@ const WCHAR DIR_System[] = {'C',':','\\','w','i','n','d','o','w','s', #define PDB32_FILE_APIS_OEM 0x0040 /* File APIs are OEM */ #define PDB32_WIN32S_PROC 0x8000 /* Win32s process */ @@ -28,15 +28,15 @@ index e5e51a93d..e582c6d5b 100644 #ifdef __i386__ extern DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry ); -@@ -171,6 +174,7 @@ void * CDECL __wine_kernel_init(void) - static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2',0}; +@@ -177,7 +180,6 @@ void CDECL __wine_start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) + abort(); /* should not be reached */ + } - kernel32_handle = GetModuleHandleW(kernel32W); -+ IsWow64Process( GetCurrentProcess(), &is_wow64 ); - RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter ); - - return start_process_wrapper; -@@ -871,9 +875,35 @@ DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy(void) +- + /*********************************************************************** + * wait_input_idle + * +@@ -872,9 +874,35 @@ DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy(void) */ BOOL WINAPI SetProcessDEPPolicy(DWORD newDEP) { @@ -76,5 +76,5 @@ index e5e51a93d..e582c6d5b 100644 /********************************************************************** -- -2.24.0 +2.17.1 diff --git a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch index 76edf271..10f124fa 100644 --- a/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch +++ b/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch @@ -1,4 +1,4 @@ -From fff07f4d0dacb8a7fd23ef5d28fb7122a4d79488 Mon Sep 17 00:00:00 2001 +From 55a04c83c276864d4f442c3e9c33b36b4e9bdfb6 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 30 May 2015 02:23:15 +0200 Subject: [PATCH] ntdll: Add support for hiding wine version information from @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from 2 files changed, 104 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 10a542171..2f55f01a3 100644 +index 6ba7b15c09e..b90e1516614 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -70,6 +70,7 @@ const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\', @@ -147,8 +147,8 @@ index 10a542171..2f55f01a3 100644 *address = proc; ret = STATUS_SUCCESS; @@ -4349,6 +4445,8 @@ void __wine_process_init(void) - - kernel32_start_process = init_func(); + NtTerminateProcess( GetCurrentProcess(), status ); + } + hidden_exports_init( wm->ldr.FullDllName.Buffer ); + @@ -156,10 +156,10 @@ index 10a542171..2f55f01a3 100644 /* elevate process if necessary */ diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 3ce372ad7..5aec6dd71 100644 +index 84500602bb8..e8559c040a3 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -270,6 +270,11 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; +@@ -274,6 +274,11 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR); @@ -172,5 +172,5 @@ index 3ce372ad7..5aec6dd71 100644 extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck, LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN; -- -2.23.0 +2.17.1 diff --git a/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch b/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch index 575ab1a9..20e83cd8 100644 --- a/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch +++ b/patches/ntdll-User_Shared_Data/0003-ntdll-Create-thread-to-update-user_shared_data-time-.patch @@ -1,4 +1,4 @@ -From ac2ca5627dd005c600d16e736ff80c74d6e243f4 Mon Sep 17 00:00:00 2001 +From 7564fa0a561d40d940c36485e51dae017d883444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 5 May 2017 05:40:50 +0200 Subject: [PATCH] ntdll: Create thread to update user_shared_data time values @@ -12,7 +12,7 @@ Subject: [PATCH] ntdll: Create thread to update user_shared_data time values 4 files changed, 113 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 2f55f01a3..dbde28882 100644 +index b90e1516614..9d363817382 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -3824,6 +3824,36 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) @@ -53,18 +53,18 @@ index 2f55f01a3..dbde28882 100644 * LdrInitializeThunk (NTDLL.@) * @@ -4445,6 +4475,7 @@ void __wine_process_init(void) - - kernel32_start_process = init_func(); + NtTerminateProcess( GetCurrentProcess(), status ); + } + user_shared_data_init(); hidden_exports_init( wm->ldr.FullDllName.Buffer ); virtual_set_large_address_space(); diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 5aec6dd71..b36bba96d 100644 +index e8559c040a3..a8253669925 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -197,6 +197,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN; +@@ -200,6 +200,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN; extern void virtual_fill_image_information( const pe_image_info_t *pe_info, SECTION_IMAGE_INFORMATION *info ) DECLSPEC_HIDDEN; extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN; @@ -75,7 +75,7 @@ index 5aec6dd71..b36bba96d 100644 /* completion */ extern NTSTATUS NTDLL_AddCompletion( HANDLE hFile, ULONG_PTR CompletionValue, diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 01b58ebea..a05d2d161 100644 +index 994bcdb651d..ca01e0df8c2 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -47,6 +47,7 @@ @@ -183,7 +183,7 @@ index 01b58ebea..a05d2d161 100644 { BOOL ret = FALSE; diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c -index 68249de90..54eb6c7ff 100644 +index cb869feff02..418a1022d19 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -2102,6 +2102,7 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) @@ -219,5 +219,5 @@ index 68249de90..54eb6c7ff 100644 } -- -2.23.0 +2.17.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 53491071..03b75440 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "f870aa4988fa8e980919c144682da72865364ff0" + echo "626162f7db979360d231698ab1288cda97940bb9" } # Show version information @@ -2317,7 +2317,7 @@ fi if test "$enable_comctrl_rebar_capture" -eq 1; then patch_apply comctrl-rebar-capture/0001-comctl32-Fixed-rebar-behaviour-when-there-s-capture-.patch ( - printf '%s\n' '+ { "Andrew Shadura", "comctl32: Fixed rebar behaviour when there'\''s capture and no drag.", 1 },'; + printf '%s\n' '+ { "Andrej Shadura", "comctl32: Fixed rebar behaviour when there'\''s capture and no drag.", 1 },'; ) >> "$patchlist" fi @@ -6750,14 +6750,12 @@ fi # Patchset wined3d-Silence_FIXMEs # | # | Modified files: -# | * dlls/wined3d/surface.c, dlls/wined3d/texture.c +# | * dlls/wined3d/surface.c # | if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then patch_apply wined3d-Silence_FIXMEs/0004-wined3d-Print-FIXME-only-once-in-surface_cpu_blt.patch - patch_apply wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch ( printf '%s\n' '+ { "Christian Costa", "wined3d: Print FIXME only once in surface_cpu_blt.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence extremely noisy FIXME in wined3d_texture_add_dirty_region.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch b/patches/wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch deleted file mode 100644 index ce3be3a6..00000000 --- a/patches/wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bf91daf7caca1f40a645308c3d9e6bb255aba120 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Mon, 21 Mar 2016 18:27:59 +0100 -Subject: [PATCH] wined3d: Silence extremely noisy FIXME in - wined3d_texture_add_dirty_region. - ---- - dlls/wined3d/texture.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c -index 57416a67de..414b6ff12f 100644 ---- a/dlls/wined3d/texture.c -+++ b/dlls/wined3d/texture.c -@@ -1844,7 +1844,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, - WARN("Invalid dirty_region %s specified.\n", debug_box(dirty_region)); - return WINED3DERR_INVALIDCALL; - } -- FIXME("Ignoring dirty_region %s.\n", debug_box(dirty_region)); -+ WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region)); - } - - wined3d_cs_emit_add_dirty_texture_region(texture->resource.device->cs, texture, layer); --- -2.23.0 - diff --git a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch index 7e126948..04b5bbf2 100644 --- a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch +++ b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch @@ -1,18 +1,18 @@ -From 47b34421517920aee7eecd87cc32c4d9a7457cfc Mon Sep 17 00:00:00 2001 +From b291e0c2c119d24b4a5119604d84bd62023a5c71 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 8 Aug 2018 20:00:15 -0500 Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. --- - dlls/ntdll/loader.c | 11 ++++++++++- + dlls/ntdll/loader.c | 12 +++++++++++- dlls/ntdll/ntdll.spec | 1 + - 2 files changed, 11 insertions(+), 1 deletion(-) + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index c2810d50b..1da6b2934 100644 +index 5e4ef0f2b8d..13a9b6b8707 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -4249,18 +4249,20 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +@@ -4441,18 +4441,20 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) return TRUE; } @@ -34,7 +34,7 @@ index c2810d50b..1da6b2934 100644 NTSTATUS status; ANSI_STRING func_name; UNICODE_STRING nt_name; -@@ -4299,6 +4301,13 @@ void __wine_process_init(void) +@@ -4498,7 +4500,15 @@ void __wine_process_init(void) MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); exit(1); } @@ -45,14 +45,16 @@ index c2810d50b..1da6b2934 100644 + else + WARN( "could not load wow64cpu.dll, status %#x\n", status ); + - RtlInitAnsiString( &func_name, "__wine_kernel_init" ); + RtlInitAnsiString( &func_name, "__wine_start_process" ); ++ if ((status = LdrGetProcedureAddress( wm->ldr.BaseAddress, &func_name, - 0, (void **)&init_func )) != STATUS_SUCCESS) + 0, (void **)&kernel32_start_process )) != STATUS_SUCCESS) + { diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 5057e2b07..b7a502c62 100644 +index bb634af5e46..44bbdcefb2a 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1085,6 +1085,7 @@ +@@ -1090,6 +1090,7 @@ @ stdcall WinSqmIsOptedIn() @ stdcall WinSqmSetDWORD(ptr long long) @ stdcall WinSqmStartSession(ptr long long) @@ -61,5 +63,5 @@ index 5057e2b07..b7a502c62 100644 @ stdcall -private ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck @ stdcall -private ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm -- -2.23.0 +2.17.1