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_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_memory.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp index bcf3d0d2b..2cab74127 100644 --- a/src/core/hle/kernel/svc/svc_memory.cpp +++ b/src/core/hle/kernel/svc/svc_memory.cpp @@ -63,36 +63,13 @@ Result MapUnmapMemorySanityChecks(const KPageTable& manager, u64 dst_addr, u64 s R_THROW(ResultInvalidCurrentMemory); } - if (!manager.IsInsideAddressSpace(src_addr, size)) { + if (!manager.Contains(src_addr, size)) { LOG_ERROR(Kernel_SVC, "Source is not within the address space, addr=0x{:016X}, size=0x{:016X}", src_addr, size); R_THROW(ResultInvalidCurrentMemory); } - if (manager.IsOutsideStackRegion(dst_addr, size)) { - LOG_ERROR(Kernel_SVC, - "Destination is not within the stack region, addr=0x{:016X}, size=0x{:016X}", - dst_addr, size); - R_THROW(ResultInvalidMemoryRegion); - } - - if (manager.IsInsideHeapRegion(dst_addr, size)) { - LOG_ERROR(Kernel_SVC, - "Destination does not fit within the heap region, addr=0x{:016X}, " - "size=0x{:016X}", - dst_addr, size); - R_THROW(ResultInvalidMemoryRegion); - } - - if (manager.IsInsideAliasRegion(dst_addr, size)) { - LOG_ERROR(Kernel_SVC, - "Destination does not fit within the map region, addr=0x{:016X}, " - "size=0x{:016X}", - dst_addr, size); - R_THROW(ResultInvalidMemoryRegion); - } - R_SUCCEED(); } |