Alexandre Julliard : ntdll: Remove special case for setting permissions on stack pages.
Alexandre Julliard
julliard at winehq.org
Thu Jun 17 15:38:06 CDT 2021
Module: wine
Branch: master
Commit: e91d19a58ada036c96ff4431346b98ccc4717381
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e91d19a58ada036c96ff4431346b98ccc4717381
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 17 10:11:53 2021 +0200
ntdll: Remove special case for setting permissions on stack pages.
We are running on the kernel stack at this point.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/virtual.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index c268b66f50c..0a4004d2db9 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1675,21 +1675,7 @@ static BOOL set_vprot( struct file_view *view, void *base, size_t size, BYTE vpr
mprotect_range( base, size, 0, 0 );
return TRUE;
}
-
- /* if setting stack guard pages, store the permissions first, as the guard may be
- * triggered at any point after mprotect and change the permissions again */
- if ((vprot & VPROT_GUARD) &&
- (base >= NtCurrentTeb()->DeallocationStack) &&
- (base < NtCurrentTeb()->Tib.StackBase))
- {
- set_page_vprot( base, size, vprot );
- mprotect( base, size, unix_prot );
- return TRUE;
- }
-
- if (mprotect_exec( base, size, unix_prot )) /* FIXME: last error */
- return FALSE;
-
+ if (mprotect_exec( base, size, unix_prot )) return FALSE;
set_page_vprot( base, size, vprot );
return TRUE;
}
More information about the wine-cvs
mailing list