You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against e80df2d2d54a3f16389bea77f6863cc1c05d6251.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user