Rebase against e80df2d2d54a3f16389bea77f6863cc1c05d6251.

This commit is contained in:
Zebediah Figura 2020-06-18 19:12:14 -05:00
parent 02913f754f
commit d799e8fd82
24 changed files with 293 additions and 1011 deletions

View File

@ -1,4 +1,4 @@
From 5119eda2439a1fb81042f85ec76e5e5794ab4182 Mon Sep 17 00:00:00 2001
From ed999d4430c1aca8f90f26670d3615cdaaab300d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@ -28,10 +28,10 @@ index 0d19e12768f..e313d5807b3 100644
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 2de9553f5c4..84801ab2f25 100644
index 47800db41b1..12e7b721cb5 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -89,6 +89,9 @@ extern int __wine_main_argc;
@@ -86,6 +86,9 @@ extern int __wine_main_argc;
extern char **__wine_main_argv;
extern WCHAR **__wine_main_wargv;
@ -42,10 +42,10 @@ index 2de9553f5c4..84801ab2f25 100644
extern const char *build_dir DECLSPEC_HIDDEN;
extern const char *data_dir DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index a14b24219fc..5d50a7a1363 100644
index b1cc307d2ae..2e5fee216ef 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -108,6 +108,24 @@ HANDLE CDECL __wine_make_process_system(void)
@@ -85,6 +85,24 @@ HANDLE CDECL __wine_make_process_system(void)
return ret;
}
@ -67,9 +67,9 @@ index a14b24219fc..5d50a7a1363 100644
+ return ret;
+}
+
ULONG_PTR get_system_affinity_mask(void)
{
ULONG num_cpus = NtCurrentTeb()->Peb->NumberOfProcessors;
/******************************************************************************
* NtQueryInformationProcess [NTDLL.@]
* ZwQueryInformationProcess [NTDLL.@]
diff --git a/server/protocol.def b/server/protocol.def
index 6e0f309450a..7315f8ac4ea 100644
--- a/server/protocol.def

View File

@ -1,257 +0,0 @@
From 83b3fa31740e063ba4c86667097db974e6ae0c68 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 17 Jul 2019 16:33:21 +1000
Subject: [PATCH] directmanipulation: Create
DirectManipulationManager/DirectManipulationSharedManager objects
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44865
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/directmanipulation/Makefile.in | 1 +
dlls/directmanipulation/directmanipulation.c | 203 ++++++++++++++++++-
2 files changed, 203 insertions(+), 1 deletion(-)
diff --git a/dlls/directmanipulation/Makefile.in b/dlls/directmanipulation/Makefile.in
index 331c2a84205..d67a21eb779 100644
--- a/dlls/directmanipulation/Makefile.in
+++ b/dlls/directmanipulation/Makefile.in
@@ -1,4 +1,5 @@
MODULE = directmanipulation.dll
+IMPORTS = uuid
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index f808bc1a331..a1e508bac80 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -15,6 +15,7 @@
* 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 <stdarg.h>
@@ -22,8 +23,11 @@
#include "winbase.h"
#include "oleidl.h"
#include "rpcproxy.h"
+#include "wine/heap.h"
#include "wine/debug.h"
+#include "directmanipulation.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(manipulation);
static HINSTANCE dm_instance;
@@ -60,8 +64,205 @@ HRESULT WINAPI DllCanUnloadNow(void)
return S_FALSE;
}
+
+struct directmanipulation
+{
+ IDirectManipulationManager2 IDirectManipulationManager2_iface;
+ LONG ref;
+};
+
+static inline struct directmanipulation *impl_from_IDirectManipulationManager2(IDirectManipulationManager2 *iface)
+{
+ return CONTAINING_RECORD(iface, struct directmanipulation, IDirectManipulationManager2_iface);
+}
+
+static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
+{
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationManager) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationManager2)) {
+ IUnknown_AddRef(iface);
+ *ppv = iface;
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI direct_manip_AddRef(IDirectManipulationManager2 *iface)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI direct_manip_Release(IDirectManipulationManager2 *iface)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ heap_free(This);
+ }
+ return ref;
+}
+
+static HRESULT WINAPI direct_manip_Activate(IDirectManipulationManager2 *iface, HWND window)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %p\n", This, window);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_Deactivate(IDirectManipulationManager2 *iface, HWND window)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %p\n", This, window);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_RegisterHitTestTarget(IDirectManipulationManager2 *iface, HWND window,
+ HWND hittest, DIRECTMANIPULATION_HITTEST_TYPE type)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %p, %p, %d\n", This, window, hittest, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_ProcessInput(IDirectManipulationManager2 *iface, const MSG *msg, BOOL *handled)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %p, %p\n", This, msg, handled);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2 *iface, REFIID riid, void **obj)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %s, %p\n", This, debugstr_guid(riid), obj);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
+ HWND window, REFIID riid, void **obj)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_CreateContent(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
+ REFCLSID clsid, REFIID riid, void **obj)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %p, %s, %p\n", This, frame, debugstr_guid(riid), obj);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI direct_manip_CreateBehavior(IDirectManipulationManager2 *iface, REFCLSID clsid, REFIID riid, void **obj)
+{
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
+ FIXME("%p, %s, %s, %p\n", This, debugstr_guid(clsid), debugstr_guid(riid), obj);
+ return E_NOTIMPL;
+}
+
+static const struct IDirectManipulationManager2Vtbl directmanipVtbl =
+{
+ direct_manip_QueryInterface,
+ direct_manip_AddRef,
+ direct_manip_Release,
+ direct_manip_Activate,
+ direct_manip_Deactivate,
+ direct_manip_RegisterHitTestTarget,
+ direct_manip_ProcessInput,
+ direct_manip_GetUpdateManager,
+ direct_manip_CreateViewport,
+ direct_manip_CreateContent,
+ direct_manip_CreateBehavior
+};
+
+static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
+{
+ struct directmanipulation *object;
+ HRESULT ret;
+
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
+
+ *ppv = NULL;
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if (!object)
+ return E_OUTOFMEMORY;
+
+ object->IDirectManipulationManager2_iface.lpVtbl = &directmanipVtbl;
+ object->ref = 1;
+
+ ret = direct_manip_QueryInterface(&object->IDirectManipulationManager2_iface, riid, ppv);
+ direct_manip_Release(&object->IDirectManipulationManager2_iface);
+
+ return ret;
+}
+
+static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
+{
+ *ppv = NULL;
+
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
+ *ppv = iface;
+ }
+
+ if(*ppv) {
+ IUnknown_AddRef((IUnknown*)*ppv);
+ return S_OK;
+ }
+
+ WARN("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
+{
+ TRACE("(%p)\n", iface);
+ return 2;
+}
+
+static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
+{
+ TRACE("(%p)\n", iface);
+ return 1;
+}
+
+static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
+{
+ TRACE("(%p)->(%x)\n", iface, fLock);
+ return S_OK;
+}
+
+static const IClassFactoryVtbl DirectFactoryVtbl = {
+ ClassFactory_QueryInterface,
+ ClassFactory_AddRef,
+ ClassFactory_Release,
+ DirectManipulation_CreateInstance,
+ ClassFactory_LockServer
+};
+
+static IClassFactory direct_factory = { &DirectFactoryVtbl };
+
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
- FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+ if(IsEqualGUID(&CLSID_DirectManipulationManager, rclsid) ||
+ IsEqualGUID(&CLSID_DirectManipulationSharedManager, rclsid) ) {
+ TRACE("(CLSID_DirectManipulationManager %s %p)\n", debugstr_guid(riid), ppv);
+ return IClassFactory_QueryInterface(&direct_factory, riid, ppv);
+ }
+
+ FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
--
2.27.0

View File

@ -1,4 +1,4 @@
From c7190485c2cc3ccc4d6480d0621552aa488154bd Mon Sep 17 00:00:00 2001
From 9a5ebfa598dedd23eeef0ea4d1a292f4e6281a1c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 23 Jul 2019 08:37:12 +1000
Subject: [PATCH] directmanipulation: Supprot
@ -10,10 +10,10 @@ Subject: [PATCH] directmanipulation: Supprot
1 file changed, 49 insertions(+)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index 44d74b368d0..f5a8aee5de2 100644
index 3b4c19a7994..e1cfec7a6a5 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -213,6 +213,7 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
@@ -340,6 +340,7 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
struct directcompositor
{
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
@ -21,7 +21,7 @@ index 44d74b368d0..f5a8aee5de2 100644
LONG ref;
};
@@ -221,8 +222,15 @@ static inline struct directcompositor *impl_from_IDirectManipulationCompositor(I
@@ -348,8 +349,15 @@ static inline struct directcompositor *impl_from_IDirectManipulationCompositor(I
return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface);
}
@ -37,7 +37,7 @@ index 44d74b368d0..f5a8aee5de2 100644
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectManipulationCompositor))
{
@@ -230,6 +238,12 @@ static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *i
@@ -357,6 +365,12 @@ static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *i
*ppv = iface;
return S_OK;
}
@ -50,7 +50,7 @@ index 44d74b368d0..f5a8aee5de2 100644
FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
return E_NOINTERFACE;
@@ -299,6 +313,40 @@ static const struct IDirectManipulationCompositorVtbl compositorVtbl =
@@ -426,6 +440,40 @@ static const struct IDirectManipulationCompositorVtbl compositorVtbl =
compositor_Flush
};
@ -91,7 +91,7 @@ index 44d74b368d0..f5a8aee5de2 100644
static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
{
struct directcompositor *object;
@@ -313,6 +361,7 @@ static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnk
@@ -440,6 +488,7 @@ static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnk
return E_OUTOFMEMORY;
object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl;
@ -100,5 +100,5 @@ index 44d74b368d0..f5a8aee5de2 100644
ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv);
--
2.17.1
2.27.0

View File

@ -1,176 +0,0 @@
From 3b024e2861712c7fd833c77a2de71b025102309f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 22 Jul 2019 10:36:34 +1000
Subject: [PATCH] directmanipulation: Implement IDirectManipulationManager2
GetUpdateManager.
---
dlls/directmanipulation/directmanipulation.c | 131 ++++++++++++++++++-
1 file changed, 129 insertions(+), 2 deletions(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index edfdda980e..c67d3ff956 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -68,6 +68,13 @@ HRESULT WINAPI DllCanUnloadNow(void)
struct directmanipulation
{
IDirectManipulationManager2 IDirectManipulationManager2_iface;
+ IDirectManipulationUpdateManager *updatemanager;
+ LONG ref;
+};
+
+struct directupdatemanager
+{
+ IDirectManipulationUpdateManager IDirectManipulationUpdateManager_iface;
LONG ref;
};
@@ -76,6 +83,100 @@ static inline struct directmanipulation *impl_from_IDirectManipulationManager2(I
return CONTAINING_RECORD(iface, struct directmanipulation, IDirectManipulationManager2_iface);
}
+static inline struct directupdatemanager *impl_from_IDirectManipulationUpdateManager(IDirectManipulationUpdateManager *iface)
+{
+ return CONTAINING_RECORD(iface, struct directupdatemanager, IDirectManipulationUpdateManager_iface);
+}
+
+static HRESULT WINAPI update_manager_QueryInterface(IDirectManipulationUpdateManager *iface, REFIID riid,void **ppv)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationUpdateManager)) {
+ IUnknown_AddRef(iface);
+ *ppv = iface;
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p), not found\n", This, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+ULONG WINAPI update_manager_AddRef(IDirectManipulationUpdateManager *iface)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+ULONG WINAPI update_manager_Release(IDirectManipulationUpdateManager *iface)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ heap_free(This);
+ }
+ return ref;
+}
+
+static HRESULT WINAPI update_manager_RegisterWaitHandleCallback(IDirectManipulationUpdateManager *iface, HANDLE handle,
+ IDirectManipulationUpdateHandler *handler, DWORD *cookie)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ FIXME("%p, %p, %p, %p\n", This, handle, handler, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI update_manager_UnregisterWaitHandleCallback(IDirectManipulationUpdateManager *iface, DWORD cookie)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ FIXME("%p, %x\n", This, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI update_manager_Update(IDirectManipulationUpdateManager *iface, IDirectManipulationFrameInfoProvider *provider)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ FIXME("%p, %p\n", This, provider);
+ return E_NOTIMPL;
+}
+
+struct IDirectManipulationUpdateManagerVtbl updatemanagerVtbl =
+{
+ update_manager_QueryInterface,
+ update_manager_AddRef,
+ update_manager_Release,
+ update_manager_RegisterWaitHandleCallback,
+ update_manager_UnregisterWaitHandleCallback,
+ update_manager_Update
+};
+
+static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
+{
+ struct directupdatemanager *object;
+
+ object = heap_alloc(sizeof(*object));
+ if(!object)
+ return E_OUTOFMEMORY;
+
+ object->IDirectManipulationUpdateManager_iface.lpVtbl = &updatemanagerVtbl;
+ object->ref = 1;
+
+ *obj = &object->IDirectManipulationUpdateManager_iface;
+
+ return S_OK;
+}
+
static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
{
if (IsEqualGUID(riid, &IID_IUnknown) ||
@@ -109,6 +210,8 @@ static ULONG WINAPI direct_manip_Release(IDirectManipulationManager2 *iface)
if (!ref)
{
+ if(This->updatemanager)
+ IDirectManipulationUpdateManager_Release(This->updatemanager);
heap_free(This);
}
return ref;
@@ -146,8 +249,32 @@ static HRESULT WINAPI direct_manip_ProcessInput(IDirectManipulationManager2 *ifa
static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2 *iface, REFIID riid, void **obj)
{
struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
- FIXME("%p, %s, %p\n", This, debugstr_guid(riid), obj);
- return E_NOTIMPL;
+ HRESULT hr = E_FAIL;
+
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), obj);
+
+ *obj = NULL;
+ if(IsEqualGUID(riid, &IID_IDirectManipulationUpdateManager))
+ {
+ if(!This->updatemanager)
+ {
+ hr = create_update_manager(&This->updatemanager);
+ }
+ else
+ {
+ hr = S_OK;
+ }
+
+ if(hr == S_OK)
+ {
+ IDirectManipulationUpdateManager_AddRef(This->updatemanager);
+ *obj = This->updatemanager;
+ }
+ }
+ else
+ FIXME("Interface %s currently not supported.\n", debugstr_guid(riid));
+
+ return hr;
}
static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
--
2.17.1

View File

@ -1,118 +0,0 @@
From efa0cbb8de357cf24f6eb4d15c638dd3c26819ba Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 29 Jul 2019 09:09:41 +1000
Subject: [PATCH] directmanipulation/tests: Initial tests
---
configure | 1 +
configure.ac | 1 +
dlls/directmanipulation/tests/Makefile.in | 5 ++
dlls/directmanipulation/tests/manipulation.c | 60 ++++++++++++++++++++
4 files changed, 67 insertions(+)
create mode 100644 dlls/directmanipulation/tests/Makefile.in
create mode 100644 dlls/directmanipulation/tests/manipulation.c
diff --git a/configure b/configure
index 2ae3710ebb0..da201f4ffef 100755
--- a/configure
+++ b/configure
@@ -20370,6 +20370,7 @@ wine_fn_config_makefile dlls/dinput/tests enable_tests
wine_fn_config_makefile dlls/dinput8 enable_dinput8
wine_fn_config_makefile dlls/dinput8/tests enable_tests
wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation
+wine_fn_config_makefile dlls/directmanipulation/tests enable_tests
wine_fn_config_makefile dlls/dispdib.dll16 enable_win16
wine_fn_config_makefile dlls/dispex enable_dispex
wine_fn_config_makefile dlls/dispex/tests enable_tests
diff --git a/configure.ac b/configure.ac
index 7c0044c8872..b2a913132c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3186,6 +3186,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
WINE_CONFIG_MAKEFILE(dlls/dinput8)
WINE_CONFIG_MAKEFILE(dlls/dinput8/tests)
WINE_CONFIG_MAKEFILE(dlls/directmanipulation)
+WINE_CONFIG_MAKEFILE(dlls/directmanipulation/tests)
WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/dispex)
WINE_CONFIG_MAKEFILE(dlls/dispex/tests)
diff --git a/dlls/directmanipulation/tests/Makefile.in b/dlls/directmanipulation/tests/Makefile.in
new file mode 100644
index 00000000000..29ec0db511a
--- /dev/null
+++ b/dlls/directmanipulation/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = directmanipulation.dll
+IMPORTS = uuid ole32
+
+C_SRCS = \
+ manipulation.c
diff --git a/dlls/directmanipulation/tests/manipulation.c b/dlls/directmanipulation/tests/manipulation.c
new file mode 100644
index 00000000000..93b692729b3
--- /dev/null
+++ b/dlls/directmanipulation/tests/manipulation.c
@@ -0,0 +1,60 @@
+/*
+ *
+ * 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 <stdarg.h>
+
+#include "windows.h"
+#include "directmanipulation.h"
+
+#include "wine/test.h"
+
+static void test_IDirectManipulationManager2(void)
+{
+ IDirectManipulationManager2 *manager2;
+ IDirectManipulationUpdateManager *update;
+ HRESULT hres;
+
+ hres = CoCreateInstance(&CLSID_DirectManipulationManager, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
+ &IID_IDirectManipulationManager2, (void**)&manager2);
+ if(FAILED(hres))
+ {
+ win_skip("Failed to create XMLView instance\n");
+ return;
+ }
+ ok(hres == S_OK, "CoCreateInstance returned %x, expected S_OK\n", hres);
+
+ hres = IDirectManipulationManager2_GetUpdateManager(manager2, &IID_IDirectManipulationUpdateManager, (void**)&update);
+ ok(hres == S_OK, "returned %x, expected S_OK\n", hres);
+
+ if(update)
+ IDirectManipulationUpdateManager_Release(update);
+
+ IDirectManipulationManager2_Release(manager2);
+}
+
+START_TEST(manipulation)
+{
+ CoInitialize(NULL);
+
+ test_IDirectManipulationManager2();
+
+ CoUninitialize();
+}
--
2.24.1

View File

@ -1,4 +1,4 @@
From b03e8c0e0097e3dfd2c30f1f53f13abaa731b858 Mon Sep 17 00:00:00 2001
From 2fc74d8b5fd617e4b614e80c2eba9971a2dea00e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 3 Mar 2015 03:39:12 +0100
Subject: [PATCH] ntdll: Reuse old async fileio structures if possible.
@ -7,14 +7,14 @@ This should speed up apps which heavily rely on async io stuff. Some
tests (using the kernel and ntdll wine tests) show that it is very
often possible to reuse old fileio structures.
---
dlls/ntdll/file.c | 24 ++++++++++++++++++------
dlls/ntdll/unix/file.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 45660b47ec2e..083a413aac5f 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -387,6 +387,7 @@ struct async_fileio
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca6899b50f5..4c3f3dac465 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -4433,6 +4433,7 @@ struct async_fileio
{
async_callback_t *callback; /* must be the first field */
struct async_fileio *next;
@ -22,10 +22,10 @@ index 45660b47ec2e..083a413aac5f 100644
HANDLE handle;
};
@@ -430,18 +431,29 @@ static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback,
@@ -4484,18 +4485,29 @@ static void release_fileio( struct async_fileio *io )
static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE handle )
{
/* first free remaining previous fileinfos */
- struct async_fileio *io = InterlockedExchangePointer( (void **)&fileio_freelist, NULL );
+ struct async_fileio *old_io = InterlockedExchangePointer( (void **)&fileio_freelist, NULL );
+ struct async_fileio *io = NULL;
@ -59,5 +59,5 @@ index 45660b47ec2e..083a413aac5f 100644
}
return io;
--
2.26.2
2.27.0

