1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00

PPU Loader Fix removing writablity permission for RSX/SPU writable segments

This commit is contained in:
Eladash 2022-05-03 21:08:56 +03:00 committed by Ivan
parent f9a62667cf
commit 63669000ab

View File

@ -1890,9 +1890,9 @@ bool ppu_load_exec(const ppu_exec_object& elf)
const u32 addr = static_cast<u32>(prog.p_vaddr);
const u32 size = static_cast<u32>(prog.p_memsz);
if (prog.p_type == 0x1u /* LOAD */ && prog.p_memsz && (prog.p_flags & 0x2) == 0u /* W */)
if (prog.p_type == 0x1u /* LOAD */ && prog.p_memsz && (prog.p_flags & 0x022000002) == 0u /* W */)
{
// Set memory protection to read-only when necessary
// Set memory protection to read-only when necessary (only if PPU-W, SPU-W, RSX-W are all disabled)
ensure(vm::page_protect(addr, utils::align(size, 0x1000), 0, 0, vm::page_writable));
}
}