Rebase against c18152630362c1bff1813fe8ad5c75ffb8dbb7cf.

This commit is contained in:
Zebediah Figura 2020-04-16 17:42:47 -05:00
parent a23c076055
commit 767b90c5dd
6 changed files with 58 additions and 68 deletions

View File

@ -1,4 +1,4 @@
From 08285be7bf233a38a95b0902c6bac9b24e1fe34f Mon Sep 17 00:00:00 2001
From 5209675d0aac52f20b5af95ef39f85f000b79434 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 22:04:29 -0500
Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
@ -9,7 +9,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for thread objects.
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/server/thread.c b/server/thread.c
index f5bf4a8d2..b3da4a2f4 100644
index dd94522a2b9..5c52cca0923 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -133,6 +133,7 @@ static const struct object_ops thread_apc_ops =
@ -29,15 +29,15 @@ index f5bf4a8d2..b3da4a2f4 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -186,6 +187,7 @@ static inline void init_thread_structure( struct thread *thread )
thread->suspend_context = NULL;
@@ -185,6 +186,7 @@ static inline void init_thread_structure( struct thread *thread )
thread->context = NULL;
thread->teb = 0;
thread->entry_point = 0;
+ thread->esync_fd = -1;
thread->debug_ctx = NULL;
thread->system_regs = 0;
thread->queue = NULL;
@@ -292,6 +294,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
@@ -293,6 +295,9 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
return NULL;
}
@ -47,7 +47,7 @@ index f5bf4a8d2..b3da4a2f4 100644
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
add_process_thread( thread->process, thread );
return thread;
@@ -370,6 +375,9 @@ static void destroy_thread( struct object *obj )
@@ -373,6 +378,9 @@ static void destroy_thread( struct object *obj )
if (thread->exit_poll) remove_timeout_user( thread->exit_poll );
if (thread->id) free_ptid( thread->id );
if (thread->token) release_object( thread->token );
@ -57,7 +57,7 @@ index f5bf4a8d2..b3da4a2f4 100644
}
/* dump a thread on stdout for debugging purposes */
@@ -395,6 +403,12 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -398,6 +406,12 @@ static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
return mythread->state == TERMINATED && !mythread->exit_poll;
}
@ -71,7 +71,7 @@ index f5bf4a8d2..b3da4a2f4 100644
{
if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | THREAD_QUERY_INFORMATION | THREAD_GET_CONTEXT;
diff --git a/server/thread.h b/server/thread.h
index 382b10b5b..dd06333fd 100644
index 8029d65df44..21b303aa20a 100644
--- a/server/thread.h
+++ b/server/thread.h
@@ -54,6 +54,7 @@ struct thread
@ -83,5 +83,5 @@ index 382b10b5b..dd06333fd 100644
unsigned int system_regs; /* which system regs have been set */
struct msg_queue *queue; /* message queue */
--
2.22.0
2.26.0

View File

@ -1,4 +1,4 @@
From f46ec161cac98de03cae27a70cea043538359cc2 Mon Sep 17 00:00:00 2001
From c1c2b51e391501ebf09816dfd6783bc648a44c1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:30:27 +0200
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
@ -6,11 +6,11 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
---
dlls/kernel32/tests/loader.c | 76 ++++++++++++++++++++++++++++++++++++
dlls/ntdll/loader.c | 65 ++++++++++++++++++++++++++++++
include/winternl.h | 5 ++-
3 files changed, 145 insertions(+), 1 deletion(-)
include/winternl.h | 2 +-
3 files changed, 142 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index dc2d34c9b00..753159a04ce 100644
index 35c6b3c0996..17d742daaa7 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -30,6 +30,7 @@
@ -21,7 +21,7 @@ index dc2d34c9b00..753159a04ce 100644
#include "wine/test.h"
#include "delayloadhandler.h"
@@ -4064,6 +4065,79 @@ static void test_LoadPackagedLibrary(void)
@@ -3934,6 +3935,79 @@ static void test_LoadPackagedLibrary(void)
h, GetLastError());
}
@ -101,7 +101,7 @@ index dc2d34c9b00..753159a04ce 100644
START_TEST(loader)
{
int argc;
@@ -4137,10 +4211,12 @@ START_TEST(loader)
@@ -4006,10 +4080,12 @@ START_TEST(loader)
test_InMemoryOrderModuleList();
test_LoadPackagedLibrary();
test_wow64_redirection();
@ -115,10 +115,10 @@ index dc2d34c9b00..753159a04ce 100644
test_Loader();
}
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index a1cc673d1fe..7328c601c9c 100644
index 0568be63ad8..004d31f9367 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -121,6 +121,9 @@ static const char * const reason_names[] =
@@ -118,6 +118,9 @@ static const char * const reason_names[] =
static const WCHAR dllW[] = {'.','d','l','l',0};
@ -128,7 +128,7 @@ index a1cc673d1fe..7328c601c9c 100644
/* internal representation of 32bit modules. per process. */
typedef struct _wine_modref
{
@@ -460,6 +463,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
@@ -458,6 +461,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
}
}
@ -181,7 +181,7 @@ index a1cc673d1fe..7328c601c9c 100644
/*************************************************************************
* get_modref
*
@@ -1218,7 +1267,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1216,7 +1265,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderModuleList);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderModuleList);
@ -194,15 +194,15 @@ index a1cc673d1fe..7328c601c9c 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -1912,6 +1966,7 @@ static void load_builtin_callback( void *module, const char *filename )
/* the module has only be inserted in the load & memory order lists */
@@ -2015,6 +2069,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
/* the module has only been inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
+ RemoveEntryList(&wm->ldr.HashLinks);
/* FIXME: free the modref */
builtin_load_info->status = STATUS_DLL_NOT_FOUND;
return;
@@ -2435,6 +2490,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
return status;
}
@@ -2565,6 +2620,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
@ -210,7 +210,7 @@ index a1cc673d1fe..7328c601c9c 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3627,6 +3683,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3783,6 +3839,7 @@ static void free_modref( WINE_MODREF *wm )
{
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
@ -218,7 +218,7 @@ index a1cc673d1fe..7328c601c9c 100644
if (wm->ldr.InInitializationOrderModuleList.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderModuleList);
@@ -4376,6 +4433,7 @@ void __wine_process_init(void)
@@ -4476,6 +4533,7 @@ void __wine_process_init(void)
SIZE_T info_size;
TEB *teb = thread_init();
PEB *peb = teb->Peb;
@ -226,7 +226,7 @@ index a1cc673d1fe..7328c601c9c 100644
/* setup the server connection */
server_init_process();
@@ -4399,6 +4457,10 @@ void __wine_process_init(void)
@@ -4497,6 +4555,10 @@ void __wine_process_init(void)
load_global_options();
version_init();
@ -237,7 +237,7 @@ index a1cc673d1fe..7328c601c9c 100644
/* setup the load callback and create ntdll modref */
RtlInitUnicodeString( &nt_name, ntdllW );
default_load_info.filename = &nt_name;
@@ -4486,5 +4548,8 @@ void __wine_process_init(void)
@@ -4571,5 +4633,8 @@ void __wine_process_init(void)
teb->Tib.StackLimit = stack.StackLimit;
teb->DeallocationStack = stack.DeallocationStack;
@ -247,10 +247,10 @@ index a1cc673d1fe..7328c601c9c 100644
server_init_process_done();
}
diff --git a/include/winternl.h b/include/winternl.h
index 3087f55089d..ee439d1986c 100644
index b77ab8fe03a..3d4863d8b04 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2297,8 +2297,8 @@ typedef struct _LDR_MODULE
@@ -2268,8 +2268,8 @@ typedef struct _LDR_MODULE
ULONG Flags;
SHORT LoadCount;
SHORT TlsIndex;
@ -260,16 +260,6 @@ index 3087f55089d..ee439d1986c 100644
ULONG TimeDateStamp;
HANDLE ActivationContext;
PVOID PatchInformation;
@@ -2308,6 +2308,9 @@ typedef struct _LDR_MODULE
PVOID ContextInformation;
ULONG_PTR OriginalBase;
LARGE_INTEGER LoadTime;
+
+ /* Not part of Win7 but used by Wine */
+ HANDLE SectionHandle;
} LDR_MODULE, *PLDR_MODULE;
typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
--
2.25.1
2.26.0

