diff options
author | Liam <byteslice@airmail.cc> | 2023-07-15 03:58:20 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-07-15 04:33:10 +0200 |
commit | 474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd (patch) | |
tree | 288901313abc231a71faf3a95b24eabbca3a04d0 /src/core/hle/kernel/svc/svc_process_memory.cpp | |
parent | k_process: PageTable -> GetPageTable (diff) | |
download | yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.tar yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.tar.gz yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.tar.bz2 yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.tar.lz yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.tar.xz yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.tar.zst yuzu-474db2d8dafebffc9a16dd3c9d1d21a63fdbeddd.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc/svc_process_memory.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp index ee11e9639..07cd48175 100644 --- a/src/core/hle/kernel/svc/svc_process_memory.cpp +++ b/src/core/hle/kernel/svc/svc_process_memory.cpp @@ -179,7 +179,7 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst } auto& page_table = process->GetPageTable(); - if (!page_table.IsInsideAddressSpace(src_address, size)) { + if (!page_table.Contains(src_address, size)) { LOG_ERROR(Kernel_SVC, "Source address range is not within the address space (src_address=0x{:016X}, " "size=0x{:016X}).", @@ -187,14 +187,6 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst R_THROW(ResultInvalidCurrentMemory); } - if (!page_table.IsInsideASLRRegion(dst_address, size)) { - LOG_ERROR(Kernel_SVC, - "Destination address range is not within the ASLR region (dst_address=0x{:016X}, " - "size=0x{:016X}).", - dst_address, size); - R_THROW(ResultInvalidMemoryRegion); - } - R_RETURN(page_table.MapCodeMemory(dst_address, src_address, size)); } @@ -247,7 +239,7 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d } auto& page_table = process->GetPageTable(); - if (!page_table.IsInsideAddressSpace(src_address, size)) { + if (!page_table.Contains(src_address, size)) { LOG_ERROR(Kernel_SVC, "Source address range is not within the address space (src_address=0x{:016X}, " "size=0x{:016X}).", @@ -255,14 +247,6 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d R_THROW(ResultInvalidCurrentMemory); } - if (!page_table.IsInsideASLRRegion(dst_address, size)) { - LOG_ERROR(Kernel_SVC, - "Destination address range is not within the ASLR region (dst_address=0x{:016X}, " - "size=0x{:016X}).", - dst_address, size); - R_THROW(ResultInvalidMemoryRegion); - } - R_RETURN(page_table.UnmapCodeMemory(dst_address, src_address, size, KPageTable::ICacheInvalidationStrategy::InvalidateAll)); } |