mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
ntdll-Syscall_Emulation: Fix compilation.
This commit is contained in:
parent
3f29e4a76e
commit
33d3ba124f
@ -1,4 +1,4 @@
|
||||
From 45df10c65cee279caac2184919c81e6b473bd3f8 Mon Sep 17 00:00:00 2001
|
||||
From 24c407828bf5606e25e2905dfb920556ec1347b8 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.
|
||||
@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
|
||||
2 files changed, 193 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b759c57f4a0..b72e5c59274 100644
|
||||
index bd655accac3..d581dbc1eae 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -420,6 +420,7 @@ AC_CHECK_HEADERS(\
|
||||
@ -21,7 +21,7 @@ index b759c57f4a0..b72e5c59274 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 0204139631f..117c238cf44 100644
|
||||
index 0c291633ac6..a28762915be 100644
|
||||
--- a/dlls/ntdll/unix/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/unix/signal_x86_64.c
|
||||
@@ -27,6 +27,7 @@
|
||||
@ -56,14 +56,14 @@ index 0204139631f..117c238cf44 100644
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
@@ -1773,6 +1784,186 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
@@ -1783,6 +1794,186 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_SECCOMP
|
||||
+static void sigsys_handler( int signal, siginfo_t *siginfo, void *sigcontext )
|
||||
+{
|
||||
+ extern void __wine_syscall_dispatcher_prolog_end(void);
|
||||
+ extern const void *__wine_syscall_dispatcher_prolog_end_ptr;
|
||||
+ struct syscall_frame *frame = amd64_thread_data()->syscall_frame;
|
||||
+ ucontext_t *ctx = sigcontext;
|
||||
+
|
||||
@ -84,7 +84,7 @@ index 0204139631f..117c238cf44 100644
|
||||
+ ctx->uc_mcontext.gregs[REG_RCX] = (ULONG_PTR)frame;
|
||||
+ ctx->uc_mcontext.gregs[REG_R11] = frame->eflags;
|
||||
+ ctx->uc_mcontext.gregs[REG_EFL] &= ~0x100; /* clear single-step flag */
|
||||
+ ctx->uc_mcontext.gregs[REG_RIP] = (ULONG64)__wine_syscall_dispatcher_prolog_end;
|
||||
+ ctx->uc_mcontext.gregs[REG_RIP] = (ULONG64)__wine_syscall_dispatcher_prolog_end_ptr;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
@ -243,7 +243,7 @@ index 0204139631f..117c238cf44 100644
|
||||
|
||||
/***********************************************************************
|
||||
* handle_interrupt
|
||||
@@ -2448,6 +2639,7 @@ void signal_init_process(void)
|
||||
@@ -2460,6 +2651,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;
|
||||
@ -252,5 +252,5 @@ index 0204139631f..117c238cf44 100644
|
||||
|
||||
error:
|
||||
--
|
||||
2.41.0
|
||||
2.43.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user