mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 88d30985ddd534e8bafed531e619846bc8d10839
This commit is contained in:
parent
e1ac8f20fe
commit
0a469905c2
@ -1,24 +1,25 @@
|
||||
From 19cfff2a16953b65f9767fee571a4ce5d51b0536 Mon Sep 17 00:00:00 2001
|
||||
From 37c7e83f08dbd2a9fd757d190737a9aee3fa8bcb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:39:55 +0200
|
||||
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 40 ++++++++++++++++++++++++++++++++++++++--
|
||||
dlls/ntdll/loader.c | 44 +++++++++++++++++++++++++++++++++++++++++++-
|
||||
server/process.c | 8 ++++++++
|
||||
server/process.h | 1 +
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 14 ++++++++++++++
|
||||
5 files changed, 68 insertions(+), 2 deletions(-)
|
||||
5 files changed, 73 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index c0708c6..479608f 100644
|
||||
index 031bf83b4b1..fbe4d30af0b 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3505,6 +3505,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
@@ -3804,6 +3804,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
+/***********************************************************************
|
||||
+ * elevate_process
|
||||
+ */
|
||||
+static void elevate_process( void )
|
||||
@ -44,11 +45,10 @@ index c0708c6..479608f 100644
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/***********************************************************************
|
||||
/***********************************************************************
|
||||
* load_global_options
|
||||
*/
|
||||
static void load_global_options(void)
|
||||
@@ -3557,6 +3583,7 @@ static void load_global_options(void)
|
||||
@@ -3866,6 +3892,7 @@ static void load_global_options(void)
|
||||
}
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ index c0708c6..479608f 100644
|
||||
/***********************************************************************
|
||||
* RtlImageDirectoryEntryToData (NTDLL.@)
|
||||
*/
|
||||
@@ -3592,7 +3619,6 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
|
||||
@@ -3901,7 +3928,6 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
|
||||
return RtlImageRvaToVa( nt, module, addr, NULL );
|
||||
}
|
||||
|
||||
@ -64,19 +64,23 @@ index c0708c6..479608f 100644
|
||||
/***********************************************************************
|
||||
* RtlImageRvaToSection (NTDLL.@)
|
||||
*/
|
||||
@@ -3691,7 +3717,7 @@ void __wine_process_init(void)
|
||||
@@ -4233,6 +4259,8 @@ void __wine_process_init(void)
|
||||
's','y','s','t','e','m','3','2','\\',
|
||||
'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
|
||||
-
|
||||
RTL_USER_PROCESS_PARAMETERS *params;
|
||||
+ static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
|
||||
+ ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
|
||||
WINE_MODREF *wm;
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
@@ -3742,6 +3768,16 @@ void __wine_process_init(void)
|
||||
&NtCurrentTeb()->Peb->NtGlobalFlag, sizeof(DWORD), NULL );
|
||||
heap_set_debug_flags( GetProcessHeap() );
|
||||
@@ -4305,6 +4333,20 @@ void __wine_process_init(void)
|
||||
|
||||
virtual_set_large_address_space();
|
||||
|
||||
+ LdrQueryImageFileExecutionOptions( &wm->ldr.FullDllName, globalflagW, REG_DWORD,
|
||||
+ &NtCurrentTeb()->Peb->NtGlobalFlag, sizeof(DWORD), NULL );
|
||||
+ heap_set_debug_flags( GetProcessHeap() );
|
||||
+
|
||||
+ /* elevate process if necessary */
|
||||
+ status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext,
|
||||
+ &runlevel, sizeof(runlevel), NULL );
|
||||
@ -89,12 +93,12 @@ index c0708c6..479608f 100644
|
||||
+
|
||||
/* the main exe needs to be the first in the load order list */
|
||||
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
|
||||
InsertHeadList( &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
|
||||
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index d8fdfcc..2c9365a 100644
|
||||
index b4b239d2fd7..3cfc6f88fad 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -1129,6 +1129,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
@@ -1107,6 +1107,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
@ -110,10 +114,10 @@ index d8fdfcc..2c9365a 100644
|
||||
DECL_HANDLER(new_process)
|
||||
{
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index d9d29f0..a494eab 100644
|
||||
index 20ff6beda68..e072a35ba5a 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -139,6 +139,7 @@ extern void break_process( struct process *process );
|
||||
@@ -139,6 +139,7 @@ extern void kill_debugged_processes( struct thread *debugger, int exit_code );
|
||||
extern void detach_debugged_processes( struct thread *debugger );
|
||||
extern struct process_snapshot *process_snap( int *count );
|
||||
extern void enum_processes( int (*cb)(struct process*, void*), void *user);
|
||||
@ -122,10 +126,10 @@ index d9d29f0..a494eab 100644
|
||||
/* console functions */
|
||||
extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin);
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 2b8d51a..650c279 100644
|
||||
index 72fab786a03..042072f58bd 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3721,6 +3721,13 @@ struct handle_info
|
||||
@@ -3743,6 +3743,13 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@ -140,7 +144,7 @@ index 2b8d51a..650c279 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index fcab799..181219d 100644
|
||||
index fcab799557c..181219d2179 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -1806,3 +1806,17 @@ DECL_HANDLER(create_token)
|
||||
@ -162,5 +166,5 @@ index fcab799..181219d 100644
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.9.1
|
||||
2.17.1
|
||||
|
||||
|
@ -1,164 +0,0 @@
|
||||
From 4df02b9d23b868cf4e481d6461715f21d1b0f7e9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 14 Aug 2019 12:17:08 +1000
|
||||
Subject: [PATCH 01/27] dsdmo: Added dll
|
||||
|
||||
---
|
||||
configure | 2 +
|
||||
configure.ac | 1 +
|
||||
dlls/dsdmo/Makefile.in | 6 +++
|
||||
dlls/dsdmo/dsdmo.spec | 4 ++
|
||||
dlls/dsdmo/main.c | 85 ++++++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 98 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/Makefile.in
|
||||
create mode 100644 dlls/dsdmo/dsdmo.spec
|
||||
create mode 100644 dlls/dsdmo/main.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 5ed6ed6c26..bea103fc37 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1257,6 +1257,7 @@ enable_dpnlobby
|
||||
enable_dpvoice
|
||||
enable_dpwsockx
|
||||
enable_drmclien
|
||||
+enable_dsdmo
|
||||
enable_dsound
|
||||
enable_dsquery
|
||||
enable_dssenh
|
||||
@@ -20364,6 +20365,7 @@ wine_fn_config_makefile dlls/dpvoice enable_dpvoice
|
||||
wine_fn_config_makefile dlls/dpvoice/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dpwsockx enable_dpwsockx
|
||||
wine_fn_config_makefile dlls/drmclien enable_drmclien
|
||||
+wine_fn_config_makefile dlls/dsdmo enable_dsdmo
|
||||
wine_fn_config_makefile dlls/dsound enable_dsound
|
||||
wine_fn_config_makefile dlls/dsound/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dsquery enable_dsquery
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1c912a30a2..27547ae3c7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3232,6 +3232,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpvoice)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dpvoice/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dpwsockx)
|
||||
WINE_CONFIG_MAKEFILE(dlls/drmclien)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/dsdmo)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dsound)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dsound/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dsquery)
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000000..99816ae0c0
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -0,0 +1,6 @@
|
||||
+MODULE = dsdmo.dll
|
||||
+
|
||||
+EXTRADLLFLAGS = -mno-cygwin
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ main.c
|
||||
diff --git a/dlls/dsdmo/dsdmo.spec b/dlls/dsdmo/dsdmo.spec
|
||||
new file mode 100644
|
||||
index 0000000000..b16365d0c9
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/dsdmo.spec
|
||||
@@ -0,0 +1,4 @@
|
||||
+@ stdcall -private DllCanUnloadNow()
|
||||
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
+@ stdcall -private DllRegisterServer()
|
||||
+@ stdcall -private DllUnregisterServer()
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
new file mode 100644
|
||||
index 0000000000..61a67f44d8
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -0,0 +1,85 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "ole2.h"
|
||||
+#include "rpcproxy.h"
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+static HINSTANCE dsdmo_instance;
|
||||
+
|
||||
+/******************************************************************
|
||||
+ * DllMain
|
||||
+ */
|
||||
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||
+{
|
||||
+ TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv);
|
||||
+
|
||||
+ switch(fdwReason)
|
||||
+ {
|
||||
+ case DLL_WINE_PREATTACH:
|
||||
+ return FALSE; /* prefer native version */
|
||||
+ case DLL_PROCESS_ATTACH:
|
||||
+ dsdmo_instance = hInstDLL;
|
||||
+ DisableThreadLibraryCalls(dsdmo_instance);
|
||||
+ break;
|
||||
+ case DLL_PROCESS_DETACH:
|
||||
+ if (lpv) break;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllGetClassObject
|
||||
+ */
|
||||
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
+{
|
||||
+ FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
+ return CLASS_E_CLASSNOTAVAILABLE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllCanUnloadNow
|
||||
+ */
|
||||
+HRESULT WINAPI DllCanUnloadNow(void)
|
||||
+{
|
||||
+ return S_FALSE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllRegisterServer
|
||||
+ */
|
||||
+HRESULT WINAPI DllRegisterServer(void)
|
||||
+{
|
||||
+ TRACE("()\n");
|
||||
+ return __wine_register_resources(dsdmo_instance);
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllUnregisterServer
|
||||
+ */
|
||||
+HRESULT WINAPI DllUnregisterServer(void)
|
||||
+{
|
||||
+ TRACE("()\n");
|
||||
+ return __wine_unregister_resources(dsdmo_instance);
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 48e622c107b931be17b6b4c424e71e1dea6ef86f Mon Sep 17 00:00:00 2001
|
||||
From 7103ff251691b420248ff8ddb80d544f06cc8b3a Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 11 Jun 2018 13:10:36 -0500
|
||||
Subject: [PATCH 42/83] ntdll: Use shared memory segments to store semaphore
|
||||
and mutex state.
|
||||
Subject: [PATCH] ntdll: Use shared memory segments to store semaphore and
|
||||
mutex state.
|
||||
|
||||
This patch is pretty big, because it restructures the underlying esync
|
||||
objects. Instead of wrapping a struct esync, the semaphore and mutex structs
|
||||
@ -16,7 +16,7 @@ since now we don't have to allocate separate structures.
|
||||
3 files changed, 155 insertions(+), 199 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
|
||||
index 9d9d767c4..ce62446e6 100644
|
||||
index c1d8882d817..e8ee1cbc9ff 100644
|
||||
--- a/dlls/ntdll/esync.c
|
||||
+++ b/dlls/ntdll/esync.c
|
||||
@@ -32,6 +32,7 @@
|
||||
@ -658,7 +658,7 @@ index 9d9d767c4..ce62446e6 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/ntdll/esync.h b/dlls/ntdll/esync.h
|
||||
index f79b9a06c..88f491e5a 100644
|
||||
index f79b9a06c90..88f491e5ab4 100644
|
||||
--- a/dlls/ntdll/esync.h
|
||||
+++ b/dlls/ntdll/esync.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@ -670,10 +670,10 @@ index f79b9a06c..88f491e5a 100644
|
||||
|
||||
extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 87134db09..04aa8dff8 100644
|
||||
index e59cd2a5073..18f73b4911c 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "ntdll_misc.h"
|
||||
#include "ddk/wdm.h"
|
||||
#include "wine/exception.h"
|
||||
@ -681,7 +681,7 @@ index 87134db09..04aa8dff8 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(thread);
|
||||
|
||||
@@ -349,6 +350,9 @@ void thread_init(void)
|
||||
@@ -366,6 +367,9 @@ TEB *thread_init(void)
|
||||
__wine_user_shared_data();
|
||||
fill_cpu_info();
|
||||
|
||||
@ -689,8 +689,8 @@ index 87134db09..04aa8dff8 100644
|
||||
+ esync_init();
|
||||
+
|
||||
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
}
|
||||
|
||||
return teb;
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 6887c3ae33f8304d5a038c7f9d2dac5d29ad8821 Mon Sep 17 00:00:00 2001
|
||||
From 4dabc377ea54ea04652677aa5ff4e7a2d8b37c33 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sat, 4 Aug 2018 15:15:12 -0500
|
||||
Subject: [PATCH 74/83] ntdll, server: Abort if esync is enabled for the server
|
||||
but not the client, and vice versa.
|
||||
Subject: [PATCH] ntdll, server: Abort if esync is enabled for the server but
|
||||
not the client, and vice versa.
|
||||
|
||||
---
|
||||
dlls/ntdll/esync.c | 28 +++++++++++++++++++++++++++-
|
||||
@ -11,7 +11,7 @@ Subject: [PATCH 74/83] ntdll, server: Abort if esync is enabled for the server
|
||||
3 files changed, 40 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c
|
||||
index 3ab069da9..1dd96c8e6 100644
|
||||
index 8255810a924..fb1953fb90c 100644
|
||||
--- a/dlls/ntdll/esync.c
|
||||
+++ b/dlls/ntdll/esync.c
|
||||
@@ -115,10 +115,29 @@ static void **shm_addrs;
|
||||
@ -61,10 +61,10 @@ index 3ab069da9..1dd96c8e6 100644
|
||||
pagesize = sysconf( _SC_PAGESIZE );
|
||||
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index d146b9e00..2c8777e13 100644
|
||||
index 192186299db..6c652d9fdf2 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -351,8 +351,7 @@ void thread_init(void)
|
||||
@@ -368,8 +368,7 @@ TEB *thread_init(void)
|
||||
__wine_user_shared_data();
|
||||
fill_cpu_info();
|
||||
|
||||
@ -73,9 +73,9 @@ index d146b9e00..2c8777e13 100644
|
||||
+ esync_init();
|
||||
|
||||
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
}
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 1fc9316b1..cb4de2daa 100644
|
||||
index 1fc9316b1b5..cb4de2daa77 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -395,6 +395,18 @@ DECL_HANDLER(create_esync)
|
||||
@ -98,5 +98,5 @@ index 1fc9316b1..cb4de2daa 100644
|
||||
|
||||
if ((esync = create_esync( root, &name, objattr->attributes, req->initval, req->flags, req->type, sd )))
|
||||
--
|
||||
2.20.1
|
||||
2.17.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 169d29bc138015c6d54cc71c817bad9ff25ba7f3 Mon Sep 17 00:00:00 2001
|
||||
From 627cc81a90af23437264ec65017725911cc6b20f 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.
|
||||
@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
|
||||
3 files changed, 145 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
|
||||
index d48c422e432..1d246ec7a71 100644
|
||||
index 3a507622070..4bc043e161d 100644
|
||||
--- a/dlls/kernel32/tests/loader.c
|
||||
+++ b/dlls/kernel32/tests/loader.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@ -21,7 +21,7 @@ index d48c422e432..1d246ec7a71 100644
|
||||
#include "wine/test.h"
|
||||
#include "delayloadhandler.h"
|
||||
|
||||
@@ -4039,6 +4040,79 @@ static void test_dll_file( const char *name )
|
||||
@@ -4047,6 +4048,79 @@ static void test_dll_file( const char *name )
|
||||
#undef OK_FIELD
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ index d48c422e432..1d246ec7a71 100644
|
||||
START_TEST(loader)
|
||||
{
|
||||
int argc;
|
||||
@@ -4110,10 +4184,12 @@ START_TEST(loader)
|
||||
@@ -4118,10 +4192,12 @@ START_TEST(loader)
|
||||
test_ExitProcess();
|
||||
test_InMemoryOrderModuleList();
|
||||
test_wow64_redirection();
|
||||
@ -115,10 +115,10 @@ index d48c422e432..1d246ec7a71 100644
|
||||
test_Loader();
|
||||
}
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 432369e40a8..b00d9ce13bb 100644
|
||||
index fc44dcfe3e5..4cf566d311e 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -119,6 +119,9 @@ static const char * const reason_names[] =
|
||||
@@ -121,6 +121,9 @@ static const char * const reason_names[] =
|
||||
|
||||
static const WCHAR dllW[] = {'.','d','l','l',0};
|
||||
|
||||
@ -128,7 +128,7 @@ index 432369e40a8..b00d9ce13bb 100644
|
||||
/* internal representation of 32bit modules. per process. */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -461,6 +464,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
|
||||
@@ -464,6 +467,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module )
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ index 432369e40a8..b00d9ce13bb 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1208,7 +1257,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1211,7 +1260,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,7 +194,7 @@ index 432369e40a8..b00d9ce13bb 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -1953,6 +2007,7 @@ static void load_builtin_callback( void *module, const char *filename )
|
||||
@@ -1956,6 +2010,7 @@ static void load_builtin_callback( void *module, const char *filename )
|
||||
/* the module has only be inserted in the load & memory order lists */
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
|
||||
@ -202,7 +202,7 @@ index 432369e40a8..b00d9ce13bb 100644
|
||||
/* FIXME: free the modref */
|
||||
builtin_load_info->status = STATUS_DLL_NOT_FOUND;
|
||||
return;
|
||||
@@ -2476,6 +2531,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
|
||||
@@ -2479,6 +2534,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 432369e40a8..b00d9ce13bb 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3650,6 +3706,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3661,6 +3717,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
{
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderModuleList);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderModuleList);
|
||||
@ -218,17 +218,17 @@ index 432369e40a8..b00d9ce13bb 100644
|
||||
if (wm->ldr.InInitializationOrderModuleList.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderModuleList);
|
||||
|
||||
@@ -4376,6 +4433,7 @@ void __wine_process_init(void)
|
||||
UNICODE_STRING nt_name;
|
||||
void * (CDECL *init_func)(void);
|
||||
INITIAL_TEB stack;
|
||||
@@ -4397,6 +4454,7 @@ void __wine_process_init(void)
|
||||
SIZE_T info_size;
|
||||
TEB *teb = thread_init();
|
||||
PEB *peb = teb->Peb;
|
||||
+ DWORD i;
|
||||
|
||||
thread_init();
|
||||
|
||||
@@ -4385,6 +4443,10 @@ void __wine_process_init(void)
|
||||
|
||||
/* setup the server connection */
|
||||
server_init_process();
|
||||
@@ -4417,6 +4475,10 @@ void __wine_process_init(void)
|
||||
load_global_options();
|
||||
version_init();
|
||||
|
||||
+ /* initialize hash table */
|
||||
+ for (i = 0; i < HASH_MAP_SIZE; i++)
|
||||
@ -237,16 +237,15 @@ index 432369e40a8..b00d9ce13bb 100644
|
||||
/* setup the load callback and create ntdll modref */
|
||||
wine_dll_set_callback( load_builtin_callback );
|
||||
|
||||
@@ -4439,6 +4501,9 @@ void __wine_process_init(void)
|
||||
RemoveEntryList( &wm->ldr.InMemoryOrderModuleList );
|
||||
InsertHeadList( &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList );
|
||||
@@ -4489,5 +4551,8 @@ void __wine_process_init(void)
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
|
||||
+ /* the windows version was not set yet when ntdll and kernel32 were loaded */
|
||||
+ recompute_hash_map();
|
||||
+
|
||||
if ((status = virtual_alloc_thread_stack( &stack, 0, 0, NULL )) != STATUS_SUCCESS)
|
||||
{
|
||||
ERR( "Main exe initialization for %s failed, status %x\n",
|
||||
server_init_process_done();
|
||||
}
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index df1418477ad..2d7c86c389c 100644
|
||||
--- a/include/winternl.h
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 7bc6d780c8449926854c8f69f501fc60722a379f Mon Sep 17 00:00:00 2001
|
||||
From 3704033a2a378975d9c4073af426e0540f493a3b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 30 May 2015 02:23:15 +0200
|
||||
Subject: [PATCH] ntdll: Add support for hiding wine version information from
|
||||
applications.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 99 ++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ntdll/ntdll_misc.h | 5 +++
|
||||
2 files changed, 103 insertions(+), 1 deletion(-)
|
||||
dlls/ntdll/loader.c | 102 +++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ntdll/ntdll_misc.h | 5 ++
|
||||
2 files changed, 106 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index bc4579b6ace..e1fa510647d 100644
|
||||
index fbe4d30af0b..22ba88a72ae 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -70,6 +70,7 @@ const WCHAR system_dir[] = {'C',':','\\','w','i','n','d','o','w','s','\\',
|
||||
@ -40,7 +40,7 @@ index bc4579b6ace..e1fa510647d 100644
|
||||
struct ldr_notification
|
||||
{
|
||||
struct list entry;
|
||||
@@ -1709,6 +1715,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
|
||||
@@ -1710,6 +1716,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
|
||||
}
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ index bc4579b6ace..e1fa510647d 100644
|
||||
/******************************************************************
|
||||
* LdrGetProcedureAddress (NTDLL.@)
|
||||
*/
|
||||
@@ -1729,7 +1825,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
|
||||
@@ -1730,7 +1826,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
|
||||
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
|
||||
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, load_path )
|
||||
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, load_path );
|
||||
@ -146,16 +146,19 @@ index bc4579b6ace..e1fa510647d 100644
|
||||
{
|
||||
*address = proc;
|
||||
ret = STATUS_SUCCESS;
|
||||
@@ -4295,6 +4391,7 @@ void __wine_process_init(void)
|
||||
@@ -4331,6 +4427,10 @@ void __wine_process_init(void)
|
||||
NtTerminateProcess( GetCurrentProcess(), STATUS_INVALID_IMAGE_FORMAT );
|
||||
}
|
||||
|
||||
NtCurrentTeb()->Peb->LoaderLock = &loader_section;
|
||||
version_init( wm->ldr.FullDllName.Buffer );
|
||||
+ NtCurrentTeb()->Peb->LoaderLock = &loader_section;
|
||||
+
|
||||
+ hidden_exports_init( wm->ldr.FullDllName.Buffer );
|
||||
+
|
||||
virtual_set_large_address_space();
|
||||
|
||||
LdrQueryImageFileExecutionOptions( &wm->ldr.FullDllName, globalflagW, REG_DWORD,
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 976b8715680..010a195f0d2 100644
|
||||
index 7ceb3132a7c..ac51c78cff7 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -269,6 +269,11 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d9078607a8e6b8ff82df648b94b5340e6736b923 Mon Sep 17 00:00:00 2001
|
||||
From 9374f7ab587fe60c0e3436d15adf917a44e08711 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 9 Mar 2017 22:56:45 +0100
|
||||
Subject: [PATCH] ntdll: Fill process virtual memory counters in
|
||||
@ -13,10 +13,10 @@ FIXME: fill_VM_COUNTERS now uses a different method ... which one is better?
|
||||
4 files changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 2b2d3df89f..a8fb48a83d 100644
|
||||
index 8382b61f2cb..c224fab14f9 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -2561,8 +2561,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
@@ -2659,8 +2659,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
/* spi->ti will be set later on */
|
||||
|
||||
if (reply->unix_pid != -1)
|
||||
@ -29,10 +29,10 @@ index 2b2d3df89f..a8fb48a83d 100644
|
||||
}
|
||||
len += procstructlen;
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 425ede4486..51965eccaf 100644
|
||||
index f258bb601c2..7ceb3132a7c 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -270,6 +270,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
|
||||
@@ -272,6 +272,7 @@ void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
|
||||
/* process / thread time */
|
||||
extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
|
||||
LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN;
|
||||
@ -41,10 +41,10 @@ index 425ede4486..51965eccaf 100644
|
||||
/* string functions */
|
||||
int __cdecl NTDLL_tolower( int c );
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index c7e2cdb1b7..b1f529fb3d 100644
|
||||
index 9e5c0d39e78..9eecacb6728 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -188,7 +188,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
|
||||
@@ -206,7 +206,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
|
||||
|
||||
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
|
||||
{
|
||||
@ -54,11 +54,11 @@ index c7e2cdb1b7..b1f529fb3d 100644
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 8b6c937df2..863b337024 100644
|
||||
index bb18a22bad5..d010c018102 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -314,6 +314,42 @@ void thread_init(void)
|
||||
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
@@ -362,6 +362,42 @@ TEB *thread_init(void)
|
||||
return teb;
|
||||
}
|
||||
|
||||
+BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
|
||||
@ -101,5 +101,5 @@ index 8b6c937df2..863b337024 100644
|
||||
/***********************************************************************
|
||||
* free_thread_data
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 74b51edf67a0b31bf8e3341a403b11387ad5801d Mon Sep 17 00:00:00 2001
|
||||
From 3e1f96926c05104663b171fe2a4bad2b2a0679e5 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 26 Nov 2014 10:46:09 +0100
|
||||
Subject: [PATCH] ntdll: Move code to update user shared data into a separate
|
||||
@ -6,14 +6,14 @@ Subject: [PATCH] ntdll: Move code to update user shared data into a separate
|
||||
|
||||
---
|
||||
dlls/ntdll/ntdll.spec | 3 +++
|
||||
dlls/ntdll/thread.c | 24 ++++++++++++++++++------
|
||||
2 files changed, 21 insertions(+), 6 deletions(-)
|
||||
dlls/ntdll/thread.c | 24 ++++++++++++++++++++----
|
||||
2 files changed, 23 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index f0ac1d77b00..4003a36c8be 100644
|
||||
index a42b4fc2482..8dd58138718 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1574,3 +1574,6 @@
|
||||
@@ -1571,3 +1571,6 @@
|
||||
# Filesystem
|
||||
@ cdecl wine_nt_to_unix_file_name(ptr ptr long long)
|
||||
@ cdecl wine_unix_to_nt_file_name(ptr ptr)
|
||||
@ -21,20 +21,20 @@ index f0ac1d77b00..4003a36c8be 100644
|
||||
+# User shared data
|
||||
+@ cdecl __wine_user_shared_data()
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 863b337024c..90d49f2d92e 100644
|
||||
index d010c018102..b5b11e3671e 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -211,7 +211,6 @@ void thread_init(void)
|
||||
@@ -274,7 +274,6 @@ TEB *thread_init(void)
|
||||
TEB *teb;
|
||||
void *addr;
|
||||
BOOL suspend;
|
||||
SIZE_T size, info_size;
|
||||
SIZE_T size;
|
||||
- LARGE_INTEGER now;
|
||||
NTSTATUS status;
|
||||
struct ntdll_thread_data *thread_data;
|
||||
|
||||
@@ -300,7 +299,23 @@ void thread_init(void)
|
||||
init_directories();
|
||||
init_user_process_params( info_size );
|
||||
@@ -349,7 +348,25 @@ TEB *thread_init(void)
|
||||
debug_init();
|
||||
set_process_name( __wine_main_argc, __wine_main_argv );
|
||||
|
||||
- /* initialize time values in user_shared_data */
|
||||
+ /* initialize user_shared_data */
|
||||
@ -42,6 +42,8 @@ index 863b337024c..90d49f2d92e 100644
|
||||
+ fill_cpu_info();
|
||||
+
|
||||
+ NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
+
|
||||
+ return teb;
|
||||
+}
|
||||
+
|
||||
+
|
||||
@ -57,18 +59,17 @@ index 863b337024c..90d49f2d92e 100644
|
||||
NtQuerySystemTime( &now );
|
||||
user_shared_data->SystemTime.LowPart = now.u.LowPart;
|
||||
user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart;
|
||||
@@ -308,10 +323,7 @@ void thread_init(void)
|
||||
@@ -357,9 +374,8 @@ TEB *thread_init(void)
|
||||
user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time;
|
||||
user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart;
|
||||
user_shared_data->TickCountMultiplier = 1 << 24;
|
||||
-
|
||||
- fill_cpu_info();
|
||||
-
|
||||
- NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
|
||||
- return teb;
|
||||
+ return (BYTE *)user_shared_data;
|
||||
}
|
||||
|
||||
BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c554bd89905e60fb42459dc021b5502fe57944e3 Mon Sep 17 00:00:00 2001
|
||||
From a0f37e4e406de37860045aaf5e36fc811cda8ce6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 5 May 2017 05:40:50 +0200
|
||||
Subject: [PATCH] ntdll: Create thread to update user_shared_data time values
|
||||
@ -7,15 +7,15 @@ Subject: [PATCH] ntdll: Create thread to update user_shared_data time values
|
||||
---
|
||||
dlls/ntdll/loader.c | 31 ++++++++++++++++++
|
||||
dlls/ntdll/ntdll_misc.h | 3 ++
|
||||
dlls/ntdll/thread.c | 71 ++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/ntdll/thread.c | 70 ++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/ntdll/virtual.c | 17 ++++++++++
|
||||
4 files changed, 114 insertions(+), 8 deletions(-)
|
||||
4 files changed, 113 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index e1fa510647d..6a6900ec434 100644
|
||||
index b4f0397f574..fc44dcfe3e5 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3820,6 +3820,36 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
|
||||
@@ -3824,6 +3824,36 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
|
||||
}
|
||||
|
||||
|
||||
@ -52,16 +52,16 @@ index e1fa510647d..6a6900ec434 100644
|
||||
/******************************************************************
|
||||
* LdrInitializeThunk (NTDLL.@)
|
||||
*
|
||||
@@ -4391,6 +4421,7 @@ void __wine_process_init(void)
|
||||
@@ -4429,6 +4459,7 @@ void __wine_process_init(void)
|
||||
|
||||
NtCurrentTeb()->Peb->LoaderLock = &loader_section;
|
||||
version_init( wm->ldr.FullDllName.Buffer );
|
||||
|
||||
+ user_shared_data_init();
|
||||
hidden_exports_init( wm->ldr.FullDllName.Buffer );
|
||||
virtual_set_large_address_space();
|
||||
|
||||
virtual_set_large_address_space();
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 010a195f0d2..17a6f1af468 100644
|
||||
index ac51c78cff7..47d85d5e35a 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -196,6 +196,9 @@ extern void virtual_set_large_address_space(void) DECLSPEC_HIDDEN;
|
||||
@ -75,7 +75,7 @@ index 010a195f0d2..17a6f1af468 100644
|
||||
/* completion */
|
||||
extern NTSTATUS NTDLL_AddCompletion( HANDLE hFile, ULONG_PTR CompletionValue,
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index e8c99ae090d..1fbe0afae63 100644
|
||||
index 9ca81f89ecb..bf97cbfa8e1 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -47,6 +47,7 @@
|
||||
@ -97,7 +97,7 @@ index e8c99ae090d..1fbe0afae63 100644
|
||||
static const WCHAR default_windirW[] = {'C',':','\\','w','i','n','d','o','w','s',0};
|
||||
|
||||
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
|
||||
@@ -291,7 +294,7 @@ void thread_init(void)
|
||||
@@ -292,7 +295,7 @@ TEB *thread_init(void)
|
||||
MESSAGE( "wine: failed to map the shared user data: %08x\n", status );
|
||||
exit(1);
|
||||
}
|
||||
@ -106,7 +106,7 @@ index e8c99ae090d..1fbe0afae63 100644
|
||||
memcpy( user_shared_data->NtSystemRoot, default_windirW, sizeof(default_windirW) );
|
||||
|
||||
/* allocate and initialize the PEB */
|
||||
@@ -379,17 +382,69 @@ void thread_init(void)
|
||||
@@ -366,18 +369,69 @@ TEB *thread_init(void)
|
||||
*/
|
||||
BYTE* CDECL __wine_user_shared_data(void)
|
||||
{
|
||||
@ -138,7 +138,7 @@ index e8c99ae090d..1fbe0afae63 100644
|
||||
+ user_shared_data->u.TickCount.High1Time = interrupt.HighPart;
|
||||
+ user_shared_data->TickCountLowDeprecated = interrupt.LowPart;
|
||||
user_shared_data->TickCountMultiplier = 1 << 24;
|
||||
+
|
||||
|
||||
+ spinlock = 0;
|
||||
return (BYTE *)user_shared_data;
|
||||
}
|
||||
|
@ -1,93 +0,0 @@
|
||||
From 4612f7cbb5fffdacf013eb447e5330c0a2da22d3 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 22:30:12 -0500
|
||||
Subject: [PATCH] winebus.inf: Add new INF file and copy it to the INF
|
||||
directory.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
loader/Makefile.in | 1 +
|
||||
loader/wine.inf.in | 1 +
|
||||
loader/winebus.inf.in | 22 ++++++++++++++++++++++
|
||||
5 files changed, 26 insertions(+)
|
||||
create mode 100644 loader/winebus.inf.in
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f1de2c4052..11ff21f917 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21032,6 +21032,7 @@ else
|
||||
fonts \
|
||||
loader/l_intl.nls \
|
||||
loader/wine.inf \
|
||||
+loader/winebus.inf \
|
||||
loader/winehid.inf \
|
||||
programs/msidb/msidb \
|
||||
programs/msiexec/msiexec \
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a7c45ace73..c1c992cd89 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4035,6 +4035,7 @@ else
|
||||
fonts \
|
||||
loader/l_intl.nls \
|
||||
loader/wine.inf \
|
||||
+loader/winebus.inf \
|
||||
loader/winehid.inf \
|
||||
programs/msidb/msidb \
|
||||
programs/msiexec/msiexec \
|
||||
diff --git a/loader/Makefile.in b/loader/Makefile.in
|
||||
index 3ada656408..11a476103c 100644
|
||||
--- a/loader/Makefile.in
|
||||
+++ b/loader/Makefile.in
|
||||
@@ -10,6 +10,7 @@ SOURCES = \
|
||||
wine.man.in \
|
||||
wine.pl.UTF-8.man.in \
|
||||
wine_info.plist.in \
|
||||
+ winebus.inf.in \
|
||||
winehid.inf.in
|
||||
|
||||
PROGRAMS = $(WINELOADER_PROGRAMS)
|
||||
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
|
||||
index c3d3b770b5..63f8cb064e 100644
|
||||
--- a/loader/wine.inf.in
|
||||
+++ b/loader/wine.inf.in
|
||||
@@ -3691,4 +3691,5 @@ inf_section = 17
|
||||
l_intl.nls
|
||||
|
||||
[inf_section]
|
||||
+winebus.inf
|
||||
winehid.inf
|
||||
diff --git a/loader/winebus.inf.in b/loader/winebus.inf.in
|
||||
new file mode 100644
|
||||
index 0000000000..3950c3dfc4
|
||||
--- /dev/null
|
||||
+++ b/loader/winebus.inf.in
|
||||
@@ -0,0 +1,22 @@
|
||||
+[Version]
|
||||
+Signature="$CHICAGO$"
|
||||
+ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
|
||||
+Class=System
|
||||
+
|
||||
+[Manufacturer]
|
||||
+Wine=mfg_section
|
||||
+
|
||||
+[mfg_section]
|
||||
+Wine HID bus driver=device_section,root\winebus
|
||||
+
|
||||
+[device_section.Services]
|
||||
+AddService = winebus,0x2,svc_section
|
||||
+
|
||||
+[svc_section]
|
||||
+Description="Wine HID bus driver"
|
||||
+DisplayName="Wine HID bus"
|
||||
+ServiceBinary="%12%\winebus.sys"
|
||||
+LoadOrderGroup="WinePlugPlay"
|
||||
+ServiceType=1
|
||||
+StartType=3
|
||||
+ErrorControl=1
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,127 +0,0 @@
|
||||
From f80abf3ac3b0ddc4937a50217c654af38a839560 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 22:30:13 -0500
|
||||
Subject: [PATCH] winebus.sys: Implement AddDevice().
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/winebus.sys/main.c | 66 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 65 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c
|
||||
index 89ea65bba6..d9ceb83760 100644
|
||||
--- a/dlls/winebus.sys/main.c
|
||||
+++ b/dlls/winebus.sys/main.c
|
||||
@@ -69,8 +69,12 @@ static const WORD PID_XBOX_CONTROLLERS[] = {
|
||||
|
||||
static DRIVER_OBJECT *driver_obj;
|
||||
|
||||
+
|
||||
static DEVICE_OBJECT *mouse_obj;
|
||||
|
||||
+/* The root-enumerated device stack. */
|
||||
+static DEVICE_OBJECT *bus_pdo, *bus_fdo;
|
||||
+
|
||||
HANDLE driver_key;
|
||||
|
||||
struct pnp_device
|
||||
@@ -469,7 +473,33 @@ static NTSTATUS handle_IRP_MN_QUERY_ID(DEVICE_OBJECT *device, IRP *irp)
|
||||
return status;
|
||||
}
|
||||
|
||||
-static NTSTATUS WINAPI common_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
+static NTSTATUS fdo_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
+{
|
||||
+ IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp);
|
||||
+ NTSTATUS ret;
|
||||
+
|
||||
+ switch (irpsp->MinorFunction)
|
||||
+ {
|
||||
+ case IRP_MN_START_DEVICE:
|
||||
+ case IRP_MN_SURPRISE_REMOVAL:
|
||||
+ irp->IoStatus.u.Status = STATUS_SUCCESS;
|
||||
+ break;
|
||||
+ case IRP_MN_REMOVE_DEVICE:
|
||||
+ irp->IoStatus.u.Status = STATUS_SUCCESS;
|
||||
+ IoSkipCurrentIrpStackLocation(irp);
|
||||
+ ret = IoCallDriver(bus_pdo, irp);
|
||||
+ IoDetachDevice(bus_pdo);
|
||||
+ IoDeleteDevice(device);
|
||||
+ return ret;
|
||||
+ default:
|
||||
+ FIXME("Unhandled minor function %#x.\n", irpsp->MinorFunction);
|
||||
+ }
|
||||
+
|
||||
+ IoSkipCurrentIrpStackLocation(irp);
|
||||
+ return IoCallDriver(bus_pdo, irp);
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS pdo_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
{
|
||||
NTSTATUS status = irp->IoStatus.u.Status;
|
||||
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp);
|
||||
@@ -498,6 +528,13 @@ static NTSTATUS WINAPI common_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
return status;
|
||||
}
|
||||
|
||||
+static NTSTATUS WINAPI common_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
+{
|
||||
+ if (device == bus_fdo)
|
||||
+ return fdo_pnp_dispatch(device, irp);
|
||||
+ return pdo_pnp_dispatch(device, irp);
|
||||
+}
|
||||
+
|
||||
static NTSTATUS deliver_last_report(struct device_extension *ext, DWORD buffer_length, BYTE* buffer, ULONG_PTR *out_length)
|
||||
{
|
||||
if (buffer_length < ext->last_report_size)
|
||||
@@ -522,6 +559,12 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
|
||||
TRACE("(%p, %p)\n", device, irp);
|
||||
|
||||
+ if (device == bus_fdo)
|
||||
+ {
|
||||
+ IoSkipCurrentIrpStackLocation(irp);
|
||||
+ return IoCallDriver(bus_pdo, irp);
|
||||
+ }
|
||||
+
|
||||
switch (irpsp->Parameters.DeviceIoControl.IoControlCode)
|
||||
{
|
||||
case IOCTL_HID_GET_DEVICE_ATTRIBUTES:
|
||||
@@ -764,6 +807,26 @@ BOOL is_xbox_gamepad(WORD vid, WORD pid)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *pdo)
|
||||
+{
|
||||
+ NTSTATUS ret;
|
||||
+
|
||||
+ TRACE("driver %p, pdo %p.\n", driver, pdo);
|
||||
+
|
||||
+ if ((ret = IoCreateDevice(driver, 0, NULL, FILE_DEVICE_BUS_EXTENDER, 0, FALSE, &bus_fdo)))
|
||||
+ {
|
||||
+ ERR("Failed to create FDO, status %#x.\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ IoAttachDeviceToDeviceStack(bus_fdo, pdo);
|
||||
+ bus_pdo = pdo;
|
||||
+
|
||||
+ bus_fdo->Flags &= ~DO_DEVICE_INITIALIZING;
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
static void WINAPI driver_unload(DRIVER_OBJECT *driver)
|
||||
{
|
||||
udev_driver_unload();
|
||||
@@ -861,6 +924,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
|
||||
|
||||
driver->MajorFunction[IRP_MJ_PNP] = common_pnp_dispatch;
|
||||
driver->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = hid_internal_dispatch;
|
||||
+ driver->DriverExtension->AddDevice = driver_add_device;
|
||||
driver->DriverUnload = driver_unload;
|
||||
|
||||
mouse_device_create();
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,108 +0,0 @@
|
||||
From 34c20aa62799b2e08cb751d040a4f1cc3b0b6894 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 22:30:14 -0500
|
||||
Subject: [PATCH] wineboot: Create a root-enumerated device object for winebus.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
programs/wineboot/Makefile.in | 2 +-
|
||||
programs/wineboot/wineboot.c | 56 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 57 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in
|
||||
index eaea154057..3921fa9644 100644
|
||||
--- a/programs/wineboot/Makefile.in
|
||||
+++ b/programs/wineboot/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
MODULE = wineboot.exe
|
||||
APPMODE = -mconsole
|
||||
IMPORTS = uuid advapi32
|
||||
-DELAYIMPORTS = shell32 shlwapi version user32
|
||||
+DELAYIMPORTS = shell32 shlwapi version user32 setupapi newdev
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
|
||||
index 55f2c6ca0c..5190dcc701 100644
|
||||
--- a/programs/wineboot/wineboot.c
|
||||
+++ b/programs/wineboot/wineboot.c
|
||||
@@ -69,6 +69,8 @@
|
||||
#include <shobjidl.h>
|
||||
#include <shlwapi.h>
|
||||
#include <shellapi.h>
|
||||
+#include <setupapi.h>
|
||||
+#include <newdev.h>
|
||||
#include "resource.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wineboot);
|
||||
@@ -1116,6 +1118,57 @@ static HANDLE start_rundll32( const WCHAR *inf_path, BOOL wow64 )
|
||||
return pi.hProcess;
|
||||
}
|
||||
|
||||
+static void install_root_pnp_devices(void)
|
||||
+{
|
||||
+ static const struct
|
||||
+ {
|
||||
+ const char *name;
|
||||
+ const char *hardware_id;
|
||||
+ const char *infpath;
|
||||
+ }
|
||||
+ root_devices[] =
|
||||
+ {
|
||||
+ {"root\\wine\\winebus", "root\\winebus\0", "C:\\windows\\inf\\winebus.inf"},
|
||||
+ };
|
||||
+ SP_DEVINFO_DATA device = {sizeof(device)};
|
||||
+ unsigned int i;
|
||||
+ HDEVINFO set;
|
||||
+
|
||||
+ if ((set = SetupDiCreateDeviceInfoList( NULL, NULL )) == INVALID_HANDLE_VALUE)
|
||||
+ {
|
||||
+ WINE_ERR("Failed to create device info list, error %#x.\n", GetLastError());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(root_devices); ++i)
|
||||
+ {
|
||||
+ if (!SetupDiCreateDeviceInfoA( set, root_devices[i].name, &GUID_NULL, NULL, NULL, 0, &device))
|
||||
+ {
|
||||
+ if (GetLastError() != ERROR_DEVINST_ALREADY_EXISTS)
|
||||
+ WINE_ERR("Failed to create device %s, error %#x.\n", debugstr_a(root_devices[i].name), GetLastError());
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_HARDWAREID,
|
||||
+ (const BYTE *)root_devices[i].hardware_id, (strlen(root_devices[i].hardware_id) + 2) * sizeof(WCHAR)))
|
||||
+ {
|
||||
+ WINE_ERR("Failed to set hardware id for %s, error %#x.\n", debugstr_a(root_devices[i].name), GetLastError());
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device))
|
||||
+ {
|
||||
+ WINE_ERR("Failed to register device %s, error %#x.\n", debugstr_a(root_devices[i].name), GetLastError());
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!UpdateDriverForPlugAndPlayDevicesA(NULL, root_devices[i].hardware_id, root_devices[i].infpath, 0, NULL))
|
||||
+ WINE_ERR("Failed to install drivers for %s, error %#x.\n", debugstr_a(root_devices[i].name), GetLastError());
|
||||
+ }
|
||||
+
|
||||
+ SetupDiDestroyDeviceInfoList(set);
|
||||
+}
|
||||
+
|
||||
/* execute rundll32 on the wine.inf file if necessary */
|
||||
static void update_wineprefix( BOOL force )
|
||||
{
|
||||
@@ -1159,6 +1212,9 @@ static void update_wineprefix( BOOL force )
|
||||
}
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
+
|
||||
+ install_root_pnp_devices();
|
||||
+
|
||||
WINE_MESSAGE( "wine: configuration in '%s' has been updated.\n", prettyprint_configdir() );
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,85 +0,0 @@
|
||||
From cf2328c46895754b40bf6017d2c300f7a153d0c4 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 22:30:16 -0500
|
||||
Subject: [PATCH] winebus.sys: Initialize and teardown the HID backends while
|
||||
the bus FDO is still extant.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/winebus.sys/main.c | 30 +++++++++++++++---------------
|
||||
1 file changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c
|
||||
index d9ceb83760..b96e38c538 100644
|
||||
--- a/dlls/winebus.sys/main.c
|
||||
+++ b/dlls/winebus.sys/main.c
|
||||
@@ -475,16 +475,31 @@ static NTSTATUS handle_IRP_MN_QUERY_ID(DEVICE_OBJECT *device, IRP *irp)
|
||||
|
||||
static NTSTATUS fdo_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
{
|
||||
+ static const WCHAR SDL_enabledW[] = {'E','n','a','b','l','e',' ','S','D','L',0};
|
||||
+ static const UNICODE_STRING SDL_enabled = {sizeof(SDL_enabledW) - sizeof(WCHAR), sizeof(SDL_enabledW), (WCHAR*)SDL_enabledW};
|
||||
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp);
|
||||
NTSTATUS ret;
|
||||
|
||||
switch (irpsp->MinorFunction)
|
||||
{
|
||||
case IRP_MN_START_DEVICE:
|
||||
+ if (check_bus_option(&SDL_enabled, 1))
|
||||
+ {
|
||||
+ if (sdl_driver_init() == STATUS_SUCCESS)
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+ udev_driver_init();
|
||||
+ iohid_driver_init();
|
||||
+ irp->IoStatus.u.Status = STATUS_SUCCESS;
|
||||
+ break;
|
||||
case IRP_MN_SURPRISE_REMOVAL:
|
||||
irp->IoStatus.u.Status = STATUS_SUCCESS;
|
||||
break;
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
+ udev_driver_unload();
|
||||
+ iohid_driver_unload();
|
||||
+ sdl_driver_unload();
|
||||
+
|
||||
irp->IoStatus.u.Status = STATUS_SUCCESS;
|
||||
IoSkipCurrentIrpStackLocation(irp);
|
||||
ret = IoCallDriver(bus_pdo, irp);
|
||||
@@ -829,9 +844,6 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *p
|
||||
|
||||
static void WINAPI driver_unload(DRIVER_OBJECT *driver)
|
||||
{
|
||||
- udev_driver_unload();
|
||||
- iohid_driver_unload();
|
||||
- sdl_driver_unload();
|
||||
NtClose(driver_key);
|
||||
}
|
||||
|
||||
@@ -907,8 +919,6 @@ static void mouse_device_create(void)
|
||||
|
||||
NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
|
||||
{
|
||||
- static const WCHAR SDL_enabledW[] = {'E','n','a','b','l','e',' ','S','D','L',0};
|
||||
- static const UNICODE_STRING SDL_enabled = {sizeof(SDL_enabledW) - sizeof(WCHAR), sizeof(SDL_enabledW), (WCHAR*)SDL_enabledW};
|
||||
OBJECT_ATTRIBUTES attr = {0};
|
||||
NTSTATUS ret;
|
||||
|
||||
@@ -927,15 +937,5 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
|
||||
driver->DriverExtension->AddDevice = driver_add_device;
|
||||
driver->DriverUnload = driver_unload;
|
||||
|
||||
- mouse_device_create();
|
||||
-
|
||||
- if (check_bus_option(&SDL_enabled, 1))
|
||||
- {
|
||||
- if (sdl_driver_init() == STATUS_SUCCESS)
|
||||
- return STATUS_SUCCESS;
|
||||
- }
|
||||
- udev_driver_init();
|
||||
- iohid_driver_init();
|
||||
-
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,285 +0,0 @@
|
||||
From cdc9b0c079ab9001800e97d2b6303f743f8c2175 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 22:30:17 -0500
|
||||
Subject: [PATCH] ntoskrnl.exe: IoInvalidateDeviceRelations() receives the
|
||||
parent PDO.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 8 ++-
|
||||
dlls/ntoskrnl.exe/ntoskrnl_private.h | 6 ++
|
||||
dlls/ntoskrnl.exe/pnp.c | 86 ++++++++++++++++++++++++----
|
||||
dlls/winebus.sys/bus.h | 1 +
|
||||
dlls/winebus.sys/bus_iohid.c | 2 +-
|
||||
dlls/winebus.sys/bus_sdl.c | 2 +-
|
||||
dlls/winebus.sys/bus_udev.c | 2 +-
|
||||
dlls/winebus.sys/main.c | 11 ++--
|
||||
8 files changed, 97 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 92f9afab33..620f9572da 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -1469,6 +1469,7 @@ NTSTATUS WINAPI IoCreateDevice( DRIVER_OBJECT *driver, ULONG ext_size,
|
||||
{
|
||||
static const WCHAR auto_format[] = {'\\','D','e','v','i','c','e','\\','%','0','8','x',0};
|
||||
NTSTATUS status;
|
||||
+ struct wine_device *wine_device;
|
||||
DEVICE_OBJECT *device;
|
||||
HANDLE manager = get_device_manager();
|
||||
static unsigned int auto_idx = 0;
|
||||
@@ -1477,11 +1478,12 @@ NTSTATUS WINAPI IoCreateDevice( DRIVER_OBJECT *driver, ULONG ext_size,
|
||||
TRACE( "(%p, %u, %s, %u, %x, %u, %p)\n",
|
||||
driver, ext_size, debugstr_us(name), type, characteristics, exclusive, ret_device );
|
||||
|
||||
- if (!(device = alloc_kernel_object( IoDeviceObjectType, NULL, sizeof(DEVICE_OBJECT) + ext_size, 1 )))
|
||||
+ if (!(wine_device = alloc_kernel_object( IoDeviceObjectType, NULL, sizeof(struct wine_device) + ext_size, 1 )))
|
||||
return STATUS_NO_MEMORY;
|
||||
+ device = &wine_device->device_obj;
|
||||
|
||||
device->DriverObject = driver;
|
||||
- device->DeviceExtension = device + 1;
|
||||
+ device->DeviceExtension = wine_device + 1;
|
||||
device->DeviceType = type;
|
||||
device->StackSize = 1;
|
||||
|
||||
@@ -1547,9 +1549,11 @@ void WINAPI IoDeleteDevice( DEVICE_OBJECT *device )
|
||||
|
||||
if (status == STATUS_SUCCESS)
|
||||
{
|
||||
+ struct wine_device *wine_device = CONTAINING_RECORD(device, struct wine_device, device_obj);
|
||||
DEVICE_OBJECT **prev = &device->DriverObject->DeviceObject;
|
||||
while (*prev && *prev != device) prev = &(*prev)->NextDevice;
|
||||
if (*prev) *prev = (*prev)->NextDevice;
|
||||
+ ExFreePool( wine_device->children );
|
||||
ObDereferenceObject( device );
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl_private.h b/dlls/ntoskrnl.exe/ntoskrnl_private.h
|
||||
index b5244ef164..256e945e6f 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl_private.h
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl_private.h
|
||||
@@ -86,4 +86,10 @@ static const WCHAR servicesW[] = {'\\','R','e','g','i','s','t','r','y',
|
||||
'\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t',
|
||||
'\\','S','e','r','v','i','c','e','s',
|
||||
'\\',0};
|
||||
+
|
||||
+struct wine_device
|
||||
+{
|
||||
+ DEVICE_OBJECT device_obj;
|
||||
+ DEVICE_RELATIONS *children;
|
||||
+};
|
||||
#endif
|
||||
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c
|
||||
index 30865a05dc..c618885d42 100644
|
||||
--- a/dlls/ntoskrnl.exe/pnp.c
|
||||
+++ b/dlls/ntoskrnl.exe/pnp.c
|
||||
@@ -316,25 +316,18 @@ static void start_device( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVINFO_DATA *
|
||||
}
|
||||
}
|
||||
|
||||
-static void handle_bus_relations( DEVICE_OBJECT *device )
|
||||
+static void enumerate_new_device( DEVICE_OBJECT *device, HDEVINFO set )
|
||||
{
|
||||
static const WCHAR infpathW[] = {'I','n','f','P','a','t','h',0};
|
||||
|
||||
SP_DEVINFO_DATA sp_device = {sizeof(sp_device)};
|
||||
WCHAR device_instance_id[MAX_DEVICE_ID_LEN];
|
||||
BOOL need_driver = TRUE;
|
||||
- HDEVINFO set;
|
||||
HKEY key;
|
||||
|
||||
- /* We could (should?) do a full IRP_MN_QUERY_DEVICE_RELATIONS query,
|
||||
- * but we don't have to, we have the DEVICE_OBJECT of the new device
|
||||
- * so we can simply handle the process here */
|
||||
-
|
||||
if (get_device_instance_id( device, device_instance_id ))
|
||||
return;
|
||||
|
||||
- set = SetupDiCreateDeviceInfoList( NULL, NULL );
|
||||
-
|
||||
if (!SetupDiCreateDeviceInfoW( set, device_instance_id, &GUID_NULL, NULL, NULL, 0, &sp_device )
|
||||
&& !SetupDiOpenDeviceInfoW( set, device_instance_id, NULL, 0, &sp_device ))
|
||||
{
|
||||
@@ -362,19 +355,92 @@ static void handle_bus_relations( DEVICE_OBJECT *device )
|
||||
}
|
||||
|
||||
start_device( device, set, &sp_device );
|
||||
-
|
||||
- SetupDiDestroyDeviceInfoList( set );
|
||||
}
|
||||
|
||||
static void remove_device( DEVICE_OBJECT *device )
|
||||
{
|
||||
+ struct wine_device *wine_device = CONTAINING_RECORD(device, struct wine_device, device_obj);
|
||||
+
|
||||
TRACE("Removing device %p.\n", device);
|
||||
|
||||
+ if (wine_device->children)
|
||||
+ {
|
||||
+ ULONG i;
|
||||
+ for (i = 0; i < wine_device->children->Count; ++i)
|
||||
+ remove_device( wine_device->children->Objects[i] );
|
||||
+ }
|
||||
+
|
||||
send_power_irp( device, PowerDeviceD3 );
|
||||
send_pnp_irp( device, IRP_MN_SURPRISE_REMOVAL );
|
||||
send_pnp_irp( device, IRP_MN_REMOVE_DEVICE );
|
||||
}
|
||||
|
||||
+static BOOL device_in_list( const DEVICE_RELATIONS *list, const DEVICE_OBJECT *device )
|
||||
+{
|
||||
+ ULONG i;
|
||||
+ for (i = 0; i < list->Count; ++i)
|
||||
+ {
|
||||
+ if (list->Objects[i] == device)
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static void handle_bus_relations( DEVICE_OBJECT *parent )
|
||||
+{
|
||||
+ struct wine_device *wine_parent = CONTAINING_RECORD(parent, struct wine_device, device_obj);
|
||||
+ SP_DEVINFO_DATA sp_device = {sizeof(sp_device)};
|
||||
+ DEVICE_RELATIONS *relations;
|
||||
+ IO_STATUS_BLOCK irp_status;
|
||||
+ IO_STACK_LOCATION *irpsp;
|
||||
+ NTSTATUS status;
|
||||
+ HDEVINFO set;
|
||||
+ IRP *irp;
|
||||
+ ULONG i;
|
||||
+
|
||||
+ TRACE( "(%p)\n", parent );
|
||||
+
|
||||
+ set = SetupDiCreateDeviceInfoList( NULL, NULL );
|
||||
+
|
||||
+ parent = IoGetAttachedDevice( parent );
|
||||
+
|
||||
+ if (!(irp = IoBuildSynchronousFsdRequest( IRP_MJ_PNP, parent, NULL, 0, NULL, NULL, &irp_status )))
|
||||
+ {
|
||||
+ SetupDiDestroyDeviceInfoList( set );
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ irpsp = IoGetNextIrpStackLocation( irp );
|
||||
+ irpsp->MinorFunction = IRP_MN_QUERY_DEVICE_RELATIONS;
|
||||
+ irpsp->Parameters.QueryDeviceRelations.Type = BusRelations;
|
||||
+ if ((status = send_device_irp( parent, irp, (ULONG_PTR *)&relations )))
|
||||
+ {
|
||||
+ ERR("Failed to enumerate child devices, status %#x.\n", status);
|
||||
+ SetupDiDestroyDeviceInfoList( set );
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ TRACE("Got %u devices.\n", relations->Count);
|
||||
+
|
||||
+ for (i = 0; i < relations->Count; ++i)
|
||||
+ {
|
||||
+ DEVICE_OBJECT *child = relations->Objects[i];
|
||||
+
|
||||
+ TRACE("%p, %p\n", wine_parent, wine_parent->children);
|
||||
+
|
||||
+ if (!wine_parent->children || !device_in_list( wine_parent->children, child ))
|
||||
+ {
|
||||
+ TRACE("Adding new device %p.\n", child);
|
||||
+ enumerate_new_device( child, set );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ExFreePool( wine_parent->children );
|
||||
+ wine_parent->children = relations;
|
||||
+
|
||||
+ SetupDiDestroyDeviceInfoList( set );
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* IoInvalidateDeviceRelations (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h
|
||||
index de8ddf7ad9..a250878489 100644
|
||||
--- a/dlls/winebus.sys/bus.h
|
||||
+++ b/dlls/winebus.sys/bus.h
|
||||
@@ -54,3 +54,4 @@ DWORD check_bus_option(const UNICODE_STRING *option, DWORD default_value) DECLSP
|
||||
BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
|
||||
|
||||
HANDLE driver_key DECLSPEC_HIDDEN;
|
||||
+DEVICE_OBJECT *bus_pdo DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c
|
||||
index 7933374007..e992db8376 100644
|
||||
--- a/dlls/winebus.sys/bus_iohid.c
|
||||
+++ b/dlls/winebus.sys/bus_iohid.c
|
||||
@@ -357,7 +357,7 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void *
|
||||
struct platform_private *private = impl_from_DEVICE_OBJECT(device);
|
||||
private->device = IOHIDDevice;
|
||||
private->buffer = NULL;
|
||||
- IoInvalidateDeviceRelations(device, BusRelations);
|
||||
+ IoInvalidateDeviceRelations(bus_pdo, BusRelations);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c
|
||||
index d24e21cff8..781deda767 100644
|
||||
--- a/dlls/winebus.sys/bus_sdl.c
|
||||
+++ b/dlls/winebus.sys/bus_sdl.c
|
||||
@@ -988,7 +988,7 @@ static void try_add_device(SDL_JoystickID index)
|
||||
HeapFree(GetProcessHeap(), 0, serial);
|
||||
return;
|
||||
}
|
||||
- IoInvalidateDeviceRelations(device, BusRelations);
|
||||
+ IoInvalidateDeviceRelations(bus_pdo, BusRelations);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
|
||||
index 08ad8765af..9a3df9ea6b 100644
|
||||
--- a/dlls/winebus.sys/bus_udev.c
|
||||
+++ b/dlls/winebus.sys/bus_udev.c
|
||||
@@ -1241,7 +1241,7 @@ static void try_add_device(struct udev_device *dev)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
- IoInvalidateDeviceRelations(device, BusRelations);
|
||||
+ IoInvalidateDeviceRelations(bus_pdo, BusRelations);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c
|
||||
index b96e38c538..26200bde3e 100644
|
||||
--- a/dlls/winebus.sys/main.c
|
||||
+++ b/dlls/winebus.sys/main.c
|
||||
@@ -73,7 +73,8 @@ static DRIVER_OBJECT *driver_obj;
|
||||
static DEVICE_OBJECT *mouse_obj;
|
||||
|
||||
/* The root-enumerated device stack. */
|
||||
-static DEVICE_OBJECT *bus_pdo, *bus_fdo;
|
||||
+DEVICE_OBJECT *bus_pdo;
|
||||
+static DEVICE_OBJECT *bus_fdo;
|
||||
|
||||
HANDLE driver_key;
|
||||
|
||||
@@ -482,6 +483,9 @@ static NTSTATUS fdo_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
|
||||
switch (irpsp->MinorFunction)
|
||||
{
|
||||
+ case IRP_MN_QUERY_DEVICE_RELATIONS:
|
||||
+ irp->IoStatus.u.Status = handle_IRP_MN_QUERY_DEVICE_RELATIONS(irp);
|
||||
+ break;
|
||||
case IRP_MN_START_DEVICE:
|
||||
if (check_bus_option(&SDL_enabled, 1))
|
||||
{
|
||||
@@ -521,11 +525,6 @@ static NTSTATUS pdo_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp)
|
||||
|
||||
switch (irpsp->MinorFunction)
|
||||
{
|
||||
- case IRP_MN_QUERY_DEVICE_RELATIONS:
|
||||
- TRACE("IRP_MN_QUERY_DEVICE_RELATIONS\n");
|
||||
- status = handle_IRP_MN_QUERY_DEVICE_RELATIONS(irp);
|
||||
- irp->IoStatus.u.Status = status;
|
||||
- break;
|
||||
case IRP_MN_QUERY_ID:
|
||||
TRACE("IRP_MN_QUERY_ID\n");
|
||||
status = handle_IRP_MN_QUERY_ID(device, irp);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,57 +0,0 @@
|
||||
From 0b5b7f54630a4e7e2f3ed0fa82fbad727fbc0a77 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 27 Jun 2019 22:30:15 -0500
|
||||
Subject: [PATCH] wine.inf: Remove registration for the winebus service.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
loader/wine.inf.in | 12 ------------
|
||||
1 file changed, 12 deletions(-)
|
||||
|
||||
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
|
||||
index 02e46c5a542..eb6cfbbd705 100644
|
||||
--- a/loader/wine.inf.in
|
||||
+++ b/loader/wine.inf.in
|
||||
@@ -135,7 +135,6 @@ AddService=FontCache3.0.0.0,0,WPFFontCacheService
|
||||
AddService=LanmanServer,0,LanmanServerService
|
||||
AddService=FontCache,0,FontCacheService
|
||||
AddService=Schedule,0,TaskSchedulerService
|
||||
-AddService=WineBus,0,WineBusService
|
||||
AddService=Winmgmt,0,WinmgmtService
|
||||
AddService=wuauserv,0,wuauService
|
||||
|
||||
@@ -153,7 +152,6 @@ AddService=FontCache3.0.0.0,0,WPFFontCacheService
|
||||
AddService=LanmanServer,0,LanmanServerService
|
||||
AddService=FontCache,0,FontCacheService
|
||||
AddService=Schedule,0,TaskSchedulerService
|
||||
-AddService=WineBus,0,WineBusService
|
||||
AddService=Winmgmt,0,WinmgmtService
|
||||
AddService=wuauserv,0,wuauService
|
||||
|
||||
@@ -171,7 +169,6 @@ AddService=FontCache3.0.0.0,0,WPFFontCacheService
|
||||
AddService=LanmanServer,0,LanmanServerService
|
||||
AddService=FontCache,0,FontCacheService
|
||||
AddService=Schedule,0,TaskSchedulerService
|
||||
-AddService=WineBus,0,WineBusService
|
||||
AddService=Winmgmt,0,WinmgmtService
|
||||
AddService=wuauserv,0,wuauService
|
||||
|
||||
@@ -3681,15 +3678,6 @@ ServiceType=32
|
||||
StartType=3
|
||||
ErrorControl=1
|
||||
|
||||
-[WineBusService]
|
||||
-Description="Wine Platform Bus Kernel"
|
||||
-DisplayName="Platform Bus Kernel"
|
||||
-ServiceBinary="%12%\winebus.sys"
|
||||
-LoadOrderGroup="WinePlugPlay"
|
||||
-ServiceType=1
|
||||
-StartType=2
|
||||
-ErrorControl=1
|
||||
-
|
||||
[SpoolerService]
|
||||
AddReg=SpoolerServiceKeys
|
||||
Description="Loads files to memory for later printing"
|
||||
--
|
||||
2.17.1
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "7f469b689a2dccc0863952cd73e592df391dc607"
|
||||
echo "88d30985ddd534e8bafed531e619846bc8d10839"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -227,7 +227,6 @@ patch_enable_all ()
|
||||
enable_ntdll_ext4_case_folder="$1"
|
||||
enable_ntdll_set_full_cpu_context="$1"
|
||||
enable_ntoskrnl_Stubs="$1"
|
||||
enable_ntoskrnl_exe_IoInvalidateDeviceRelations="$1"
|
||||
enable_nvapi_Stub_DLL="$1"
|
||||
enable_nvcuda_CUDA_Support="$1"
|
||||
enable_nvcuvid_CUDA_Video_Support="$1"
|
||||
@ -804,9 +803,6 @@ patch_enable ()
|
||||
ntoskrnl-Stubs)
|
||||
enable_ntoskrnl_Stubs="$2"
|
||||
;;
|
||||
ntoskrnl.exe-IoInvalidateDeviceRelations)
|
||||
enable_ntoskrnl_exe_IoInvalidateDeviceRelations="$2"
|
||||
;;
|
||||
nvapi-Stub_DLL)
|
||||
enable_nvapi_Stub_DLL="$2"
|
||||
;;
|
||||
@ -3095,13 +3091,12 @@ fi
|
||||
# Patchset dsdmo-new-dll
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * configure, configure.ac, dlls/dsdmo/Makefile.in, dlls/dsdmo/chorus.c, dlls/dsdmo/compressor.c, dlls/dsdmo/distortion.c,
|
||||
# | dlls/dsdmo/dsdmo.spec, dlls/dsdmo/dsdmo_classes.idl, dlls/dsdmo/dsdmo_private.h, dlls/dsdmo/echo.c,
|
||||
# | dlls/dsdmo/flanger.c, dlls/dsdmo/gargle.c, dlls/dsdmo/main.c, dlls/dsdmo/parameq.c, dlls/dsdmo/reverb.c,
|
||||
# | dlls/dsdmo/reverb2.c, dlls/dsound/buffer.c, dlls/dsound/tests/dsound8.c
|
||||
# | * dlls/dsdmo/Makefile.in, dlls/dsdmo/chorus.c, dlls/dsdmo/compressor.c, dlls/dsdmo/distortion.c,
|
||||
# | dlls/dsdmo/dsdmo_classes.idl, dlls/dsdmo/dsdmo_private.h, dlls/dsdmo/echo.c, dlls/dsdmo/flanger.c, dlls/dsdmo/gargle.c,
|
||||
# | dlls/dsdmo/main.c, dlls/dsdmo/parameq.c, dlls/dsdmo/reverb.c, dlls/dsdmo/reverb2.c, dlls/dsound/buffer.c,
|
||||
# | dlls/dsound/tests/dsound8.c
|
||||
# |
|
||||
if test "$enable_dsdmo_new_dll" -eq 1; then
|
||||
patch_apply dsdmo-new-dll/0001-dsdmo-Added-dll.patch
|
||||
patch_apply dsdmo-new-dll/0002-dsdmo-Add-IDirectSoundFXEcho-support.patch
|
||||
patch_apply dsdmo-new-dll/0003-dsdmo-Add-IDirectSoundFXChorus-support.patch
|
||||
patch_apply dsdmo-new-dll/0004-dsdmo-Add-IDirectSoundFXCompressor-support.patch
|
||||
@ -3129,7 +3124,6 @@ if test "$enable_dsdmo_new_dll" -eq 1; then
|
||||
patch_apply dsdmo-new-dll/0026-dsdmo-Implement-IDirectSoundFXParamEq-SetAllParamete.patch
|
||||
patch_apply dsdmo-new-dll/0027-dsdmo-Implement-IDirectSoundFXI3DL2Reverb-SetAllPara.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Added dll.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXEcho support.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXChorus support.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dsdmo: Add IDirectSoundFXCompressor support.", 1 },';
|
||||
@ -4857,14 +4851,14 @@ fi
|
||||
# | * [#45572] League of Legends 8.12+ fails to start a game (anticheat engine, hooking of NtContinue)
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/exception.c, dlls/ntdll/ntdll.spec, dlls/ntdll/signal_i386.c
|
||||
# | * dlls/ntdll/exception.c, dlls/ntdll/ntdll.spec, dlls/ntdll/signal_i386.c, dlls/ntdll/signal_x86_64.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtContinue" -eq 1; then
|
||||
patch_apply ntdll-NtContinue/0001-ntdll-Add-stub-for-NtContinue.patch
|
||||
patch_apply ntdll-NtContinue/0002-Use-NtContinue-to-continue-execution-after-exception.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "ntdll: Add stub for NtContinue.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Wesie", "Use NtContinue to continue execution after exceptions.", 1 },';
|
||||
printf '%s\n' '+ { "Andrew Wesie", "ntdll: Use NtContinue to continue execution after exceptions.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -5142,34 +5136,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntoskrnl.exe-IoInvalidateDeviceRelations
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#33498] Implement framework for installing and running native PnP drivers.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * configure, configure.ac, dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl_private.h, dlls/ntoskrnl.exe/pnp.c,
|
||||
# | dlls/winebus.sys/bus.h, dlls/winebus.sys/bus_iohid.c, dlls/winebus.sys/bus_sdl.c, dlls/winebus.sys/bus_udev.c,
|
||||
# | dlls/winebus.sys/main.c, loader/Makefile.in, loader/wine.inf.in, loader/winebus.inf.in, programs/wineboot/Makefile.in,
|
||||
# | programs/wineboot/wineboot.c
|
||||
# |
|
||||
if test "$enable_ntoskrnl_exe_IoInvalidateDeviceRelations" -eq 1; then
|
||||
patch_apply ntoskrnl.exe-IoInvalidateDeviceRelations/0001-winebus.inf-Add-new-INF-file-and-copy-it-to-the-INF-.patch
|
||||
patch_apply ntoskrnl.exe-IoInvalidateDeviceRelations/0002-winebus.sys-Implement-AddDevice.patch
|
||||
patch_apply ntoskrnl.exe-IoInvalidateDeviceRelations/0003-wineboot-Create-a-root-enumerated-device-object-for-.patch
|
||||
patch_apply ntoskrnl.exe-IoInvalidateDeviceRelations/0004-winebus.sys-Initialize-and-teardown-the-HID-backends.patch
|
||||
patch_apply ntoskrnl.exe-IoInvalidateDeviceRelations/0005-ntoskrnl.exe-IoInvalidateDeviceRelations-receives-th.patch
|
||||
patch_apply ntoskrnl.exe-IoInvalidateDeviceRelations/0028-wine.inf-Remove-registration-for-the-winebus-service.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Zebediah Figura", "winebus.inf: Add new INF file and copy it to the INF directory.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "winebus.sys: Implement AddDevice().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "wineboot: Create a root-enumerated device object for winebus.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "winebus.sys: Initialize and teardown the HID backends while the bus FDO is still extant.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: IoInvalidateDeviceRelations() receives the parent PDO.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "wine.inf: Remove registration for the winebus service.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset nvcuvid-CUDA_Video_Support
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f1ad4754966ca722ec8f119e15ad789efaadb275 Mon Sep 17 00:00:00 2001
|
||||
From 06ca247b861836d715668818370337d415ceebfa Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 13 May 2015 06:58:16 +0200
|
||||
Subject: [PATCH] wineboot: Init
|
||||
@ -10,10 +10,10 @@ Based on a patch by Jactry Zeng.
|
||||
1 file changed, 36 insertions(+)
|
||||
|
||||
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
|
||||
index fc3211c9fd0..374ad3b0479 100644
|
||||
index 4d65b9c13a4..4718a8f717e 100644
|
||||
--- a/programs/wineboot/wineboot.c
|
||||
+++ b/programs/wineboot/wineboot.c
|
||||
@@ -696,6 +696,41 @@ static void create_volatile_environment_registry_key(void)
|
||||
@@ -701,6 +701,41 @@ static void create_volatile_environment_registry_key(void)
|
||||
RegCloseKey( hkey );
|
||||
}
|
||||
|
||||
@ -55,9 +55,9 @@ index fc3211c9fd0..374ad3b0479 100644
|
||||
/* Performs the rename operations dictated in %SystemRoot%\Wininit.ini.
|
||||
* Returns FALSE if there was an error, or otherwise if all is ok.
|
||||
*/
|
||||
@@ -1346,6 +1381,7 @@ static void update_wineprefix( BOOL force )
|
||||
@@ -1350,6 +1385,7 @@ static void update_wineprefix( BOOL force )
|
||||
DestroyWindow( hwnd );
|
||||
}
|
||||
|
||||
install_root_pnp_devices();
|
||||
+ create_etc_stub_files();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 40ee70592246e1351d6fe6994a1ba01c12fd567e Mon Sep 17 00:00:00 2001
|
||||
From 3ac1fcd7a2aec193c8146bac8e99e5e66dc79f73 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 8 Aug 2018 20:00:15 -0500
|
||||
Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition.
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition.
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 13cbaf6b265..2a07dc97cb7 100644
|
||||
index 4bf05305f55..0c74367f53e 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3985,18 +3985,20 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
||||
@@ -4440,19 +4440,21 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ index 13cbaf6b265..2a07dc97cb7 100644
|
||||
static const WCHAR kernel32W[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\',
|
||||
's','y','s','t','e','m','3','2','\\',
|
||||
'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
RTL_USER_PROCESS_PARAMETERS *params;
|
||||
static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
|
||||
ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
|
||||
- WINE_MODREF *wm;
|
||||
@ -34,7 +35,7 @@ index 13cbaf6b265..2a07dc97cb7 100644
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
UNICODE_STRING nt_name;
|
||||
@@ -4024,6 +4026,13 @@ void __wine_process_init(void)
|
||||
@@ -4496,6 +4498,13 @@ void __wine_process_init(void)
|
||||
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
|
||||
exit(1);
|
||||
}
|
||||
@ -49,10 +50,10 @@ index 13cbaf6b265..2a07dc97cb7 100644
|
||||
if ((status = LdrGetProcedureAddress( wm->ldr.BaseAddress, &func_name,
|
||||
0, (void **)&init_func )) != STATUS_SUCCESS)
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 164feae327c..9dc59e300bd 100644
|
||||
index 1c4dbaf94ce..0c3170b789b 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1049,6 +1049,7 @@
|
||||
@@ -1085,6 +1085,7 @@
|
||||
@ stdcall WinSqmIsOptedIn()
|
||||
@ stdcall WinSqmSetDWORD(ptr long long)
|
||||
@ stdcall WinSqmStartSession(ptr long long)
|
||||
|
Loading…
Reference in New Issue
Block a user