diff options
author | Liam <byteslice@airmail.cc> | 2023-12-26 05:21:08 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-26 05:30:56 +0100 |
commit | ddda76f9b0d16e8a6fbc92db9e26f25843b647ed (patch) | |
tree | 3fd209d66b8503ca7f0cf6d15c5c065179c66076 /src/core/hle/kernel/k_process.cpp | |
parent | Merge pull request #12394 from liamwhite/per-process-memory (diff) | |
download | yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.tar yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.tar.gz yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.tar.bz2 yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.tar.lz yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.tar.xz yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.tar.zst yuzu-ddda76f9b0d16e8a6fbc92db9e26f25843b647ed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_process.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index d6869c228..068e71dff 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -1237,8 +1237,10 @@ void KProcess::LoadModule(CodeSet code_set, KProcessAddress base_addr) { auto& buffer = m_kernel.System().DeviceMemory().buffer; const auto& code = code_set.CodeSegment(); const auto& patch = code_set.PatchSegment(); - buffer.Protect(GetInteger(base_addr + code.addr), code.size, true, true, true); - buffer.Protect(GetInteger(base_addr + patch.addr), patch.size, true, true, true); + buffer.Protect(GetInteger(base_addr + code.addr), code.size, + Common::MemoryPermission::Read | Common::MemoryPermission::Execute); + buffer.Protect(GetInteger(base_addr + patch.addr), patch.size, + Common::MemoryPermission::Read | Common::MemoryPermission::Execute); ReprotectSegment(code_set.PatchSegment(), Svc::MemoryPermission::None); } #endif |