Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6a296592
Commit
6a296592
authored
May 07, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Send the zero_bits parameter for remote NtCreateThreadEx() calls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e9bc48e9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
10 deletions
+15
-10
server.c
dlls/ntdll/unix/server.c
+2
-1
thread.c
dlls/ntdll/unix/thread.c
+8
-7
server_protocol.h
include/wine/server_protocol.h
+2
-1
winternl.h
include/winternl.h
+1
-1
protocol.def
server/protocol.def
+1
-0
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntdll/unix/server.c
View file @
6a296592
...
...
@@ -550,6 +550,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
CLIENT_ID
id
;
HANDLE
handle
;
TEB
*
teb
;
ULONG_PTR
zero_bits
=
call
->
create_thread
.
zero_bits
;
SIZE_T
reserve
=
call
->
create_thread
.
reserve
;
SIZE_T
commit
=
call
->
create_thread
.
commit
;
void
*
func
=
wine_server_get_ptr
(
call
->
create_thread
.
func
);
...
...
@@ -570,7 +571,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
attr
->
Attributes
[
1
].
ReturnLength
=
NULL
;
result
->
create_thread
.
status
=
NtCreateThreadEx
(
&
handle
,
THREAD_ALL_ACCESS
,
NULL
,
NtCurrentProcess
(),
func
,
arg
,
call
->
create_thread
.
flags
,
0
,
call
->
create_thread
.
flags
,
zero_bits
,
commit
,
reserve
,
attr
);
result
->
create_thread
.
handle
=
wine_server_obj_handle
(
handle
);
result
->
create_thread
.
pid
=
HandleToULong
(
id
.
UniqueProcess
);
...
...
dlls/ntdll/unix/thread.c
View file @
6a296592
...
...
@@ -161,7 +161,7 @@ NTSTATUS WINAPI NtCreateThread( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRI
*/
NTSTATUS
WINAPI
NtCreateThreadEx
(
HANDLE
*
handle
,
ACCESS_MASK
access
,
OBJECT_ATTRIBUTES
*
attr
,
HANDLE
process
,
PRTL_THREAD_START_ROUTINE
start
,
void
*
param
,
ULONG
flags
,
SIZE_T
zero_bits
,
SIZE_T
stack_commit
,
ULONG
flags
,
ULONG_PTR
zero_bits
,
SIZE_T
stack_commit
,
SIZE_T
stack_reserve
,
PS_ATTRIBUTE_LIST
*
attr_list
)
{
sigset_t
sigset
;
...
...
@@ -185,12 +185,13 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
memset
(
&
call
,
0
,
sizeof
(
call
)
);
call
.
create_thread
.
type
=
APC_CREATE_THREAD
;
call
.
create_thread
.
flags
=
flags
;
call
.
create_thread
.
func
=
wine_server_client_ptr
(
start
);
call
.
create_thread
.
arg
=
wine_server_client_ptr
(
param
);
call
.
create_thread
.
reserve
=
stack_reserve
;
call
.
create_thread
.
commit
=
stack_commit
;
call
.
create_thread
.
type
=
APC_CREATE_THREAD
;
call
.
create_thread
.
flags
=
flags
;
call
.
create_thread
.
func
=
wine_server_client_ptr
(
start
);
call
.
create_thread
.
arg
=
wine_server_client_ptr
(
param
);
call
.
create_thread
.
zero_bits
=
zero_bits
;
call
.
create_thread
.
reserve
=
stack_reserve
;
call
.
create_thread
.
commit
=
stack_commit
;
status
=
server_queue_process_apc
(
process
,
&
call
,
&
result
);
if
(
status
!=
STATUS_SUCCESS
)
return
status
;
...
...
include/wine/server_protocol.h
View file @
6a296592
...
...
@@ -564,6 +564,7 @@ typedef union
unsigned
int
flags
;
client_ptr_t
func
;
client_ptr_t
arg
;
mem_size_t
zero_bits
;
mem_size_t
reserve
;
mem_size_t
commit
;
}
create_thread
;
...
...
@@ -6232,7 +6233,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 69
7
#define SERVER_PROTOCOL_VERSION 69
8
/* ### protocol_version end ### */
...
...
include/winternl.h
View file @
6a296592
...
...
@@ -3678,7 +3678,7 @@ NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRI
NTSYSAPI
NTSTATUS
WINAPI
NtCreateSemaphore
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
LONG
,
LONG
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateSymbolicLinkObject
(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
PUNICODE_STRING
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateThread
(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
HANDLE
,
PCLIENT_ID
,
PCONTEXT
,
PINITIAL_TEB
,
BOOLEAN
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateThreadEx
(
HANDLE
*
,
ACCESS_MASK
,
OBJECT_ATTRIBUTES
*
,
HANDLE
,
PRTL_THREAD_START_ROUTINE
,
void
*
,
ULONG
,
SIZE_T
,
SIZE_T
,
SIZE_T
,
PS_ATTRIBUTE_LIST
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateThreadEx
(
HANDLE
*
,
ACCESS_MASK
,
OBJECT_ATTRIBUTES
*
,
HANDLE
,
PRTL_THREAD_START_ROUTINE
,
void
*
,
ULONG
,
ULONG_PTR
,
SIZE_T
,
SIZE_T
,
PS_ATTRIBUTE_LIST
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateTimer
(
HANDLE
*
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
TIMER_TYPE
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateToken
(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
TOKEN_TYPE
,
PLUID
,
PLARGE_INTEGER
,
PTOKEN_USER
,
PTOKEN_GROUPS
,
PTOKEN_PRIVILEGES
,
PTOKEN_OWNER
,
PTOKEN_PRIMARY_GROUP
,
PTOKEN_DEFAULT_DACL
,
PTOKEN_SOURCE
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateUserProcess
(
HANDLE
*
,
HANDLE
*
,
ACCESS_MASK
,
ACCESS_MASK
,
OBJECT_ATTRIBUTES
*
,
OBJECT_ATTRIBUTES
*
,
ULONG
,
ULONG
,
RTL_USER_PROCESS_PARAMETERS
*
,
PS_CREATE_INFO
*
,
PS_ATTRIBUTE_LIST
*
);
...
...
server/protocol.def
View file @
6a296592
...
...
@@ -580,6 +580,7 @@ typedef union
unsigned int flags; /* creation flags */
client_ptr_t func; /* void (__stdcall *func)(void*); start function */
client_ptr_t arg; /* argument for start function */
mem_size_t zero_bits; /* number of zero high bits for thread stack */
mem_size_t reserve; /* reserve size for thread stack */
mem_size_t commit; /* commit size for thread stack */
} create_thread;
...
...
server/trace.c
View file @
6a296592
...
...
@@ -216,6 +216,7 @@ static void dump_apc_call( const char *prefix, const apc_call_t *call )
case
APC_CREATE_THREAD
:
dump_uint64
(
"APC_CREATE_THREAD,func="
,
&
call
->
create_thread
.
func
);
dump_uint64
(
",arg="
,
&
call
->
create_thread
.
arg
);
dump_uint64
(
",zero_bits="
,
&
call
->
create_thread
.
zero_bits
);
dump_uint64
(
",reserve="
,
&
call
->
create_thread
.
reserve
);
dump_uint64
(
",commit="
,
&
call
->
create_thread
.
commit
);
fprintf
(
stderr
,
",flags=%x"
,
call
->
create_thread
.
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment