Rebase against 40d4fbe45997a1820296e7909ba2212518bcfacc.

This commit is contained in:
Alistair Leslie-Hughes 2020-11-26 09:32:07 +11:00
parent 84bb779a9b
commit b9d3415f29
6 changed files with 8 additions and 123 deletions

View File

@ -1,8 +1,8 @@
From 0e097a430b44aaabdc51d779c81a5ac82aa730db Mon Sep 17 00:00:00 2001
From 1aa3dc5dc91f16a896a88c6fd1537b2e537415a6 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 6 Nov 2020 10:06:23 -0600
Subject: [PATCH 02/45] winegstreamer: Fixup raw audio caps to be compatible
with IMFMediaType.
Subject: [PATCH] winegstreamer: Fixup raw audio caps to be compatible with
IMFMediaType.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
@ -24,7 +24,7 @@ index 28e424439d8..75fc7dc90a8 100644
GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN;
IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN;
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 828958e47e2..272dbfbfca6 100644
index cdde75b9892..e0e1b410613 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -869,15 +869,20 @@ fail:
@ -33,7 +33,7 @@ index 828958e47e2..272dbfbfca6 100644
{
- GstCaps *current_caps = gst_pad_get_current_caps(stream->their_src);
+ GstCaps *base_caps = gst_pad_get_current_caps(stream->their_src);
IMFMediaTypeHandler *type_handler;
IMFMediaTypeHandler *type_handler = NULL;
IMFMediaType **stream_types = NULL;
IMFMediaType *stream_type = NULL;
+ GstCaps *current_caps = make_mf_compatible_caps(base_caps);
@ -118,5 +118,5 @@ index 3d224a5accc..7a877c2a416 100644
{
GUID major_type;
--
2.28.0
2.29.2

View File

@ -1,2 +1 @@
Fixes: [48291] Detroit: Become Human crashes on launch
Depends: winebuild-pe_syscall_thunks

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "92fb63d7754ba56b2604d253b600284c52ab82c6"
echo "40d4fbe45997a1820296e7909ba2212518bcfacc"
}
# Show version information
@ -274,7 +274,6 @@ patch_enable_all ()
enable_wineboot_HKEY_DYN_DATA="$1"
enable_wineboot_ProxySettings="$1"
enable_wineboot_drivers_etc_Stubs="$1"
enable_winebuild_pe_syscall_thunks="$1"
enable_winecfg_Libraries="$1"
enable_winecfg_Staging="$1"
enable_wined3d_Accounting="$1"
@ -904,9 +903,6 @@ patch_enable ()
wineboot-drivers_etc_Stubs)
enable_wineboot_drivers_etc_Stubs="$2"
;;
winebuild-pe_syscall_thunks)
enable_winebuild_pe_syscall_thunks="$2"
;;
winecfg-Libraries)
enable_winecfg_Libraries="$2"
;;
@ -1554,13 +1550,6 @@ if test "$enable_nvcuvid_CUDA_Video_Support" -eq 1; then
enable_nvapi_Stub_DLL=1
fi
if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
if test "$enable_winebuild_pe_syscall_thunks" -gt 1; then
abort "Patchset winebuild-pe_syscall_thunks disabled, but ntdll-Syscall_Emulation depends on that."
fi
enable_winebuild_pe_syscall_thunks=1
fi
if test "$enable_ntdll_NtDevicePath" -eq 1; then
if test "$enable_ntdll_Pipe_SpecialCharacters" -gt 1; then
abort "Patchset ntdll-Pipe_SpecialCharacters disabled, but ntdll-NtDevicePath depends on that."
@ -3213,29 +3202,8 @@ if test "$enable_ntdll_Status_Mapping" -eq 1; then
patch_apply ntdll-Status_Mapping/0001-ntdll-Return-STATUS_INVALID_DEVICE_REQUEST-when-tryi.patch
fi
# Patchset winebuild-pe_syscall_thunks
# |
# | This patchset fixes the following Wine bugs:
# | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare Iron) crash on startup unless '--no-
# | sandbox' is used (native API sandboxing/hooking scheme incompatible with Wine)
# | * [#42741] StarCraft I: 1.18 PTR fails to initialize ClientSdk.dll
# | * [#45349] Multiple applications and games crash due to missing support for 64-bit syscall thunks (StreetFighter V, World
# | of Warcraft)
# | * [#45573] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of syscall return instructions)
# | * [#45650] chromium 32-bit sandbox expects different syscall thunks depending on Windows version
# |
# | Modified files:
# | * dlls/ntdll/unix/virtual.c, tools/winebuild/import.c
# |
if test "$enable_winebuild_pe_syscall_thunks" -eq 1; then
patch_apply winebuild-pe_syscall_thunks/0002-winebuild-Call-__wine_syscall_dispatcher-through-the.patch
fi
# Patchset ntdll-Syscall_Emulation
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * winebuild-pe_syscall_thunks
# |
# | This patchset fixes the following Wine bugs:
# | * [#48291] Detroit: Become Human crashes on launch
# |