View File

@ -1,4 +1,4 @@
From 386a69b025194f9c6a8bb3856fbab71b3a4672ce Mon Sep 17 00:00:00 2001
From 8fe1b6c64671ab1fc5af0099b23021eae0a046d7 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Wed, 9 Sep 2015 05:31:18 +0800
Subject: [PATCH] ntdll: Initialize mod_name to zero.
@ -8,11 +8,11 @@ Subject: [PATCH] ntdll: Initialize mod_name to zero.
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index b0307ca0674..7a113211603 100644
index 0568be63ad8..98472b060e1 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1382,6 +1382,8 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.BaseAddress, reason );
@@ -1363,6 +1363,8 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
if (wm->so_handle && reason == DLL_PROCESS_ATTACH) call_constructors( wm );
if (!entry) return STATUS_SUCCESS;
+ memset( mod_name, 0, sizeof(mod_name) );
@ -21,5 +21,5 @@ index b0307ca0674..7a113211603 100644
{
size_t len = min( wm->ldr.BaseDllName.Length, sizeof(mod_name)-sizeof(WCHAR) );
--
2.25.1
2.26.0

View File

@ -1,8 +1,8 @@
From ea639387658c32c0e7df03795462f140f8921f06 Mon Sep 17 00:00:00 2001
From e25066ea9c9e0442d4c18c13818071c104a9c5d2 Mon Sep 17 00:00:00 2001
From: Martin Storsjo <martin@martin.st>
Date: Wed, 16 Aug 2017 23:48:40 +0300
Subject: [PATCH] ntdll: Always restore TEB to x18 on aarch 64 on return
from calls to builtins
Subject: [PATCH] ntdll: Always restore TEB to x18 on aarch 64 on return from
calls to builtins
This requires always enabling relaying of calls though.
@ -20,10 +20,10 @@ Signed-off-by: Martin Storsjo <martin@martin.st>
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 994ff6f215..1f40021b7a 100644
index 0568be63ad8..b7612dcc9a7 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1827,7 +1827,13 @@ static void load_builtin_callback( void *module, const char *filename )
@@ -2036,7 +2036,13 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
SERVER_END_REQ;
/* setup relay debugging entry points */
@ -35,14 +35,14 @@ index 994ff6f215..1f40021b7a 100644
+ if (TRACE_ON(relay))
+#endif
+ RELAY_SetupDLL( module );
}
*pwm = wm;
return STATUS_SUCCESS;
diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c
index 7974587c4a..1d88eddb3f 100644
index acccf088811..35dd4161d8b 100644
--- a/dlls/ntdll/relay.c
+++ b/dlls/ntdll/relay.c
@@ -709,8 +709,12 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx,
@@ -705,8 +705,12 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx,
{
unsigned int nb_args;
void *func = relay_trace_entry( descr, idx, stack, &nb_args );
@ -56,5 +56,5 @@ index 7974587c4a..1d88eddb3f 100644
}
--
2.17.1
2.26.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "dc214bfad723efeea96a5d33eb7fc0802dc34be9"
echo "c18152630362c1bff1813fe8ad5c75ffb8dbb7cf"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 683426b80996fab19231f272ce60184f0688f806 Mon Sep 17 00:00:00 2001
From 668e30532f05ca04015a0f7afd52999cbef9f7f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 26 Aug 2019 16:06:58 +0200
Subject: [PATCH] user32: Implement GetRegisteredRawInputDevices.
@ -11,7 +11,7 @@ Subject: [PATCH] user32: Implement GetRegisteredRawInputDevices.
4 files changed, 83 insertions(+), 15 deletions(-)
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index f3e7b542355..72a59878d8a 100644
index ea5ab751098..24af7399b84 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -602,7 +602,6 @@ static void test_mouse_keyboard(void)
@ -79,10 +79,10 @@ index f3e7b542355..72a59878d8a 100644
IDirectInputDevice8_Release(di_mouse);
diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c
index 85ff0c5e809..3792360b057 100644
index 2465262f74e..7d2034e6594 100644
--- a/dlls/user32/rawinput.c
+++ b/dlls/user32/rawinput.c
@@ -501,14 +501,65 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE device, UINT command, void *data, UINT
@@ -522,14 +522,65 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT
return *data_size;
}
@ -151,12 +151,12 @@ index 85ff0c5e809..3792360b057 100644
diff --git a/server/protocol.def b/server/protocol.def
index d74400f0eec..06620b4f8d4 100644
index 4ab2392771b..17e676950e8 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3879,6 +3879,12 @@ struct handle_info
VARARG(devices,rawinput_devices);
@END
@@ -3881,6 +3881,12 @@ struct handle_info
#define SET_CURSOR_CLIP 0x08
#define SET_CURSOR_NOCLIP 0x10
+/* Retrieve the list of registered rawinput devices */
+@REQ(get_rawinput_devices)
@ -165,10 +165,10 @@ index d74400f0eec..06620b4f8d4 100644
+ VARARG(devices,rawinput_devices);
+@END
/* Retrieve the suspended context of a thread */
@REQ(get_suspend_context)
/* Modify the list of registered rawinput devices */
@REQ(update_rawinput_devices)
diff --git a/server/queue.c b/server/queue.c
index 05c9481f8a9..6e5022b2311 100644
index 7c6402012ba..46905f3ce41 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -3193,3 +3193,27 @@ DECL_HANDLER(update_rawinput_devices)