Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b40be1d4
Commit
b40be1d4
authored
May 18, 2020
by
Paul Gofman
Committed by
Alexandre Julliard
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Emulate full user shared data area range.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1a7b4fb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
instr.c
dlls/ntoskrnl.exe/instr.c
+9
-3
No files found.
dlls/ntoskrnl.exe/instr.c
View file @
b40be1d4
...
...
@@ -33,6 +33,8 @@
#include "wine/debug.h"
#include "wine/exception.h"
#define KSHARED_USER_DATA_PAGE_SIZE 0x1000
#ifdef __i386__
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
...
...
@@ -790,9 +792,11 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
unsigned
int
data_size
=
(
instr
[
1
]
==
0xb7
)
?
2
:
1
;
SIZE_T
offset
=
data
-
user_shared_data
;
if
(
offset
<=
sizeof
(
KSHARED_USER_DATA
)
-
data_size
)
if
(
offset
<=
KSHARED_USER_DATA_PAGE_SIZE
-
data_size
)
{
ULONGLONG
temp
=
0
;
TRACE
(
"USD offset %#x at %p.
\n
"
,
(
unsigned
int
)
offset
,
(
void
*
)
context
->
Rip
);
memcpy
(
&
temp
,
wine_user_shared_data
+
offset
,
data_size
);
store_reg_word
(
context
,
instr
[
2
],
(
BYTE
*
)
&
temp
,
long_op
,
rex
);
context
->
Rip
+=
prefixlen
+
len
+
2
;
...
...
@@ -811,8 +815,9 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
unsigned
int
data_size
=
(
*
instr
==
0x8b
)
?
get_op_size
(
long_op
,
rex
)
:
1
;
SIZE_T
offset
=
data
-
user_shared_data
;
if
(
offset
<=
sizeof
(
KSHARED_USER_DATA
)
-
data_size
)
if
(
offset
<=
KSHARED_USER_DATA_PAGE_SIZE
-
data_size
)
{
TRACE
(
"USD offset %#x at %p.
\n
"
,
(
unsigned
int
)
offset
,
(
void
*
)
context
->
Rip
);
switch
(
*
instr
)
{
case
0x8a
:
store_reg_byte
(
context
,
instr
[
1
],
wine_user_shared_data
+
offset
,
rex
);
break
;
...
...
@@ -832,8 +837,9 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
SIZE_T
offset
=
data
-
user_shared_data
;
len
=
long_addr
?
sizeof
(
DWORD64
)
:
sizeof
(
DWORD
);
if
(
offset
<=
sizeof
(
KSHARED_USER_DATA
)
-
data_size
)
if
(
offset
<=
KSHARED_USER_DATA_PAGE_SIZE
-
data_size
)
{
TRACE
(
"USD offset %#x at %p.
\n
"
,
(
unsigned
int
)
offset
,
(
void
*
)
context
->
Rip
);
memcpy
(
&
context
->
Rax
,
wine_user_shared_data
+
offset
,
data_size
);
context
->
Rip
+=
prefixlen
+
len
+
1
;
return
ExceptionContinueExecution
;
...
...
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