mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTOS:MM] Fix PTE protection for executable CoW pages
Fixes Blender x64. See https://jira.reactos.org/browse/CORE-19761
This commit is contained in:
parent
52265ae007
commit
c0590f5de0
1 changed files with 6 additions and 1 deletions
|
@ -1509,7 +1509,12 @@ MmAlterViewAttributes(PMMSUPPORT AddressSpace,
|
|||
*/
|
||||
Page = MmGetPfnForProcess(Process, Address);
|
||||
|
||||
Protect = PAGE_READONLY;
|
||||
/* Choose protection based on what was requested */
|
||||
if (NewProtect == PAGE_EXECUTE_READWRITE)
|
||||
Protect = PAGE_EXECUTE_READ;
|
||||
else
|
||||
Protect = PAGE_READONLY;
|
||||
|
||||
if (IS_SWAP_FROM_SSE(Entry) || PFN_FROM_SSE(Entry) != Page)
|
||||
{
|
||||
Protect = NewProtect;
|
||||
|
|
Loading…
Reference in a new issue