Rebase against 3c86adab766e3bc7c91da088c2dd6bc41a917055.

This commit is contained in:
Zebediah Figura
2020-06-01 22:31:00 -05:00
parent f132e60b9d
commit c81093882b
17 changed files with 224 additions and 257 deletions

View File

@@ -1,4 +1,4 @@
From e193e84b7fb97f6f734b19d5bf2feb403d832abe Mon Sep 17 00:00:00 2001
From 06b1233cbd6d149b30958e5ff35e8fa82c1896d0 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 30 Dec 2019 13:27:53 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
@@ -15,10 +15,10 @@ is used for trapping syscalls.
3 files changed, 117 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e6245d8163f..485219e23b3 100644
index 83c451e0870..d75433751bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,6 +474,7 @@ AC_CHECK_HEADERS(\
@@ -464,6 +464,7 @@ AC_CHECK_HEADERS(\
linux/joystick.h \
linux/major.h \
linux/param.h \
@@ -27,7 +27,7 @@ index e6245d8163f..485219e23b3 100644
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 26d688c3abe..87c5a99a65e 100644
index d42438f88af..36bc2ef656a 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -24,6 +24,7 @@
@@ -52,7 +52,7 @@ index 26d688c3abe..87c5a99a65e 100644
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
@@ -3096,6 +3104,38 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext )
@@ -3089,6 +3097,104 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *ucontext )
restore_context( &context, ucontext );
}
@@ -88,13 +88,7 @@ index 26d688c3abe..87c5a99a65e 100644
+ ctx->uc_mcontext.gregs[REG_RIP] = (ULONG64)__wine_syscall_dispatcher;
+}
+#endif
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
@@ -3266,6 +3306,72 @@ void signal_init_thread( TEB *teb )
#endif
}
+
+#ifdef HAVE_SECCOMP
+static int sc_seccomp(unsigned int operation, unsigned int flags, void *args)
+{
@@ -160,11 +154,10 @@ index 26d688c3abe..87c5a99a65e 100644
+ WARN("Built without seccomp.\n");
+#endif
+}
+
/**********************************************************************
* signal_init_process
*/
@@ -3298,6 +3404,9 @@ void signal_init_process(void)
/***********************************************************************
* __wine_set_signal_handler (NTDLL.@)
@@ -3134,6 +3240,9 @@ void signal_init_process(void)
sig_act.sa_sigaction = trap_handler;
if (sigaction( SIGTRAP, &sig_act, NULL ) == -1) goto error;
#endif
@@ -216,5 +209,5 @@ index 9cc4698d0d7..c572fe49923 100644
put_byte( 0x08 ); put_byte( 0x03 ); put_byte( 0xfe );
put_byte( 0x7f ); put_byte( 0x01 );
--
2.25.3
2.26.2