View File

@ -1,77 +0,0 @@
From 699069081ca58f401501f9fda60ccc6ef6187470 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jul 2020 14:43:01 +0300
Subject: [PATCH] winebuild: Call __wine_syscall_dispatcher through the fixed
address.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Based on a patch by Erich E. Hoover and Michael Müller.
Helps applications which directly load ntdll.dll from disk and
call syscall thunks from the loaded image.
---
dlls/ntdll/unix/virtual.c | 6 ++++--
tools/winebuild/import.c | 8 ++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 3af5241ee30..7b0ebf4dda7 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2815,20 +2815,22 @@ TEB *virtual_alloc_first_teb(void)
PEB *peb;
void *ptr;
NTSTATUS status;
- SIZE_T data_size = page_size;
+ SIZE_T data_size = page_size * 2;
SIZE_T peb_size = page_size * (is_win64 ? 1 : 2);
SIZE_T block_size = signal_stack_mask + 1;
SIZE_T total = 32 * block_size;
/* reserve space for shared user data */
status = NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&user_shared_data, 0, &data_size,
- MEM_RESERVE | MEM_COMMIT, PAGE_READONLY );
+ MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE );
if (status)
{
ERR( "wine: failed to map the shared user data: %08x\n", status );
exit(1);
}
+ *((void **)((char *)user_shared_data + 0x1000)) = __wine_syscall_dispatcher;
+
NtAllocateVirtualMemory( NtCurrentProcess(), &teb_block, 0, &total,
MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE );
teb_block_pos = 30;
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 461f1851d61..b90d93ca5db 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1710,10 +1710,10 @@ void output_syscalls( DLLSPEC *spec )
output( "\t.byte 0xc3\n" ); /* ret */
output( "\tjmp 1f\n" );
output( "\t.byte 0xc3\n" ); /* ret */
- if (target_platform == PLATFORM_WINDOWS)
+ if (target_platform == PLATFORM_WINDOWS || target_platform == PLATFORM_APPLE)
{
- output( "1:\t.byte 0xff,0x14,0x25\n" ); /* 1: callq *(__wine_syscall_dispatcher) */
- output( "\t.long __wine_syscall_dispatcher\n" );
+ output( "1:\t.byte 0xff,0x14,0x25\n" ); /* call *(user_shared_data + 0x1000) */
+ output( "\t.long 0x7ffe1000\n" );
}
else
{
@@ -1754,7 +1754,7 @@ void output_syscalls( DLLSPEC *spec )
output( "\t.align %d\n", get_alignment(16) );
output( "\t%s\n", func_declaration("__wine_syscall") );
output( "%s:\n", asm_name("__wine_syscall") );
- output( "\tjmp *(%s)\n", asm_name("__wine_syscall_dispatcher") );
+ output( "\tjmp *(0x7ffe1000)\n" );
output_function_size( "__wine_syscall" );
}
output( "\t.data\n" );
--
2.28.0

View File

@ -1,5 +0,0 @@
Fixes: [21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare Iron) crash on startup unless '--no-sandbox' is used (native API sandboxing/hooking scheme incompatible with Wine)
Fixes: [42741] StarCraft I: 1.18 PTR fails to initialize ClientSdk.dll
Fixes: [45349] Multiple applications and games crash due to missing support for 64-bit syscall thunks (StreetFighter V, World of Warcraft)
Fixes: [45573] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of syscall return instructions)
Fixes: [45650] chromium 32-bit sandbox expects different syscall thunks depending on Windows version

View File

@ -1 +1 @@
4807a8f588c67e2296474399368a96c0046120fd
40d4fbe45997a1820296e7909ba2212518bcfacc