Rebase against 07ecdf6ce27590edbcf4c6787abef28c1ccc2768.

This commit is contained in:
Alistair Leslie-Hughes 2021-08-27 09:26:57 +10:00
parent 8d34769ef1
commit 6f3825b11f
4 changed files with 22 additions and 37 deletions

View File

@ -1,4 +1,4 @@
From 00b8fb5b21f01a3279c108fd15d587dc9b57c799 Mon Sep 17 00:00:00 2001
From 39a48f5e0d94090a9461705feeb30759b366fc4d Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jul 2020 15:00:34 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
@ -7,13 +7,13 @@ Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
configure.ac | 1 +
dlls/ntdll/unix/signal_x86_64.c | 117 ++++++++++++++++++++++++++++++++
tools/winebuild/import.c | 3 +-
3 files changed, 120 insertions(+), 1 deletion(-)
3 files changed, 119 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index ade04399af0..3dabc0d33d1 100644
index ffd92c988ac..58d95ff6df3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -477,6 +477,7 @@ AC_CHECK_HEADERS(\
@@ -481,6 +481,7 @@ AC_CHECK_HEADERS(\
linux/joystick.h \
linux/major.h \
linux/param.h \
@ -22,7 +22,7 @@ index ade04399af0..3dabc0d33d1 100644
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index c36699589d9..e8c3099ae14 100644
index da548eb1a49..82e07eb25cf 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -28,6 +28,7 @@
@ -33,7 +33,7 @@ index c36699589d9..e8c3099ae14 100644
#include <pthread.h>
#include <signal.h>
#include <stdlib.h>
@@ -65,6 +66,13 @@
@@ -68,6 +69,13 @@
# include <mach/mach.h>
#endif
@ -47,7 +47,7 @@ index c36699589d9..e8c3099ae14 100644
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
@@ -2107,6 +2115,114 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
@@ -2426,6 +2434,114 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
return 0;
}
@ -162,7 +162,7 @@ index c36699589d9..e8c3099ae14 100644
/***********************************************************************
* handle_interrupt
@@ -2623,6 +2739,7 @@ void signal_init_process(void)
@@ -3004,6 +3120,7 @@ void signal_init_process(void)
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
@ -171,18 +171,18 @@ index c36699589d9..e8c3099ae14 100644
error:
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index a194ae50104..d5ef8fe2ba7 100644
index 6a158578143..dc04a321474 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1603,6 +1603,7 @@ static void output_syscall_dispatcher(void)
output( "\tleaq 0x28(%%rsp),%%rsi\n" ); /* first argument */
output( "\tmovq %%rcx,%%rsp\n" );
output( "\tmovq 0x00(%%rcx),%%rax\n" );
+ output( "\tsubq $0xf000,%%rax\n" );
output( "\tmovq 0x18(%%rcx),%%rdx\n" );
output( "\tmovl %%eax,%%ebx\n" );
output( "\tshrl $8,%%ebx\n" );
@@ -1942,7 +1943,7 @@ void output_syscalls( DLLSPEC *spec )
@@ -1419,7 +1419,6 @@ static int cmp_link_name( const void *e1, const void *e2 )
return strcmp( odp1->link_name, odp2->link_name );
}
-
/* output the functions for system calls */
void output_syscalls( DLLSPEC *spec )
{
@@ -1488,7 +1487,7 @@ void output_syscalls( DLLSPEC *spec )
* validate that instruction, we can just put a jmp there instead. */
output( "\t.byte 0x4c,0x8b,0xd1\n" ); /* movq %rcx,%r10 */
output( "\t.byte 0xb8\n" ); /* movl $i,%eax */
@ -192,5 +192,5 @@ index a194ae50104..d5ef8fe2ba7 100644
output( "\t.byte 0x75,0x03\n" ); /* jne 1f */
output( "\t.byte 0x0f,0x05\n" ); /* syscall */
--
2.30.2
2.32.0

View File

@ -1 +1,2 @@
Fixes: [48291] Detroit: Become Human crashes on launch
Disabled: True

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "4a18232e455d82c9334c71ebea833dfb5b50b19e"
echo "07ecdf6ce27590edbcf4c6787abef28c1ccc2768"
}
# Show version information
@ -166,7 +166,6 @@ patch_enable_all ()
enable_ntdll_RtlFirstFreeAce="$1"
enable_ntdll_RtlQueryPackageIdentity="$1"
enable_ntdll_Serial_Port_Detection="$1"
enable_ntdll_Syscall_Emulation="$1"
enable_ntdll_WRITECOPY="$1"
enable_ntdll_Zero_mod_name="$1"
enable_ntdll_ext4_case_folder="$1"
@ -538,9 +537,6 @@ patch_enable ()
ntdll-Serial_Port_Detection)
enable_ntdll_Serial_Port_Detection="$2"
;;
ntdll-Syscall_Emulation)
enable_ntdll_Syscall_Emulation="$2"
;;
ntdll-WRITECOPY)
enable_ntdll_WRITECOPY="$2"
;;
@ -2763,18 +2759,6 @@ if test "$enable_ntdll_Serial_Port_Detection" -eq 1; then
patch_apply ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch
fi
# Patchset ntdll-Syscall_Emulation
# |
# | This patchset fixes the following Wine bugs:
# | * [#48291] Detroit: Become Human crashes on launch
# |
# | Modified files:
# | * configure.ac, dlls/ntdll/unix/signal_x86_64.c, tools/winebuild/import.c
# |
if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
patch_apply ntdll-Syscall_Emulation/0001-ntdll-Support-x86_64-syscall-emulation.patch
fi
# Patchset ntdll-Zero_mod_name
# |
# | Modified files:

View File

@ -1 +1 @@
4a18232e455d82c9334c71ebea833dfb5b50b19e
07ecdf6ce27590edbcf4c6787abef28c1ccc2768