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
d082ea3e
Commit
d082ea3e
authored
Jun 26, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jun 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement support for AT_ROUND_TO_PAGE flag in NtMapViewOfSection.
parent
7a8470ea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
virtual.c
dlls/kernel32/tests/virtual.c
+0
-8
virtual.c
dlls/ntdll/virtual.c
+8
-0
No files found.
dlls/kernel32/tests/virtual.c
View file @
d082ea3e
...
...
@@ -1129,7 +1129,6 @@ static void test_NtMapViewOfSection(void)
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
0
,
0
,
&
offset
,
&
size
,
1
,
AT_ROUND_TO_PAGE
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_CONFLICTING_ADDRESSES
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
/* in contrary to regular NtMapViewOfSection, only 4kb align is enforced */
...
...
@@ -1138,12 +1137,10 @@ static void test_NtMapViewOfSection(void)
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
0
,
0
,
&
offset
,
&
size
,
1
,
AT_ROUND_TO_PAGE
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
ok
(
(
char
*
)
ptr2
==
(
char
*
)
ptr
+
0x1000
,
"expected address %p, got %p
\n
"
,
(
char
*
)
ptr
+
0x1000
,
ptr2
);
status
=
pNtUnmapViewOfSection
(
hProcess
,
ptr2
);
todo_wine
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
/* the address is rounded down if not on a page boundary */
...
...
@@ -1152,13 +1149,10 @@ static void test_NtMapViewOfSection(void)
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
0
,
0
,
&
offset
,
&
size
,
1
,
AT_ROUND_TO_PAGE
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
todo_wine
ok
(
(
char
*
)
ptr2
==
(
char
*
)
ptr
+
0x1000
,
"expected address %p, got %p
\n
"
,
(
char
*
)
ptr
+
0x1000
,
ptr2
);
status
=
pNtUnmapViewOfSection
(
hProcess
,
ptr2
);
todo_wine
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
ptr2
=
(
char
*
)
ptr
+
0x2000
;
...
...
@@ -1166,12 +1160,10 @@ static void test_NtMapViewOfSection(void)
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
0
,
0
,
&
offset
,
&
size
,
1
,
AT_ROUND_TO_PAGE
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
ok
(
(
char
*
)
ptr2
==
(
char
*
)
ptr
+
0x2000
,
"expected address %p, got %p
\n
"
,
(
char
*
)
ptr
+
0x2000
,
ptr2
);
status
=
pNtUnmapViewOfSection
(
hProcess
,
ptr2
);
todo_wine
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
}
else
...
...
dlls/ntdll/virtual.c
View file @
d082ea3e
...
...
@@ -2604,6 +2604,14 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
if
(
*
addr_ptr
&&
zero_bits
)
return
STATUS_INVALID_PARAMETER_4
;
#ifndef _WIN64
if
(
!
is_wow64
&&
(
alloc_type
&
AT_ROUND_TO_PAGE
))
{
*
addr_ptr
=
ROUND_ADDR
(
*
addr_ptr
,
page_mask
);
mask
=
page_mask
;
}
#endif
if
((
offset
.
u
.
LowPart
&
mask
)
||
(
*
addr_ptr
&&
((
UINT_PTR
)
*
addr_ptr
&
mask
)))
return
STATUS_MAPPED_ALIGNMENT
;
...
...
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