mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
ntdll-Syscall_Wrappers: Delete disabled patchset.
This commit is contained in:
parent
c0304d7976
commit
7492968519
@ -1,30 +0,0 @@
|
||||
From d6feff32b27e0661406b4f24ec7932f919a9628a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 30 Oct 2015 23:43:02 +0100
|
||||
Subject: winegcc: Pass '-read_only_relocs suppress' to the linker on OSX.
|
||||
|
||||
---
|
||||
tools/winegcc/winegcc.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
|
||||
index ad139f5..220784b 100644
|
||||
--- a/tools/winegcc/winegcc.c
|
||||
+++ b/tools/winegcc/winegcc.c
|
||||
@@ -377,7 +377,12 @@ static const strarray* get_lddllflags( const struct options *opts, const strarra
|
||||
strarray_add( flags, "-bundle" );
|
||||
strarray_add( flags, "-multiply_defined" );
|
||||
strarray_add( flags, "suppress" );
|
||||
- if (opts->target_cpu == CPU_POWERPC)
|
||||
+ if (opts->target_cpu == CPU_x86)
|
||||
+ {
|
||||
+ strarray_add( flags, "-read_only_relocs" );
|
||||
+ strarray_add( flags, "suppress" );
|
||||
+ }
|
||||
+ else if (opts->target_cpu == CPU_POWERPC)
|
||||
{
|
||||
strarray_add( flags, "-read_only_relocs" );
|
||||
strarray_add( flags, "warning" );
|
||||
--
|
||||
2.6.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,123 +0,0 @@
|
||||
From 4e541d44f6cf1e1003bdc4203e50a4c2fe45fcc0 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 16 Oct 2015 05:17:26 +0200
|
||||
Subject: ntdll: APCs should call the implementation instead of the syscall
|
||||
thunk.
|
||||
|
||||
---
|
||||
dlls/ntdll/ntdll_misc.h | 13 +++++++++++++
|
||||
dlls/ntdll/server.c | 18 +++++++++---------
|
||||
2 files changed, 22 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index e3f902f..5566080 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -272,6 +272,19 @@ extern HANDLE keyed_event DECLSPEC_HIDDEN;
|
||||
"call *%edx\n\t" \
|
||||
"ret $(4*" #args ")" )
|
||||
|
||||
+#define DECLARE_SYSCALL_ENTRYPOINT( name ) \
|
||||
+ extern typeof( name ) __syscall_ ## name
|
||||
+
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtAllocateVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtFlushVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtFreeVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtLockVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtMapViewOfSection );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtProtectVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtQueryVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtUnlockVirtualMemory );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtUnmapViewOfSection );
|
||||
+
|
||||
#else /* defined(__i386__) */
|
||||
|
||||
#define SYSCALL( name ) name
|
||||
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
|
||||
index 356d631..5d7be34 100644
|
||||
--- a/dlls/ntdll/server.c
|
||||
+++ b/dlls/ntdll/server.c
|
||||
@@ -424,7 +424,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
size = call->virtual_alloc.size;
|
||||
if ((ULONG_PTR)addr == call->virtual_alloc.addr && size == call->virtual_alloc.size)
|
||||
{
|
||||
- result->virtual_alloc.status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr,
|
||||
+ result->virtual_alloc.status = SYSCALL(NtAllocateVirtualMemory)( NtCurrentProcess(), &addr,
|
||||
call->virtual_alloc.zero_bits, &size,
|
||||
call->virtual_alloc.op_type,
|
||||
call->virtual_alloc.prot );
|
||||
@@ -439,7 +439,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
size = call->virtual_free.size;
|
||||
if ((ULONG_PTR)addr == call->virtual_free.addr && size == call->virtual_free.size)
|
||||
{
|
||||
- result->virtual_free.status = NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size,
|
||||
+ result->virtual_free.status = SYSCALL(NtFreeVirtualMemory)( NtCurrentProcess(), &addr, &size,
|
||||
call->virtual_free.op_type );
|
||||
result->virtual_free.addr = wine_server_client_ptr( addr );
|
||||
result->virtual_free.size = size;
|
||||
@@ -452,7 +452,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
result->type = call->type;
|
||||
addr = wine_server_get_ptr( call->virtual_query.addr );
|
||||
if ((ULONG_PTR)addr == call->virtual_query.addr)
|
||||
- result->virtual_query.status = NtQueryVirtualMemory( NtCurrentProcess(),
|
||||
+ result->virtual_query.status = SYSCALL(NtQueryVirtualMemory)( NtCurrentProcess(),
|
||||
addr, MemoryBasicInformation, &info,
|
||||
sizeof(info), NULL );
|
||||
else
|
||||
@@ -476,7 +476,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
size = call->virtual_protect.size;
|
||||
if ((ULONG_PTR)addr == call->virtual_protect.addr && size == call->virtual_protect.size)
|
||||
{
|
||||
- result->virtual_protect.status = NtProtectVirtualMemory( NtCurrentProcess(), &addr, &size,
|
||||
+ result->virtual_protect.status = SYSCALL(NtProtectVirtualMemory)( NtCurrentProcess(), &addr, &size,
|
||||
call->virtual_protect.prot,
|
||||
&result->virtual_protect.prot );
|
||||
result->virtual_protect.addr = wine_server_client_ptr( addr );
|
||||
@@ -490,7 +490,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
size = call->virtual_flush.size;
|
||||
if ((ULONG_PTR)addr == call->virtual_flush.addr && size == call->virtual_flush.size)
|
||||
{
|
||||
- result->virtual_flush.status = NtFlushVirtualMemory( NtCurrentProcess(),
|
||||
+ result->virtual_flush.status = SYSCALL(NtFlushVirtualMemory)( NtCurrentProcess(),
|
||||
(const void **)&addr, &size, 0 );
|
||||
result->virtual_flush.addr = wine_server_client_ptr( addr );
|
||||
result->virtual_flush.size = size;
|
||||
@@ -503,7 +503,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
size = call->virtual_lock.size;
|
||||
if ((ULONG_PTR)addr == call->virtual_lock.addr && size == call->virtual_lock.size)
|
||||
{
|
||||
- result->virtual_lock.status = NtLockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 );
|
||||
+ result->virtual_lock.status = SYSCALL(NtLockVirtualMemory)( NtCurrentProcess(), &addr, &size, 0 );
|
||||
result->virtual_lock.addr = wine_server_client_ptr( addr );
|
||||
result->virtual_lock.size = size;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
size = call->virtual_unlock.size;
|
||||
if ((ULONG_PTR)addr == call->virtual_unlock.addr && size == call->virtual_unlock.size)
|
||||
{
|
||||
- result->virtual_unlock.status = NtUnlockVirtualMemory( NtCurrentProcess(), &addr, &size, 0 );
|
||||
+ result->virtual_unlock.status = SYSCALL(NtUnlockVirtualMemory)( NtCurrentProcess(), &addr, &size, 0 );
|
||||
result->virtual_unlock.addr = wine_server_client_ptr( addr );
|
||||
result->virtual_unlock.size = size;
|
||||
}
|
||||
@@ -529,7 +529,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
{
|
||||
LARGE_INTEGER offset;
|
||||
offset.QuadPart = call->map_view.offset;
|
||||
- result->map_view.status = NtMapViewOfSection( wine_server_ptr_handle(call->map_view.handle),
|
||||
+ result->map_view.status = SYSCALL(NtMapViewOfSection)( wine_server_ptr_handle(call->map_view.handle),
|
||||
NtCurrentProcess(), &addr,
|
||||
call->map_view.zero_bits, 0,
|
||||
&offset, &size, ViewShare,
|
||||
@@ -544,7 +544,7 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
|
||||
result->type = call->type;
|
||||
addr = wine_server_get_ptr( call->unmap_view.addr );
|
||||
if ((ULONG_PTR)addr == call->unmap_view.addr)
|
||||
- result->unmap_view.status = NtUnmapViewOfSection( NtCurrentProcess(), addr );
|
||||
+ result->unmap_view.status = SYSCALL(NtUnmapViewOfSection)( NtCurrentProcess(), addr );
|
||||
else
|
||||
result->unmap_view.status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,71 +0,0 @@
|
||||
From 04018008d5ca9c25a5d5e9c6eed7c6c1a8938a5c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 16 Oct 2015 05:31:11 +0200
|
||||
Subject: ntdll: Syscalls should not call Nt*Ex thunk wrappers.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 4 ++--
|
||||
dlls/ntdll/ntdll_misc.h | 2 ++
|
||||
dlls/ntdll/reg.c | 4 ++--
|
||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 19d5b6e..a0d8909 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -124,7 +124,7 @@ NTSTATUS WINAPI SYSCALL(NtOpenProcessToken)(
|
||||
DWORD DesiredAccess,
|
||||
HANDLE *TokenHandle)
|
||||
{
|
||||
- return NtOpenProcessTokenEx( ProcessHandle, DesiredAccess, 0, TokenHandle );
|
||||
+ return SYSCALL(NtOpenProcessTokenEx)( ProcessHandle, DesiredAccess, 0, TokenHandle );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -163,7 +163,7 @@ NTSTATUS WINAPI SYSCALL(NtOpenThreadToken)(
|
||||
BOOLEAN OpenAsSelf,
|
||||
HANDLE *TokenHandle)
|
||||
{
|
||||
- return NtOpenThreadTokenEx( ThreadHandle, DesiredAccess, OpenAsSelf, 0, TokenHandle );
|
||||
+ return SYSCALL(NtOpenThreadTokenEx)( ThreadHandle, DesiredAccess, OpenAsSelf, 0, TokenHandle );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 5566080..ee94382 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -280,6 +280,8 @@ DECLARE_SYSCALL_ENTRYPOINT( NtFlushVirtualMemory );
|
||||
DECLARE_SYSCALL_ENTRYPOINT( NtFreeVirtualMemory );
|
||||
DECLARE_SYSCALL_ENTRYPOINT( NtLockVirtualMemory );
|
||||
DECLARE_SYSCALL_ENTRYPOINT( NtMapViewOfSection );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtOpenProcessTokenEx );
|
||||
+DECLARE_SYSCALL_ENTRYPOINT( NtOpenThreadTokenEx );
|
||||
DECLARE_SYSCALL_ENTRYPOINT( NtProtectVirtualMemory );
|
||||
DECLARE_SYSCALL_ENTRYPOINT( NtQueryVirtualMemory );
|
||||
DECLARE_SYSCALL_ENTRYPOINT( NtUnlockVirtualMemory );
|
||||
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
|
||||
index b74c464..406d72f 100644
|
||||
--- a/dlls/ntdll/reg.c
|
||||
+++ b/dlls/ntdll/reg.c
|
||||
@@ -183,7 +183,7 @@ DEFINE_SYSCALL_ENTRYPOINT( NtOpenKeyTransacted, 4 );
|
||||
NTSTATUS WINAPI SYSCALL(NtOpenKeyTransacted)( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr,
|
||||
HANDLE transaction )
|
||||
{
|
||||
- return NtOpenKeyTransactedEx( retkey, access, attr, 0, transaction );
|
||||
+ return SYSCALL(NtOpenKeyTransactedEx)( retkey, access, attr, 0, transaction );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
@@ -749,7 +749,7 @@ NTSTATUS WINAPI SYSCALL(NtNotifyChangeKey)(
|
||||
IN ULONG Length,
|
||||
IN BOOLEAN Asynchronous)
|
||||
{
|
||||
- return NtNotifyChangeMultipleKeys(KeyHandle, 0, NULL, Event, ApcRoutine, ApcContext,
|
||||
+ return SYSCALL(NtNotifyChangeMultipleKeys)(KeyHandle, 0, NULL, Event, ApcRoutine, ApcContext,
|
||||
IoStatusBlock, CompletionFilter, WatchSubtree,
|
||||
ChangeBuffer, Length, Asynchronous);
|
||||
}
|
||||
--
|
||||
2.6.2
|
||||
|
@ -1,91 +0,0 @@
|
||||
From 3a40ae6b1e3cd67ea606a7af6938788fe470773e Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 16 Oct 2015 05:54:08 +0200
|
||||
Subject: ntdll: Run directory initialization function early during the process
|
||||
startup.
|
||||
|
||||
---
|
||||
dlls/ntdll/directory.c | 10 ++--------
|
||||
dlls/ntdll/loader.c | 1 +
|
||||
dlls/ntdll/ntdll_misc.h | 1 +
|
||||
3 files changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
|
||||
index 770cd3f..94b6d77 100644
|
||||
--- a/dlls/ntdll/directory.c
|
||||
+++ b/dlls/ntdll/directory.c
|
||||
@@ -176,7 +176,6 @@ union file_directory_info
|
||||
};
|
||||
|
||||
static BOOL show_dot_files;
|
||||
-static RTL_RUN_ONCE init_once = RTL_RUN_ONCE_INIT;
|
||||
|
||||
/* at some point we may want to allow Winelib apps to set this */
|
||||
static const BOOL is_case_sensitive = FALSE;
|
||||
@@ -1164,11 +1163,11 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
- * init_options
|
||||
+ * DIR_init_options
|
||||
*
|
||||
* Initialize the show_dot_files options.
|
||||
*/
|
||||
-static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **context )
|
||||
+void DIR_init_options(void)
|
||||
{
|
||||
static const WCHAR WineW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0};
|
||||
static const WCHAR ShowDotFilesW[] = {'S','h','o','w','D','o','t','F','i','l','e','s',0};
|
||||
@@ -1207,7 +1206,6 @@ static DWORD WINAPI init_options( RTL_RUN_ONCE *once, void *param, void **contex
|
||||
#ifdef linux
|
||||
ignore_file( "/sys" );
|
||||
#endif
|
||||
- return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1220,8 +1218,6 @@ BOOL DIR_is_hidden_file( const UNICODE_STRING *name )
|
||||
{
|
||||
WCHAR *p, *end;
|
||||
|
||||
- RtlRunOnceExecuteOnce( &init_once, init_options, NULL, NULL );
|
||||
-
|
||||
if (show_dot_files) return FALSE;
|
||||
|
||||
end = p = name->Buffer + name->Length/sizeof(WCHAR);
|
||||
@@ -2278,8 +2274,6 @@ NTSTATUS WINAPI SYSCALL(NtQueryDirectoryFile)( HANDLE handle, HANDLE event,
|
||||
|
||||
io->Information = 0;
|
||||
|
||||
- RtlRunOnceExecuteOnce( &init_once, init_options, NULL, NULL );
|
||||
-
|
||||
RtlEnterCriticalSection( &dir_section );
|
||||
|
||||
cwd = open( ".", O_RDONLY );
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index ecbc885..04cbb63 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3283,6 +3283,7 @@ void __wine_process_init(void)
|
||||
umask( FILE_umask );
|
||||
|
||||
load_global_options();
|
||||
+ DIR_init_options();
|
||||
|
||||
/* setup the load callback and create ntdll modref */
|
||||
wine_dll_set_callback( load_builtin_callback );
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 11099c5..5ba1308 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -153,6 +153,7 @@ extern int get_file_info( const char *path, struct stat *st, ULONG *attr ) DECLS
|
||||
extern NTSTATUS fill_file_info( const struct stat *st, ULONG attr, void *ptr,
|
||||
FILE_INFORMATION_CLASS class ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS server_get_unix_name( HANDLE handle, ANSI_STRING *unix_name ) DECLSPEC_HIDDEN;
|
||||
+extern void DIR_init_options(void) DECLSPEC_HIDDEN;
|
||||
extern void DIR_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir ) DECLSPEC_HIDDEN;
|
||||
extern BOOL DIR_is_hidden_file( const UNICODE_STRING *name ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS DIR_unmount_device( HANDLE handle ) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.6.1
|
||||
|
@ -1,2 +0,0 @@
|
||||
# Fixes: [39403] Use wrapper functions for syscalls to appease Chromium sandbox (32-bit)
|
||||
Disabled: true
|
Loading…
Reference in New Issue
Block a user