Alexandre Julliard : ntdll: Remove the no longer used VPROT_NOEXEC flag.
Alexandre Julliard
julliard at winehq.org
Fri Sep 8 15:03:21 CDT 2017
Module: wine
Branch: master
Commit: b2624ab99a12cc8748d959e15ebc449f68303d3a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b2624ab99a12cc8748d959e15ebc449f68303d3a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Sep 8 12:46:47 2017 +0200
ntdll: Remove the no longer used VPROT_NOEXEC flag.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/virtual.c | 8 +++-----
include/wine/server_protocol.h | 1 -
server/protocol.def | 1 -
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index f398fcc..8fb11e8 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -713,7 +713,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
*view_ret = view;
VIRTUAL_DEBUG_DUMP_VIEW( view );
- if (force_exec_prot && !(vprot & VPROT_NOEXEC) && (unix_prot & PROT_READ) && !(unix_prot & PROT_EXEC))
+ if (force_exec_prot && (unix_prot & PROT_READ) && !(unix_prot & PROT_EXEC))
{
TRACE( "forcing exec permission on %p-%p\n", base, (char *)base + size - 1 );
mprotect( base, size, unix_prot | PROT_EXEC );
@@ -797,8 +797,7 @@ static NTSTATUS get_vprot_flags( DWORD protect, unsigned int *vprot, BOOL image
*/
static inline int mprotect_exec( void *base, size_t size, int unix_prot, unsigned int view_protect )
{
- if (force_exec_prot && !(view_protect & VPROT_NOEXEC) &&
- (unix_prot & PROT_READ) && !(unix_prot & PROT_EXEC))
+ if (force_exec_prot && (unix_prot & PROT_READ) && !(unix_prot & PROT_EXEC))
{
TRACE( "forcing exec permission on %p-%p\n", base, (char *)base + size - 1 );
if (!mprotect( base, size, unix_prot | PROT_EXEC )) return 0;
@@ -1096,7 +1095,7 @@ static NTSTATUS map_file_into_view( struct file_view *view, int fd, size_t start
assert( start < view->size );
assert( start + size <= view->size );
- if (force_exec_prot && !(vprot & VPROT_NOEXEC) && (vprot & VPROT_READ))
+ if (force_exec_prot && (vprot & VPROT_READ))
{
TRACE( "forcing exec permission on mapping %p-%p\n",
(char *)view->base + start, (char *)view->base + start + size - 1 );
@@ -1972,7 +1971,6 @@ void VIRTUAL_SetForceExec( BOOL enable )
{
BYTE commit = view->mapping ? VPROT_COMMITTED : 0; /* file mappings are always accessible */
- if (view->protect & VPROT_NOEXEC) continue;
mprotect_range( view, view->base, view->size, commit, 0 );
}
}
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 932a25c..f54cd1b 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -2199,7 +2199,6 @@ struct create_mapping_reply
#define VPROT_IMAGE 0x0100
#define VPROT_SYSTEM 0x0200
#define VPROT_VALLOC 0x0400
-#define VPROT_NOEXEC 0x0800
diff --git a/server/protocol.def b/server/protocol.def
index 6a4d3fc..e3d5d42 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1711,7 +1711,6 @@ enum char_info_mode
#define VPROT_IMAGE 0x0100 /* mapping for an exe image */
#define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
#define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
-#define VPROT_NOEXEC 0x0800 /* don't force exec permission */
/* Open a mapping */
More information about the wine-cvs
mailing list