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
f6ccadda
Commit
f6ccadda
authored
Aug 28, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Create the cross-process work list.
parent
049fb065
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
wow64.c
dlls/ntdll/tests/wow64.c
+1
-0
syscall.c
dlls/wow64/syscall.c
+36
-0
No files found.
dlls/ntdll/tests/wow64.c
View file @
f6ccadda
...
...
@@ -436,6 +436,7 @@ static void test_peb_teb(void)
status
=
NtMapViewOfSection
(
handle
,
GetCurrentProcess
(),
&
addr
,
0
,
0
,
NULL
,
&
size
,
ViewShare
,
0
,
PAGE_READWRITE
);
ok
(
!
status
,
"NtMapViewOfSection failed %lx
\n
"
,
status
);
ok
(
size
==
0x4000
,
"unexpected size %Ix
\n
"
,
size
);
data
=
malloc
(
size
);
ret
=
ReadProcessMemory
(
pi
.
hProcess
,
(
void
*
)(
ULONG_PTR
)
wow64info
->
CrossProcessWorkList
,
data
,
size
,
&
size
);
...
...
dlls/wow64/syscall.c
View file @
f6ccadda
...
...
@@ -799,6 +799,40 @@ static const WCHAR *get_cpu_dll_name(void)
/**********************************************************************
* create_cross_process_work_list
*/
static
NTSTATUS
create_cross_process_work_list
(
WOW64INFO
*
wow64info
)
{
SIZE_T
map_size
=
0x4000
;
LARGE_INTEGER
size
;
NTSTATUS
status
;
HANDLE
section
;
CROSS_PROCESS_WORK_LIST
*
list
=
NULL
;
CROSS_PROCESS_WORK_ENTRY
*
end
;
UINT
i
;
size
.
QuadPart
=
map_size
;
status
=
NtCreateSection
(
&
section
,
SECTION_ALL_ACCESS
,
NULL
,
&
size
,
PAGE_READWRITE
,
SEC_COMMIT
,
0
);
if
(
status
)
return
status
;
status
=
NtMapViewOfSection
(
section
,
GetCurrentProcess
(),
(
void
**
)
&
list
,
default_zero_bits
,
0
,
NULL
,
&
map_size
,
ViewShare
,
MEM_TOP_DOWN
,
PAGE_READWRITE
);
if
(
status
)
{
NtClose
(
section
);
return
status
;
}
end
=
(
CROSS_PROCESS_WORK_ENTRY
*
)((
char
*
)
list
+
map_size
);
for
(
i
=
0
;
list
->
entries
+
i
+
1
<=
end
;
i
++
)
RtlWow64PushCrossProcessWorkOntoFreeList
(
&
list
->
free_list
,
&
list
->
entries
[
i
]
);
wow64info
->
SectionHandle
=
(
ULONG_PTR
)
section
;
wow64info
->
CrossProcessWorkList
=
(
ULONG_PTR
)
list
;
return
STATUS_SUCCESS
;
}
/**********************************************************************
* process_init
*/
static
DWORD
WINAPI
process_init
(
RTL_RUN_ONCE
*
once
,
void
*
param
,
void
**
context
)
...
...
@@ -863,6 +897,8 @@ static DWORD WINAPI process_init( RTL_RUN_ONCE *once, void *param, void **contex
init_syscall_table
(
module
,
p__wine_syscall_dispatcher
,
&
ntdll_syscall_table
);
if
(
wow64info
->
CpuFlags
&
WOW64_CPUFLAGS_SOFTWARE
)
create_cross_process_work_list
(
wow64info
);
init_file_redirects
();
return
TRUE
;
...
...
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