View File

@ -1,2 +1 @@
Fixes: [44658] Add dummy apiset to PEB struct
Depends: ntdll-ThreadTime

View File

@ -1,4 +1,4 @@
From 7ecb980c3b1d3ee2b5ce2ad6419adf5782b85c7a Mon Sep 17 00:00:00 2001
From d39ff3852f684bd9c0ca3c08d7e82e4e50be239d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 21 Aug 2015 06:39:47 +0800
Subject: [PATCH] ntdll: Do not allow to deallocate thread stack for current
@ -11,10 +11,10 @@ Subject: [PATCH] ntdll: Do not allow to deallocate thread stack for current
3 files changed, 14 insertions(+)
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index e9a3230e814..e7a74131c30 100644
index 47800db41b1..be285013afc 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -249,6 +249,7 @@ struct ntdll_thread_data
@@ -154,6 +154,7 @@ struct ntdll_thread_data
int wait_fd[2]; /* fd for sleeping server requests */
BOOL wow64_redir; /* Wow64 filesystem redirection flag */
pthread_t pthread_id; /* pthread thread id */
@ -23,22 +23,22 @@ index e9a3230e814..e7a74131c30 100644
C_ASSERT( sizeof(struct ntdll_thread_data) <= sizeof(((TEB *)0)->GdiTebBatch) );
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 8562efb7dd4..b34adf2f07f 100644
index 9904ef7bfd5..232dea18bee 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -41,6 +41,7 @@ struct ntdll_thread_data
@@ -46,6 +46,7 @@ struct ntdll_thread_data
int wait_fd[2]; /* fd for sleeping server requests */
BOOL wow64_redir; /* Wow64 filesystem redirection flag */
pthread_t pthread_id; /* pthread thread id */
+ void *pthread_stack; /* pthread stack */
struct list entry; /* entry in TEB list */
};
C_ASSERT( sizeof(struct ntdll_thread_data) <= sizeof(((TEB *)0)->GdiTebBatch) );
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 0346d0d9753..5e995338a08 100644
index 6166507871c..0bb8cef6d3b 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2715,6 +2715,8 @@ NTSTATUS CDECL virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_si
@@ -2772,6 +2772,8 @@ NTSTATUS CDECL virtual_alloc_thread_stack( INITIAL_TEB *stack, SIZE_T reserve_si
stack->DeallocationStack = view->base;
stack->StackBase = (char *)view->base + view->size;
stack->StackLimit = (char *)view->base + 2 * page_size;
@ -47,7 +47,7 @@ index 0346d0d9753..5e995338a08 100644
done:
server_leave_uninterrupted_section( &csVirtual, &sigset );
return status;
@@ -3374,6 +3376,16 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
@@ -3521,6 +3523,16 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si
/* Free the pages */
if (size || (base != view->base)) status = STATUS_INVALID_PARAMETER;
@ -65,5 +65,5 @@ index 0346d0d9753..5e995338a08 100644
{
delete_view( view );
--
2.26.2
2.27.0

View File

@ -1,18 +1,18 @@
From 28b58832717d9c6a8032a555b0fb1035ac9fd710 Mon Sep 17 00:00:00 2001
From 6cf9c37c1e5b2211a61e8d61f97d46f89d86d753 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 29 May 2015 19:57:22 +0200
Subject: ntdll: Return fake device type when systemroot is located on virtual
disk.
Subject: [PATCH] ntdll: Return fake device type when systemroot is located on
virtual disk.
---
dlls/ntdll/file.c | 27 +++++++++++++++++++++++++++
dlls/ntdll/unix/file.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index d081750..45b61fb 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3126,9 +3126,36 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca6899b50f5..4f35de4da97 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -6136,9 +6136,36 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io
else
{
FILE_FS_DEVICE_INFORMATION *info = buffer;
@ -29,7 +29,7 @@ index d081750..45b61fb 100644
+ !server_get_unix_name( handle, &unix_name ))
+ {
+ UNICODE_STRING nt_name;
+ if (!wine_unix_to_nt_file_name( &unix_name, &nt_name ))
+ if (!unix_to_nt_file_name( &unix_name, &nt_name ))
+ {
+ WCHAR *buf = nt_name.Buffer;
+ if (nt_name.Length >= 6 * sizeof(WCHAR) &&
@ -48,7 +48,7 @@ index d081750..45b61fb 100644
+ }
}
break;
case FileFsAttributeInformation:
--
2.4.2
2.27.0

View File

@ -1,21 +1,58 @@
From 8cdd24c7d9aa7a007ffe437efc8d22f4413e4187 Mon Sep 17 00:00:00 2001
From f4f37eddd1eb809cf491ae3a0029f3850021d69d Mon Sep 17 00:00:00 2001
From: Jianqiu Zhang <zhangjianqiu_133@yeah.net>
Date: Fri, 17 Apr 2015 14:33:41 +0800
Subject: ntdll: Add support for FileFsFullSizeInformation class in
Subject: [PATCH] ntdll: Add support for FileFsFullSizeInformation class in
NtQueryVolumeInformationFile(try 2)
---
dlls/ntdll/file.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++-
dlls/ntdll/tests/file.c | 8 +-------
dlls/ntdll/tests/file.c | 8 +-----
dlls/ntdll/unix/file.c | 54 ++++++++++++++++++++++++++++++++++++++++-
2 files changed, 54 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 1cb34d3545d..0785e482be1 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3374,7 +3374,59 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
FIXME( "%p: control info not supported\n", handle );
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 184b7cdad59..2ef8b451457 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1265,7 +1265,7 @@ static void test_file_full_size_information(void)
/* Assume No Quota Settings configured on Wine Testbot */
res = pNtQueryVolumeInformationFile(h, &io, &ffsi, sizeof ffsi, FileFsFullSizeInformation);
- todo_wine ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
+ ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
res = pNtQueryVolumeInformationFile(h, &io, &fsi, sizeof fsi, FileFsSizeInformation);
ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
@@ -1281,8 +1281,6 @@ static void test_file_full_size_information(void)
ok(fsi.BytesPerSector == 512, "[fsi] BytesPerSector expected 512, got %d\n",fsi.BytesPerSector);
ok(fsi.SectorsPerAllocationUnit == 8, "[fsi] SectorsPerAllocationUnit expected 8, got %d\n",fsi.SectorsPerAllocationUnit);
- todo_wine
- {
ok(ffsi.TotalAllocationUnits.QuadPart > 0,
"[ffsi] TotalAllocationUnits expected positive, got negative value 0x%s\n",
wine_dbgstr_longlong(ffsi.TotalAllocationUnits.QuadPart));
@@ -1300,14 +1298,10 @@ static void test_file_full_size_information(void)
"[ffsi] CallerAvailableAllocationUnits error fsi:0x%s, ffsi: 0x%s\n",
wine_dbgstr_longlong(fsi.AvailableAllocationUnits.QuadPart),
wine_dbgstr_longlong(ffsi.CallerAvailableAllocationUnits.QuadPart));
- }
/* Assume file system is NTFS */
- todo_wine
- {
ok(ffsi.BytesPerSector == 512, "[ffsi] BytesPerSector expected 512, got %d\n",ffsi.BytesPerSector);
ok(ffsi.SectorsPerAllocationUnit == 8, "[ffsi] SectorsPerAllocationUnit expected 8, got %d\n",ffsi.SectorsPerAllocationUnit);
- }
CloseHandle( h );
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca6899b50f5..389470804ee 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -6271,7 +6271,59 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io
break;
case FileFsFullSizeInformation:
- FIXME( "%p: full size info not supported\n", handle );
+ if(length < sizeof(FILE_FS_FULL_SIZE_INFORMATION))
@ -26,7 +63,7 @@ index 1cb34d3545d..0785e482be1 100644
+
+ if (fstat( fd, &st ) < 0)
+ {
+ io->u.Status = FILE_GetNtStatus();
+ io->u.Status = errno_to_status( errno );
+ break;
+ }
+ if(!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
@ -41,7 +78,7 @@ index 1cb34d3545d..0785e482be1 100644
+
+ if(fstatvfs( fd, &stfs ) < 0)
+ {
+ io->u.Status = FILE_GetNtStatus();
+ io->u.Status = errno_to_status( errno );
+ break;
+ }
+ bsize = stfs.f_frsize;
@ -49,7 +86,7 @@ index 1cb34d3545d..0785e482be1 100644
+ struct statfs stfs;
+ if(fstatfs( fd, &stfs ) < 0)
+ {
+ io->u.Status = FILE_GetNtStatus();
+ io->u.Status = errno_to_status( errno );
+ break;
+ }
+ bsize = stfs.f_bsize;
@ -72,45 +109,8 @@ index 1cb34d3545d..0785e482be1 100644
+ }
+ }
break;
case FileFsObjectIdInformation:
FIXME( "%p: object id info not supported\n", handle );
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 18b0e5d3921..aa0d8a47f5a 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1117,7 +1117,7 @@ static void test_file_full_size_information(void)
/* Assume No Quota Settings configured on Wine Testbot */
res = pNtQueryVolumeInformationFile(h, &io, &ffsi, sizeof ffsi, FileFsFullSizeInformation);
- todo_wine ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
+ ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
res = pNtQueryVolumeInformationFile(h, &io, &fsi, sizeof fsi, FileFsSizeInformation);
ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
@@ -1133,8 +1133,6 @@ static void test_file_full_size_information(void)
ok(fsi.BytesPerSector == 512, "[fsi] BytesPerSector expected 512, got %d\n",fsi.BytesPerSector);
ok(fsi.SectorsPerAllocationUnit == 8, "[fsi] SectorsPerAllocationUnit expected 8, got %d\n",fsi.SectorsPerAllocationUnit);
- todo_wine
- {
ok(ffsi.TotalAllocationUnits.QuadPart > 0,
"[ffsi] TotalAllocationUnits expected positive, got negative value 0x%s\n",
wine_dbgstr_longlong(ffsi.TotalAllocationUnits.QuadPart));
@@ -1152,14 +1150,10 @@ static void test_file_full_size_information(void)
"[ffsi] CallerAvailableAllocationUnits error fsi:0x%s, ffsi: 0x%s\n",
wine_dbgstr_longlong(fsi.AvailableAllocationUnits.QuadPart),
wine_dbgstr_longlong(ffsi.CallerAvailableAllocationUnits.QuadPart));
- }
/* Assume file system is NTFS */
- todo_wine
- {
ok(ffsi.BytesPerSector == 512, "[ffsi] BytesPerSector expected 512, got %d\n",ffsi.BytesPerSector);
ok(ffsi.SectorsPerAllocationUnit == 8, "[ffsi] SectorsPerAllocationUnit expected 8, got %d\n",ffsi.SectorsPerAllocationUnit);
- }
CloseHandle( h );
}
--
2.13.1
2.27.0

View File

@ -1,3 +1,5 @@
Fixes: [38656] Add support for hiding wine version information from applications
Depends: ntdll-ThreadTime
Depends: advapi32-Token_Integrity_Level
# Re-enable me when ntdll-ThreadTime gets re-enabled!
Disabled: true

View File

@ -1,19 +1,31 @@
From 3e4e21b4e66f85143a029374c58a66ae54f792e8 Mon Sep 17 00:00:00 2001
From fda39199958fc169372b7dfee2077e2d8ecfa350 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 13 Sep 2015 17:16:07 +0200
Subject: ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call
NtReadFile on directory.
Subject: [PATCH] ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to
call NtReadFile on directory.
---
dlls/ntdll/file.c | 2 +-
dlls/ntdll/tests/file.c | 1 -
dlls/ntdll/unix/file.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 8f89ba5..67a13b2 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -459,7 +459,7 @@ NTSTATUS FILE_GetNtStatus(void)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 184b7cdad59..6f830da85a2 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -171,7 +171,6 @@ static void create_file_test(void)
U(io).Status = 0xdeadbeef;
offset.QuadPart = 0;
status = pNtReadFile( dir, NULL, NULL, NULL, &io, buf, sizeof(buf), &offset, NULL );
- todo_wine
ok( status == STATUS_INVALID_DEVICE_REQUEST || status == STATUS_PENDING, "NtReadFile error %08x\n", status );
if (status == STATUS_PENDING)
{
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca6899b50f5..d160f1a050e 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -348,7 +348,7 @@ NTSTATUS errno_to_status( int err )
case EACCES: return STATUS_ACCESS_DENIED;
case ENOTDIR: return STATUS_OBJECT_PATH_NOT_FOUND;
case ENOENT: return STATUS_OBJECT_NAME_NOT_FOUND;
@ -22,18 +34,6 @@ index 8f89ba5..67a13b2 100644
case EMFILE:
case ENFILE: return STATUS_TOO_MANY_OPENED_FILES;
case EINVAL: return STATUS_INVALID_PARAMETER;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index b8f1847..63dd4f9 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -206,7 +206,6 @@ static void create_file_test(void)
U(io).Status = 0xdeadbeef;
offset.QuadPart = 0;
status = pNtReadFile( dir, NULL, NULL, NULL, &io, buf, sizeof(buf), &offset, NULL );
- todo_wine
ok( status == STATUS_INVALID_DEVICE_REQUEST || status == STATUS_PENDING, "NtReadFile error %08x\n", status );
if (status == STATUS_PENDING)
{
--
2.6.0
2.27.0

View File

@ -1,4 +1,4 @@
From a88ac4ac286c6c345efc3722d6fd4cc5b6ad29ca Mon Sep 17 00:00:00 2001
From 4236b5607067148efa76cbe090d9efd58b297e32 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 30 Dec 2019 13:27:53 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
@ -14,15 +14,15 @@ is used for trapping syscalls.
dlls/ntdll/unix/signal_x86_64.c | 105 ++++++++++++++++++++++++++++++++
dlls/ntdll/unix/thread.c | 8 ++-
dlls/ntdll/unix/unix_private.h | 6 +-
dlls/ntdll/unixlib.h | 5 +-
dlls/ntdll/unixlib.h | 3 +-
tools/winebuild/spec32.c | 9 ++-
7 files changed, 135 insertions(+), 7 deletions(-)
7 files changed, 134 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index d57b0713856..7bd3da1e175 100644
index 9c5f76669df..f245c2f1507 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,6 +474,7 @@ AC_CHECK_HEADERS(\
@@ -464,6 +464,7 @@ AC_CHECK_HEADERS(\
linux/joystick.h \
linux/major.h \
linux/param.h \
@ -31,10 +31,10 @@ index d57b0713856..7bd3da1e175 100644
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 18db4fd4780..e4f0293ab5a 100644
index 557747062e4..0d65546588f 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -229,6 +229,12 @@ void __wine_syscall_dispatcher( void )
@@ -103,6 +103,12 @@ void __wine_syscall_dispatcher( void )
}
#endif
@ -47,7 +47,7 @@ index 18db4fd4780..e4f0293ab5a 100644
void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
{
UNICODE_STRING name;
@@ -272,7 +278,7 @@ void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
@@ -146,7 +152,7 @@ void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
{
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
@ -57,7 +57,7 @@ index 18db4fd4780..e4f0293ab5a 100644
peb = teb->Peb;
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 1d1b879310e..c8a8d1d1d33 100644
index 12ea74f7f5c..26097702985 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -28,6 +28,7 @@
@ -194,7 +194,7 @@ index 1d1b879310e..c8a8d1d1d33 100644
error:
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 0279690806c..6969a528eeb 100644
index 196dc2d8c4e..dae792bd78b 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -58,6 +58,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh);
@ -217,7 +217,7 @@ index 0279690806c..6969a528eeb 100644
{
TEB *teb;
SIZE_T info_size;
@@ -95,6 +99,8 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
@@ -94,6 +98,8 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
*ldt_copy = &__wine_ldt_copy;
#endif
nb_threads = nb_threads_ptr;
@ -227,10 +227,10 @@ index 0279690806c..6969a528eeb 100644
teb = virtual_alloc_first_teb();
teb->WOW32Reserved = syscall_handler;
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 19196dbb296..e99e89864c2 100644
index df508e569f9..bcb80ddab85 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -108,7 +108,8 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
@@ -113,7 +113,8 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN;
extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
BOOL *suspend, unsigned int *cpus, BOOL *wow64,
@ -239,10 +239,10 @@ index 19196dbb296..e99e89864c2 100644
+ unsigned int syscall_count ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len ) DECLSPEC_HIDDEN;
@@ -140,6 +141,9 @@ extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
extern NTSTATUS exec_wineloader( char **argv, int socketfd, int is_child_64bit,
ULONGLONG res_start, ULONGLONG res_end ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status ) DECLSPEC_HIDDEN;
@@ -146,6 +147,9 @@ extern NTSTATUS exec_wineloader( char **argv, int socketfd, int is_child_64bit,
extern void start_server( BOOL debug ) DECLSPEC_HIDDEN;
extern ULONG_PTR get_image_address(void) DECLSPEC_HIDDEN;
+extern unsigned int __wine_nb_syscalls DECLSPEC_HIDDEN;
+extern void *__wine_syscall_dispatcher DECLSPEC_HIDDEN;
@ -251,19 +251,10 @@ index 19196dbb296..e99e89864c2 100644
extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN;
extern void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index b09f4942f05..b952af4596a 100644
index a9803478a37..e3bb8f7ce8e 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -28,7 +28,7 @@ struct ldt_copy;
struct msghdr;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 53
+#define NTDLL_UNIXLIB_VERSION 54
struct unix_funcs
{
@@ -281,7 +281,8 @@ struct unix_funcs
@@ -302,7 +302,8 @@ struct unix_funcs
/* thread/process functions */
TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
@ -272,7 +263,7 @@ index b09f4942f05..b952af4596a 100644
+ void *syscall_handler, unsigned int syscall_count );
void (CDECL *exit_thread)( int status );
void (CDECL *exit_process)( int status );
NTSTATUS (CDECL *get_thread_ldt_entry)( HANDLE handle, void *data, ULONG len, ULONG *ret_len );
NTSTATUS (CDECL *exec_process)( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 9cc4698d0d7..c572fe49923 100644
--- a/tools/winebuild/spec32.c

View File

@ -1,4 +1,4 @@
From 511be7951f851cda2b2119a88b7f1895598a7165 Mon Sep 17 00:00:00 2001
From 77f0bfa7bbd70231a661397236124088af1ad76f Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Fri, 12 Apr 2019 20:04:03 -0500
Subject: [PATCH] ntdll: Return ntdll.dll as the first entry for
@ -9,11 +9,11 @@ Subject: [PATCH] ntdll: Return ntdll.dll as the first entry for
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 44ffef6439b..c47219b1d33 100644
index 54626307ede..77db670623c 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2665,6 +2665,33 @@ static BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
return ret;
@@ -2493,6 +2493,33 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature];
}
+static void get_ntdll_system_module(SYSTEM_MODULE *sm)
@ -46,7 +46,7 @@ index 44ffef6439b..c47219b1d33 100644
/******************************************************************************
* NtQuerySystemInformation [NTDLL.@]
* ZwQuerySystemInformation [NTDLL.@]
@@ -3015,7 +3042,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2829,7 +2856,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
FIXME("returning fake driver list\n");
smi->ModulesCount = 1;

View File

@ -1,20 +1,20 @@
From f79b3408935d1f4650c7369e0507c223c5f9ed33 Mon Sep 17 00:00:00 2001
From 263b120ed5f5e9464f240e42800ab63752d16b96 Mon Sep 17 00:00:00 2001
From: David Torok <dt@zeroitlab.com>
Date: Tue, 19 Nov 2019 23:01:46 +0100
Subject: [PATCH] ntdll: Stub NtQueryInformationThread(ThreadHideFromDebugger).
---
dlls/ntdll/thread.c | 5 +++++
dlls/ntdll/unix/thread.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index b913326f796..840b8ffd0b1 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -1460,6 +1460,11 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
*ret_len = sizeof(*info) + desc_len;
}
return status;
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index d26e0a98cac..e2a092e30a8 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1063,6 +1063,11 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
#endif
}
+ case ThreadHideFromDebugger:
+ if (length != sizeof(BOOLEAN)) return STATUS_INFO_LENGTH_MISMATCH;
+ *(BOOLEAN *)data = TRUE;
@ -24,5 +24,5 @@ index b913326f796..840b8ffd0b1 100644
case ThreadBasePriority:
case ThreadImpersonationToken:
--
2.24.0
2.27.0

View File

@ -1,4 +1,4 @@
From 3d5a92cbec870c2b129668b455012bf5b2693ccd Mon Sep 17 00:00:00 2001
From ee29bbfa7e10de295db39ab6b89f2175d00692c5 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
@ -6,61 +6,17 @@ Subject: [PATCH] ntdll: Fill process virtual memory counters in
FIXME: fill_VM_COUNTERS now uses a different method ... which one is better?
---
dlls/ntdll/nt.c | 41 +++++++++++++++++++++++++++++++++++++++
dlls/ntdll/thread.c | 1 -
dlls/ntdll/unix/process.c | 39 ++++++++++++++++++++++++++++++++++++-
3 files changed, 79 insertions(+), 2 deletions(-)
dlls/ntdll/nt.c | 3 +++
dlls/ntdll/ntdll_misc.h | 1 +
dlls/ntdll/process.c | 2 +-
dlls/ntdll/thread.c | 36 ++++++++++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index c1c7a126daf..8b450082ada 100644
index cbb7937631d..bb078c1aa21 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2627,6 +2627,44 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature];
}
+/* Remove once NtQuerySystemInformation is moved to unix directory */
+static BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
+{
+ BOOL ret = FALSE;
+#ifdef __linux__
+ unsigned long size, resident, shared, trs, drs, lrs, dt;
+ char buf[512];
+ FILE *fp;
+
+ sprintf( buf, "/proc/%u/statm", unix_pid );
+ if ((fp = fopen( buf, "r" )))
+ {
+ if (fscanf( fp, "%lu %lu %lu %lu %lu %lu %lu",
+ &size, &resident, &shared, &trs, &drs, &lrs, &dt ) == 7)
+ {
+ pvmi->VirtualSize = size * page_size;
+ pvmi->WorkingSetSize = resident * page_size;
+ pvmi->PrivatePageCount = size - shared;
+
+ /* these values are not available through /proc/pid/statm */
+ pvmi->PeakVirtualSize = pvmi->VirtualSize;
+ pvmi->PageFaultCount = 0;
+ pvmi->PeakWorkingSetSize = pvmi->WorkingSetSize;
+ pvmi->QuotaPagedPoolUsage = pvmi->VirtualSize;
+ pvmi->QuotaPeakPagedPoolUsage = pvmi->QuotaPagedPoolUsage;
+ pvmi->QuotaPeakNonPagedPoolUsage = 0;
+ pvmi->QuotaNonPagedPoolUsage = 0;
+ pvmi->PagefileUsage = 0;
+ pvmi->PeakPagefileUsage = 0;
+
+ ret = TRUE;
+ }
+ fclose( fp );
+ }
+#endif
+ return ret;
+}
+
/******************************************************************************
* NtQuerySystemInformation [NTDLL.@]
* ZwQuerySystemInformation [NTDLL.@]
@@ -2784,8 +2822,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2686,8 +2686,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
if (reply->unix_pid != -1)
@ -72,27 +28,40 @@ index c1c7a126daf..8b450082ada 100644
unix_pid = reply->unix_pid;
}
len += procstructlen;
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 6e77694d87b..d725a678246 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -248,6 +248,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;
+extern BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi) DECLSPEC_HIDDEN;
/* string functions */
int __cdecl NTDLL_tolower( int c );
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 35937ce6026..b4f2dbc8160 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -192,7 +192,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
{
- /* FIXME : real data */
+ read_process_memory_stats(getpid(), pvmi);
}
#endif
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 29a9c19b923..320e63416cc 100644
index 14198d77b7b..8ae8251f975 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -373,7 +373,6 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT
@@ -381,6 +381,42 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle_ptr, ACCESS_MASK access, OBJECT
flags, zero_bits, stack_commit, stack_reserve, attr_list );
}
-
/***********************************************************************
* RtlCreateUserThread (NTDLL.@)
*/
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index 379a0036b63..210006f4c23 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -989,6 +989,43 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
#endif
}
+static BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
+BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
+{
+ BOOL ret = FALSE;
+#ifdef __linux__
@ -128,19 +97,9 @@ index 379a0036b63..210006f4c23 100644
+#endif
+ return ret;
+}
+
#elif defined(linux)
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
@@ -1024,7 +1061,7 @@ static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
static void fill_VM_COUNTERS(VM_COUNTERS* pvmi)
{
- /* FIXME : real data */
+ read_process_memory_stats(getpid(), pvmi);
}
#endif
/***********************************************************************
* RtlCreateUserThread (NTDLL.@)
--
2.27.0
2.26.2

View File

@ -1,3 +1,5 @@
Fixes: [20230] Return correct values for GetThreadTimes function
Fixes: Return correct thread creation time in SystemProcessInformation
Fixes: Fill process virtual memory counters in NtQuerySystemInformation
# Split awkwardly between .so and .dll parts (NtQuerySystemInformation vs NtQueryProcess/ThreadInformation).
Disabled: true

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "67ef5151744b347d4a30c985da6712fb0061e675"
echo "e80df2d2d54a3f16389bea77f6863cc1c05d6251"
}
# Show version information
@ -178,7 +178,6 @@ patch_enable_all ()
enable_ntdll_ForceBottomUpAlloc="$1"
enable_ntdll_HashLinks="$1"
enable_ntdll_Heap_Improvements="$1"
enable_ntdll_Hide_Wine_Exports="$1"
enable_ntdll_Interrupt_0x2e="$1"
enable_ntdll_Manifest_Range="$1"
enable_ntdll_NtAccessCheck="$1"
@ -198,7 +197,6 @@ patch_enable_all ()
enable_ntdll_SystemModuleInformation="$1"
enable_ntdll_SystemRoot_Symlink="$1"
enable_ntdll_ThreadHideFromDebugger="$1"
enable_ntdll_ThreadTime="$1"
enable_ntdll_Threading="$1"
enable_ntdll_WRITECOPY="$1"
enable_ntdll_Zero_mod_name="$1"
@ -228,7 +226,6 @@ patch_enable_all ()
enable_server_Key_State="$1"
enable_server_Object_Types="$1"
enable_server_PeekMessage="$1"
enable_server_Realtime_Priority="$1"
enable_server_Registry_Notifications="$1"
enable_server_Signal_Thread="$1"
enable_setupapi_DiskSpaceList="$1"
@ -627,9 +624,6 @@ patch_enable ()
ntdll-Heap_Improvements)
enable_ntdll_Heap_Improvements="$2"
;;
ntdll-Hide_Wine_Exports)
enable_ntdll_Hide_Wine_Exports="$2"
;;
ntdll-Interrupt-0x2e)
enable_ntdll_Interrupt_0x2e="$2"
;;
@ -687,9 +681,6 @@ patch_enable ()
ntdll-ThreadHideFromDebugger)
enable_ntdll_ThreadHideFromDebugger="$2"
;;
ntdll-ThreadTime)
enable_ntdll_ThreadTime="$2"
;;
ntdll-Threading)
enable_ntdll_Threading="$2"
;;
@ -777,9 +768,6 @@ patch_enable ()
server-PeekMessage)
enable_server_PeekMessage="$2"
;;
server-Realtime_Priority)
enable_server_Realtime_Priority="$2"
;;
server-Registry_Notifications)
enable_server_Registry_Notifications="$2"
;;
@ -1581,13 +1569,6 @@ if test "$enable_shell32_Progress_Dialog" -eq 1; then
enable_shell32_SHFileOperation_Move=1
fi
if test "$enable_server_Realtime_Priority" -eq 1; then
if test "$enable_ntdll_ThreadTime" -gt 1; then
abort "Patchset ntdll-ThreadTime disabled, but server-Realtime_Priority depends on that."
fi
enable_ntdll_ThreadTime=1
fi
if test "$enable_server_Desktop_Refcount" -eq 1; then
if test "$enable_ws2_32_WSACleanup" -gt 1; then
abort "Patchset ws2_32-WSACleanup disabled, but server-Desktop_Refcount depends on that."
@ -1648,17 +1629,6 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then
enable_ntdll_Pipe_SpecialCharacters=1
fi
if test "$enable_ntdll_Hide_Wine_Exports" -eq 1; then
if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
abort "Patchset advapi32-Token_Integrity_Level disabled, but ntdll-Hide_Wine_Exports depends on that."
fi
if test "$enable_ntdll_ThreadTime" -gt 1; then
abort "Patchset ntdll-ThreadTime disabled, but ntdll-Hide_Wine_Exports depends on that."
fi
enable_advapi32_Token_Integrity_Level=1
enable_ntdll_ThreadTime=1
fi
if test "$enable_ntdll_Builtin_Prot" -eq 1; then
if test "$enable_ntdll_WRITECOPY" -gt 1; then
abort "Patchset ntdll-WRITECOPY disabled, but ntdll-Builtin_Prot depends on that."
@ -1666,13 +1636,6 @@ if test "$enable_ntdll_Builtin_Prot" -eq 1; then
enable_ntdll_WRITECOPY=1
fi
if test "$enable_ntdll_ApiSetMap" -eq 1; then
if test "$enable_ntdll_ThreadTime" -gt 1; then
abort "Patchset ntdll-ThreadTime disabled, but ntdll-ApiSetMap depends on that."
fi
enable_ntdll_ThreadTime=1
fi
if test "$enable_kernel32_Processor_Group" -eq 1; then
if test "$enable_api_ms_win_Stub_DLLs" -gt 1; then
abort "Patchset api-ms-win-Stub_DLLs disabled, but kernel32-Processor_Group depends on that."
@ -2685,30 +2648,22 @@ fi
# | * [#44865] directmanipulation: New DLL.
# |
# | Modified files:
# | * configure, configure.ac, dlls/directmanipulation/Makefile.in, dlls/directmanipulation/directmanip.idl,
# | dlls/directmanipulation/directmanipulation.c, dlls/directmanipulation/tests/Makefile.in,
# | dlls/directmanipulation/tests/manipulation.c
# | * dlls/directmanipulation/directmanip.idl, dlls/directmanipulation/directmanipulation.c
# |
if test "$enable_directmanipulation_new_dll" -eq 1; then
patch_apply directmanipulation-new-dll/0004-directmanipulation-Create-DirectManipulationManager-.patch
patch_apply directmanipulation-new-dll/0006-directmanipulation-Support-DCompManipulationComposit.patch
patch_apply directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch
patch_apply directmanipulation-new-dll/0008-directmanipulation-Implement-IDirectManipulationMana.patch
patch_apply directmanipulation-new-dll/0009-directmanipulation-Implement-IDirectManipulationComp.patch
patch_apply directmanipulation-new-dll/0011-directmanipulation-Implement-IDirectManipulationMana.patch
patch_apply directmanipulation-new-dll/0012-directmanipulation-tests-Initial-tests.patch
patch_apply directmanipulation-new-dll/0013-directmanipulation-Fake-success-from-IDirectManipula.patch
patch_apply directmanipulation-new-dll/0015-directmanipulation-Implement-IDirectManipulationView.patch
patch_apply directmanipulation-new-dll/0016-directmanipulation-Support-IDirectManipulationConten.patch
patch_apply directmanipulation-new-dll/0017-directmanipulation-Fake-success-in-some-functions.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Create DirectManipulationManager/DirectManipulationSharedManager objects.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Support DCompManipulationCompositor interface.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Supprot IDirectManipulationFrameInfoProvider interface in IDirectManipulationCompositor.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 GetUpdateManager.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationCompositor SetUpdateManager.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 CreateViewport.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation/tests: Initial tests.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Fake success from IDirectManipulationViewport2 ActivateConfiguration.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationViewport2 GetPrimaryContent.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Support IDirectManipulationContent in IDirectManipulationPrimaryContent interface.", 1 },';
@ -3428,7 +3383,7 @@ fi
# Patchset ntdll-APC_Performance
# |
# | Modified files:
# | * dlls/ntdll/file.c
# | * dlls/ntdll/unix/file.c
# |
if test "$enable_ntdll_APC_Performance" -eq 1; then
patch_apply ntdll-APC_Performance/0001-ntdll-Reuse-old-async-fileio-structures-if-possible.patch
@ -3449,37 +3404,8 @@ if test "$enable_ntdll_Activation_Context" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-ThreadTime
# |
# | This patchset fixes the following Wine bugs:
# | * [#20230] Return correct values for GetThreadTimes function
# |
# | Modified files:
# | * dlls/ntdll/nt.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/thread.c, dlls/ntdll/unix/process.c, server/protocol.def,
# | server/snapshot.c, server/thread.c, server/thread.h
# |
if test "$enable_ntdll_ThreadTime" -eq 1; then
patch_apply ntdll-ThreadTime/0001-ntdll-Return-correct-values-in-GetThreadTimes-for-al.patch
patch_apply ntdll-ThreadTime/0002-ntdll-Set-correct-thread-creation-time-for-SystemPro.patch
patch_apply ntdll-ThreadTime/0003-ntdll-Fill-process-kernel-and-user-time.patch
patch_apply ntdll-ThreadTime/0004-ntdll-Set-process-start-time.patch
patch_apply ntdll-ThreadTime/0005-ntdll-Fill-out-thread-times-in-process-enumeration.patch
patch_apply ntdll-ThreadTime/0006-ntdll-Fill-process-virtual-memory-counters-in-NtQuer.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Return correct values in GetThreadTimes() for all threads.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntdll: Set correct thread creation time for SystemProcessInformation in NtQuerySystemInformation.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntdll: Fill process kernel and user time.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntdll: Set process start time.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntdll: Fill out thread times in process enumeration.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntdll: Fill process virtual memory counters in NtQuerySystemInformation.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-ApiSetMap
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-ThreadTime
# |
# | This patchset fixes the following Wine bugs:
# | * [#44658] Add dummy apiset to PEB struct
# |
@ -3502,8 +3428,8 @@ fi
# | Modified files:
# | * dlls/advapi32/crypt.c, dlls/advapi32/tests/security.c, dlls/kernel32/tests/virtual.c, dlls/ntdll/unix/loader.c,
# | dlls/ntdll/unix/server.c, dlls/ntdll/unix/signal_arm.c, dlls/ntdll/unix/signal_arm64.c, dlls/ntdll/unix/signal_i386.c,
# | dlls/ntdll/unix/signal_powerpc.c, dlls/ntdll/unix/signal_x86_64.c, dlls/ntdll/unix/unix_private.h,
# | dlls/ntdll/unix/virtual.c, dlls/psapi/tests/psapi_main.c
# | dlls/ntdll/unix/signal_x86_64.c, dlls/ntdll/unix/unix_private.h, dlls/ntdll/unix/virtual.c,
# | dlls/psapi/tests/psapi_main.c
# |
if test "$enable_ntdll_WRITECOPY" -eq 1; then
patch_apply ntdll-WRITECOPY/0001-ntdll-Trigger-write-watches-before-passing-userdata-.patch
@ -3609,7 +3535,7 @@ fi
# | * [#36546] Return fake device type when systemroot is located on virtual disk
# |
# | Modified files:
# | * dlls/ntdll/file.c
# | * dlls/ntdll/unix/file.c
# |
if test "$enable_ntdll_DeviceType_Systemroot" -eq 1; then
patch_apply ntdll-DeviceType_Systemroot/0001-ntdll-Return-fake-device-type-when-systemroot-is-loc.patch
@ -3662,7 +3588,7 @@ fi
# Patchset ntdll-FileFsFullSizeInformation
# |
# | Modified files:
# | * dlls/ntdll/file.c, dlls/ntdll/tests/file.c
# | * dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c
# |
if test "$enable_ntdll_FileFsFullSizeInformation" -eq 1; then
patch_apply ntdll-FileFsFullSizeInformation/0001-ntdll-Add-support-for-FileFsFullSizeInformation-clas.patch
@ -3744,24 +3670,6 @@ if test "$enable_ntdll_Heap_Improvements" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-Hide_Wine_Exports
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-ThreadTime
# |
# | This patchset fixes the following Wine bugs:
# | * [#38656] Add support for hiding wine version information from applications
# |
# | Modified files:
# | * dlls/ntdll/loader.c, dlls/ntdll/ntdll_misc.h
# |
if test "$enable_ntdll_Hide_Wine_Exports" -eq 1; then
patch_apply ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Add support for hiding wine version information from applications.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Interrupt-0x2e
# |
# | This patchset fixes the following Wine bugs:
@ -3924,7 +3832,7 @@ fi
# Patchset ntdll-Status_Mapping
# |
# | Modified files:
# | * dlls/ntdll/file.c, dlls/ntdll/tests/file.c
# | * dlls/ntdll/tests/file.c, dlls/ntdll/unix/file.c
# |
if test "$enable_ntdll_Status_Mapping" -eq 1; then
patch_apply ntdll-Status_Mapping/0001-ntdll-Return-STATUS_INVALID_DEVICE_REQUEST-when-tryi.patch
@ -3969,13 +3877,13 @@ fi
# | * dlls/dbghelp/cpu_i386.c, dlls/kernel32/tests/loader.c, dlls/krnl386.exe16/kernel.c,
# | dlls/krnl386.exe16/kernel16_private.h, dlls/krnl386.exe16/ne_module.c, dlls/krnl386.exe16/ne_segment.c,
# | dlls/krnl386.exe16/task.c, dlls/krnl386.exe16/thunk.c, dlls/krnl386.exe16/wowthunk.c, dlls/ntdll/actctx.c,
# | dlls/ntdll/directory.c, dlls/ntdll/loader.c, dlls/ntdll/locale.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/path.c,
# | dlls/ntdll/process.c, dlls/ntdll/signal_i386.c, dlls/ntdll/tests/exception.c, dlls/ntdll/thread.c,
# | dlls/ntdll/unix/signal_i386.c, dlls/ntdll/unix/thread.c, dlls/ntdll/unix/unix_private.h, dlls/ntdll/unix/virtual.c,
# | dlls/ntdll/unixlib.h, dlls/system.drv16/system.c, dlls/toolhelp.dll16/toolhelp.c, dlls/user.exe16/message.c,
# | dlls/user.exe16/user.c, dlls/user.exe16/window.c, include/winternl.h, libs/wine/loader.c, server/mapping.c,
# | tools/winebuild/build.h, tools/winebuild/import.c, tools/winebuild/parser.c, tools/winebuild/relay.c,
# | tools/winebuild/res32.c, tools/winebuild/spec16.c, tools/winebuild/spec32.c, tools/winebuild/utils.c
# | dlls/ntdll/loader.c, dlls/ntdll/locale.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/path.c, dlls/ntdll/signal_i386.c,
# | dlls/ntdll/tests/exception.c, dlls/ntdll/thread.c, dlls/ntdll/unix/signal_i386.c, dlls/ntdll/unix/thread.c,
# | dlls/ntdll/unix/unix_private.h, dlls/ntdll/unix/virtual.c, dlls/ntdll/unixlib.h, dlls/system.drv16/system.c,
# | dlls/toolhelp.dll16/toolhelp.c, dlls/user.exe16/message.c, dlls/user.exe16/user.c, dlls/user.exe16/window.c,
# | include/winternl.h, libs/wine/loader.c, server/mapping.c, tools/winebuild/build.h, tools/winebuild/import.c,
# | tools/winebuild/parser.c, tools/winebuild/relay.c, tools/winebuild/res32.c, tools/winebuild/spec16.c,
# | tools/winebuild/spec32.c, tools/winebuild/utils.c
# |
if test "$enable_winebuild_Fake_Dlls" -eq 1; then
patch_apply winebuild-Fake_Dlls/0001-kernel32-tests-Add-basic-tests-for-fake-dlls.patch
@ -4112,7 +4020,7 @@ fi
# | * [#48138] League of Legends 9.23: Crash after champ select
# |
# | Modified files:
# | * dlls/ntdll/thread.c
# | * dlls/ntdll/unix/thread.c
# |
if test "$enable_ntdll_ThreadHideFromDebugger" -eq 1; then
patch_apply ntdll-ThreadHideFromDebugger/0001-ntdll-Stub-NtQueryInformationThread-ThreadHideFromDe.patch
@ -4565,21 +4473,6 @@ if test "$enable_server_PeekMessage" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Realtime_Priority
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-ThreadTime
# |
# | Modified files:
# | * server/Makefile.in, server/main.c, server/scheduler.c, server/thread.c, server/thread.h
# |
if test "$enable_server_Realtime_Priority" -eq 1; then
patch_apply server-Realtime_Priority/0001-wineserver-Draft-to-implement-priority-levels-throug.patch
(
printf '%s\n' '+ { "Joakim Hernberg", "wineserver: Draft to implement priority levels through POSIX scheduling policies on linux.", 1 },';
) >> "$patchlist"
fi
# Patchset server-Registry_Notifications
# |
# | Modified files:

View File

@ -1,2 +1,4 @@
Fixes: Support for linux priority levels for faster performance
Depends: ntdll-ThreadTime
# Re-enable me when ntdll-ThreadTime gets re-enabled!
Disabled: true

View File

@ -1,4 +1,4 @@
From 51d9c664ba86df86b3fb02a281642b5940cef430 Mon Sep 17 00:00:00 2001
From 488721840b4825a33c7e51aabf473cb81033c682 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 11 May 2017 05:32:55 +0200
Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports.
@ -11,7 +11,7 @@ Based on a patch by Erich E. Hoover.
dlls/ntdll/thread.c | 10 +++-
dlls/ntdll/unix/thread.c | 3 +-
dlls/ntdll/unix/unix_private.h | 2 +-
dlls/ntdll/unixlib.h | 4 +-
dlls/ntdll/unixlib.h | 2 +-
include/winternl.h | 2 +-
tools/winebuild/build.h | 7 +++
tools/winebuild/import.c | 10 ++--
@ -19,13 +19,13 @@ Based on a patch by Erich E. Hoover.
tools/winebuild/spec16.c | 22 +------
tools/winebuild/spec32.c | 104 +++++++++++++++++++++++++++++++++
tools/winebuild/utils.c | 21 +++++++
14 files changed, 221 insertions(+), 32 deletions(-)
14 files changed, 220 insertions(+), 31 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 99bcff94b3e..06cdf5cd350 100644
index 87a65e4fc11..05d32ab167e 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4020,6 +4020,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
@@ -3812,6 +3812,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
return ret;
}
@ -33,7 +33,7 @@ index 99bcff94b3e..06cdf5cd350 100644
/******************************************************************
* LdrInitializeThunk (NTDLL.@)
@@ -4037,6 +4038,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@@ -3828,6 +3829,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
WINE_MODREF *wm;
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
@ -65,7 +65,7 @@ index 21cc1b3ead4..18be5693a7d 100644
}
return unix_funcs->NtGetContextThread( handle, context );
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 1389a542cde..54796476e25 100644
index a5e6faa461a..51938bf84cc 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -1643,6 +1643,8 @@ static void test_thread_context(void)
@ -78,10 +78,10 @@ index 1389a542cde..54796476e25 100644
ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs );
ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs );
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 64dee4d0c12..2a22f1ca137 100644
index 7329aa177ba..a878a7a27fa 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -220,6 +220,14 @@ int __cdecl __wine_dbg_output( const char *str )
@@ -94,6 +94,14 @@ int __cdecl __wine_dbg_output( const char *str )
return unix_funcs->dbg_output( str );
}
@ -96,7 +96,7 @@ index 64dee4d0c12..2a22f1ca137 100644
/***********************************************************************
* thread_init
@@ -231,7 +239,7 @@ int __cdecl __wine_dbg_output( const char *str )
@@ -105,7 +113,7 @@ int __cdecl __wine_dbg_output( const char *str )
TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
{
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
@ -106,7 +106,7 @@ index 64dee4d0c12..2a22f1ca137 100644
peb = teb->Peb;
peb->FastPebLock = &peb_lock;
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 34cf12885d9..212ebda0443 100644
index d26e0a98cac..cb44bbfd5ea 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -85,7 +85,7 @@ static void pthread_exit_wrapper( int status )
@ -118,19 +118,19 @@ index 34cf12885d9..212ebda0443 100644
{
TEB *teb;
SIZE_T info_size;
@@ -97,6 +97,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
@@ -96,6 +96,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
nb_threads = nb_threads_ptr;
teb = virtual_alloc_first_teb();
+ teb->WOW32Reserved = syscall_handler;
thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch;
thread_data->request_fd = -1;
thread_data->reply_fd = -1;
signal_init_threading();
signal_alloc_thread( teb );
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index f19c8924008..e668c8e6fbb 100644
index 8811fd6c21d..166a6542724 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -108,7 +108,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
@@ -113,7 +113,7 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN;
extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
BOOL *suspend, unsigned int *cpus, BOOL *wow64,
@ -138,21 +138,12 @@ index f19c8924008..e668c8e6fbb 100644
+ timeout_t *start_time, void *syscall_handler ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_len ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index dbe68a1b486..b09f4942f05 100644
index 7dec512cb09..a9803478a37 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -28,7 +28,7 @@ struct ldt_copy;
struct msghdr;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 52
+#define NTDLL_UNIXLIB_VERSION 53
struct unix_funcs
{
@@ -281,7 +281,7 @@ struct unix_funcs
@@ -302,7 +302,7 @@ struct unix_funcs
/* thread/process functions */
TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
@ -160,12 +151,12 @@ index dbe68a1b486..b09f4942f05 100644
+ BOOL *suspend, unsigned int *cpus, BOOL *wow64, timeout_t *start_time, void *syscall_handler );
void (CDECL *exit_thread)( int status );
void (CDECL *exit_process)( int status );
NTSTATUS (CDECL *get_thread_ldt_entry)( HANDLE handle, void *data, ULONG len, ULONG *ret_len );
NTSTATUS (CDECL *exec_process)( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status );
diff --git a/include/winternl.h b/include/winternl.h
index 4f5ce4d0cfe..7d69a448e89 100644
index 4b3202cdc20..5f58366f649 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -360,7 +360,7 @@ typedef struct _TEB
@@ -359,7 +359,7 @@ typedef struct _TEB
PVOID CsrClientThread; /* 03c/0070 */
PVOID Win32ThreadInfo; /* 040/0078 */
ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */

View File

@ -1,4 +1,4 @@
From e5fc6ee60be5dd3b80af96dcbd81adb742ba7a5d Mon Sep 17 00:00:00 2001
From ce23308632979fdff714da4322e4f56905873374 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 15 May 2017 16:27:56 +0200
Subject: [PATCH] winebuild: Add stub functions in fake dlls.
@ -6,18 +6,18 @@ Subject: [PATCH] winebuild: Add stub functions in fake dlls.
---
dlls/kernel32/tests/loader.c | 8 +-
dlls/ntdll/loader.c | 2 +
dlls/ntdll/thread.c | 34 ++++++
dlls/ntdll/thread.c | 35 ++++++
include/winternl.h | 2 +-
tools/winebuild/build.h | 1 +
tools/winebuild/spec32.c | 209 +++++++++++++++++++++++++++++++++--
tools/winebuild/utils.c | 10 +-
7 files changed, 251 insertions(+), 15 deletions(-)
7 files changed, 252 insertions(+), 15 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index efd5a25a432d..182b61b731a2 100644
index 984246681cb..78100205c9d 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1597,9 +1597,7 @@ static void test_FakeDLL(void)
@@ -1594,9 +1594,7 @@ static void test_FakeDLL(void)
ok(ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError());
dir = RtlImageDirectoryEntryToData(ptr, TRUE, IMAGE_DIRECTORY_ENTRY_EXPORT, &size);
@ -27,7 +27,7 @@ index efd5a25a432d..182b61b731a2 100644
names = RVAToAddr(dir->AddressOfNames, ptr);
ordinals = RVAToAddr(dir->AddressOfNameOrdinals, ptr);
@@ -1628,17 +1626,20 @@ todo_wine
@@ -1625,17 +1623,20 @@ todo_wine
/* check position in memory */
dll_rva = (DWORD_PTR)dll_func - (DWORD_PTR)module;
map_rva = funcs[ordinals[i]];
@ -48,7 +48,7 @@ index efd5a25a432d..182b61b731a2 100644
ok(!memcmp(map_func, dll_func, 0x20), "%s: Function content does not match!\n", func_name);
if (!strcmp(func_name, "NtSetEvent"))
@@ -1652,10 +1653,11 @@ todo_wine
@@ -1649,10 +1650,11 @@ todo_wine
ok(event != NULL, "CreateEvent failed with error %u\n", GetLastError());
pNtSetEvent(event, 0);
ok(WaitForSingleObject(event, 0) == WAIT_OBJECT_0, "Event was not signaled\n");
@ -62,10 +62,10 @@ index efd5a25a432d..182b61b731a2 100644
CloseHandle(map);
CloseHandle(file);
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index cac6aae2f3dd..51d989f30b45 100644
index 05d32ab167e..5b26a556f0d 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4022,6 +4022,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
@@ -3813,6 +3813,7 @@ PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule)
}
extern void DECLSPEC_NORETURN __wine_syscall_dispatcher( void );
@ -73,7 +73,7 @@ index cac6aae2f3dd..51d989f30b45 100644
/******************************************************************
* LdrInitializeThunk (NTDLL.@)
@@ -4040,6 +4041,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@@ -3830,6 +3831,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher;
@ -82,10 +82,18 @@ index cac6aae2f3dd..51d989f30b45 100644
if (process_detaching) return;
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index e93498b27ea0..a14e3a12ae0c 100644
index a878a7a27fa..21ae0e9ebbd 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -229,6 +229,39 @@ void __wine_syscall_dispatcher( void )
@@ -36,6 +36,7 @@
#include "ddk/wdm.h"
#include "wine/exception.h"
+WINE_DEFAULT_DEBUG_CHANNEL(thread);
WINE_DECLARE_DEBUG_CHANNEL(relay);
struct _KUSER_SHARED_DATA *user_shared_data = (void *)0x7ffe0000;
@@ -103,6 +104,39 @@ void __wine_syscall_dispatcher( void )
}
#endif
@ -125,7 +133,7 @@ index e93498b27ea0..a14e3a12ae0c 100644
/***********************************************************************
* thread_init
*
@@ -240,6 +273,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
@@ -114,6 +148,7 @@ TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
{
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
&is_wow64, &server_start_time, __wine_syscall_dispatcher );
@ -134,10 +142,10 @@ index e93498b27ea0..a14e3a12ae0c 100644
peb = teb->Peb;
peb->FastPebLock = &peb_lock;
diff --git a/include/winternl.h b/include/winternl.h
index 0c15a0ee6c34..6da672e979e5 100644
index 5f58366f649..d3b708c3e0d 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -399,7 +399,7 @@ typedef struct _TEB
@@ -398,7 +398,7 @@ typedef struct _TEB
PVOID Instrumentation[16]; /* f2c/16b8 */
PVOID WinSockData; /* f6c/1738 */
ULONG GdiBatchCount; /* f70/1740 */
@ -147,7 +155,7 @@ index 0c15a0ee6c34..6da672e979e5 100644
PVOID ReservedForPerf; /* f7c/1750 */
PVOID ReservedForOle; /* f80/1758 */
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 8930df408d3b..44113bad28af 100644
index 8930df408d3..44113bad28a 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -358,6 +358,7 @@ extern void put_word( unsigned short val );
@ -159,7 +167,7 @@ index 8930df408d3b..44113bad28af 100644
extern void align_output_rva( unsigned int file_align, unsigned int rva_align );
extern size_t label_pos( const char *name );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index c38f1fe663c7..bf82ca497c0d 100644
index c38f1fe663c..bf82ca497c0 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -843,6 +843,163 @@ void output_spec32_file( DLLSPEC *spec )
@ -415,7 +423,7 @@ index c38f1fe663c7..bf82ca497c0d 100644
/* .reloc contents */
align_output_rva( file_align, section_align );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 80dec6db29ea..d394a1382c68 100644
index 80dec6db29e..d394a1382c6 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -549,7 +549,7 @@ size_t output_buffer_size;
@ -457,5 +465,5 @@ index 80dec6db29ea..d394a1382c68 100644
{
size_t size = align - (output_buffer_pos % align);
--
2.26.2
2.27.0

View File

@ -1,4 +1,4 @@
From 88dc845f605a87a97247d4d2c795722afeba41dc Mon Sep 17 00:00:00 2001
From 2f3bcc431318c7db08080c6e2c9f9b566f9123ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 7 Sep 2017 00:38:09 +0200
Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
@ -15,10 +15,10 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit.
8 files changed, 305 insertions(+), 14 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 1f525194ce7..21af7b4ce7a 100644
index d39ebe4a37c..dccd9c1fc68 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -1574,7 +1574,7 @@ static void test_filenames(void)
@@ -1571,7 +1571,7 @@ static void test_filenames(void)
static void test_FakeDLL(void)
{
@ -27,7 +27,7 @@ index 1f525194ce7..21af7b4ce7a 100644
NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL;
IMAGE_EXPORT_DIRECTORY *dir;
HMODULE module = GetModuleHandleA("ntdll.dll");
@@ -1616,8 +1616,13 @@ static void test_FakeDLL(void)
@@ -1613,8 +1613,13 @@ static void test_FakeDLL(void)
dll_func = (BYTE *)GetProcAddress(module, func_name);
ok(dll_func != NULL, "%s: GetProcAddress returned NULL\n", func_name);
@ -42,10 +42,10 @@ index 1f525194ce7..21af7b4ce7a 100644
todo_wine ok(0, "%s: Export is a stub-function, skipping\n", func_name);
continue;
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 212ebda0443..0279690806c 100644
index cb44bbfd5ea..196dc2d8c4e 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -110,7 +110,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
@@ -104,7 +104,7 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
dbg_init();
server_init_process();
info_size = server_init_thread( teb->Peb, suspend );
@ -55,23 +55,23 @@ index 212ebda0443..0279690806c 100644
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index e668c8e6fbb..19196dbb296 100644
index 166a6542724..df508e569f9 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -171,7 +171,7 @@ extern ULONG_PTR get_system_affinity_mask(void) DECLSPEC_HIDDEN;
extern TEB *virtual_alloc_first_teb(void) DECLSPEC_HIDDEN;
@@ -177,7 +177,7 @@ extern TEB *virtual_alloc_first_teb(void) DECLSPEC_HIDDEN;
extern NTSTATUS virtual_alloc_teb( TEB **ret_teb ) DECLSPEC_HIDDEN;
extern void virtual_free_teb( TEB *teb ) DECLSPEC_HIDDEN;
extern NTSTATUS virtual_clear_tls_index( ULONG index ) DECLSPEC_HIDDEN;
-extern void virtual_map_user_shared_data(void) DECLSPEC_HIDDEN;
+extern void virtual_map_user_shared_data(void *) DECLSPEC_HIDDEN;
+extern void virtual_map_user_shared_data( void *syscall_handler ) DECLSPEC_HIDDEN;
extern NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack ) DECLSPEC_HIDDEN;
extern unsigned int virtual_locked_server_call( void *req_ptr ) DECLSPEC_HIDDEN;
extern ssize_t virtual_locked_read( int fd, void *addr, size_t size ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index a3b2cb2c477..5cf4eb626c0 100644
index ca25cdd304e..7f7660d0795 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -2771,14 +2771,14 @@ TEB *virtual_alloc_first_teb(void)
@@ -2607,14 +2607,14 @@ TEB *virtual_alloc_first_teb(void)
TEB *teb;
PEB *peb;
NTSTATUS status;
@ -88,7 +88,7 @@ index a3b2cb2c477..5cf4eb626c0 100644
if (status)
{
ERR( "wine: failed to map the shared user data: %08x\n", status );
@@ -2976,7 +2976,7 @@ void virtual_clear_thread_stack( void *stack_end )
@@ -2838,7 +2838,7 @@ void virtual_clear_thread_stack( void *stack_end )
/***********************************************************************
* virtual_map_user_shared_data
*/
@ -97,7 +97,7 @@ index a3b2cb2c477..5cf4eb626c0 100644
{
static const WCHAR wine_usdW[] = {'\\','K','e','r','n','e','l','O','b','j','e','c','t','s',
'\\','_','_','w','i','n','e','_','u','s','e','r','_','s','h','a','r','e','d','_','d','a','t','a',0};
@@ -2999,6 +2999,11 @@ void virtual_map_user_shared_data(void)
@@ -2861,6 +2861,11 @@ void virtual_map_user_shared_data(void)
ERR( "failed to remap the process USD: %d\n", res );
exit(1);
}

View File

@ -1,4 +1,4 @@
From cae4c8ad24a127367a3cf8bcc1333af72eea8cc9 Mon Sep 17 00:00:00 2001
From ac99500b2479f2c9cfed43408c26e0f78261c46b Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Fri, 3 Jan 2020 17:39:08 +0300
Subject: [PATCH] ntdll: Call NtOpenFile through syscall thunk.
@ -10,14 +10,13 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48410
dlls/ntdll/locale.c | 4 ++--
dlls/ntdll/ntdll_misc.h | 8 ++++++++
dlls/ntdll/path.c | 2 +-
dlls/ntdll/process.c | 2 +-
6 files changed, 15 insertions(+), 7 deletions(-)
5 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index e1051745db3..fcc22774338 100644
index 1fa97ac0379..9bf425c6e2d 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -2928,7 +2928,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name )
@@ -2926,7 +2926,7 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name )
attr.ObjectName = name;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
@ -26,7 +25,7 @@ index e1051745db3..fcc22774338 100644
}
static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assembly_identity* ai,
@@ -3245,7 +3245,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
@@ -3243,7 +3243,7 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
@ -36,10 +35,10 @@ index e1051745db3..fcc22774338 100644
{
sxs_ai = *ai;
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 316e5fa0b5b..675d767c5a1 100644
index 5b26a556f0d..053d6a8ef1d 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2521,7 +2521,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm,
@@ -2327,7 +2327,7 @@ static NTSTATUS open_dll_file( UNICODE_STRING *nt_name, WINE_MODREF **pwm,
attr.ObjectName = nt_name;
attr.SecurityDescriptor = NULL;
attr.SecurityQualityOfService = NULL;
@ -71,10 +70,10 @@ index d6bde700e42..16a7f911173 100644
}
RtlFreeUnicodeString( &valueW );
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index af30044ad1f..d7076c7a2b8 100644
index 47800db41b1..749edaa57cf 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -282,4 +282,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
@@ -227,4 +227,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
while (len--) *dst++ = (unsigned char)*src++;
}
@ -100,19 +99,6 @@ index 5f4eb11316f..d2112d1af0d 100644
FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
if (nts != STATUS_SUCCESS) goto out;
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 533fe963cae..fd0e86ce147 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -396,7 +396,7 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, ULONG attributes,
memset( info, 0, sizeof(*info) );
InitializeObjectAttributes( &attr, path, attributes, 0, 0 );
- if ((status = NtOpenFile( handle, GENERIC_READ, &attr, &io,
+ if ((status = __syscall_NtOpenFile( handle, GENERIC_READ, &attr, &io,
FILE_SHARE_READ | FILE_SHARE_DELETE, FILE_SYNCHRONOUS_IO_NONALERT )))
{
BOOL is_64bit;
--
2.27.0

View File

@ -1 +1 @@
67ef5151744b347d4a30c985da6712fb0061e675
e80df2d2d54a3f16389bea77f6863cc1c05d6251