diff options
| author | 2018-05-01 16:28:54 -0400 | |
|---|---|---|
| committer | 2018-05-01 16:28:54 -0400 | |
| commit | 8262aeeac886f8b03cac5a5050580ac7ac77af4c (patch) | |
| tree | ed717539121142781394d5fcca23672c8906717c /src | |
| parent | GetSharedFontInOrderOfPriority (#381) (diff) | |
| parent | GPU: Don't write to invalid memory locations when handling ioctls that don't ... (diff) | |
| download | yuzu-8262aeeac886f8b03cac5a5050580ac7ac77af4c.tar.gz yuzu-8262aeeac886f8b03cac5a5050580ac7ac77af4c.tar.xz yuzu-8262aeeac886f8b03cac5a5050580ac7ac77af4c.zip | |
Merge pull request #429 from Subv/ioctl_corruption
GPU: Don't write to invalid memory locations when handling ioctls that don't have an output.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 3 |
2 files changed, 0 insertions, 5 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 36d7f837b..a7097bd23 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -39,7 +39,6 @@ u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 39 | IoctlInitalizeEx params{}; | 39 | IoctlInitalizeEx params{}; |
| 40 | std::memcpy(¶ms, input.data(), input.size()); | 40 | std::memcpy(¶ms, input.data(), input.size()); |
| 41 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size={:#X}", params.big_page_size); | 41 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size={:#X}", params.big_page_size); |
| 42 | std::memcpy(output.data(), ¶ms, output.size()); | ||
| 43 | return 0; | 42 | return 0; |
| 44 | } | 43 | } |
| 45 | 44 | ||
| @@ -135,7 +134,6 @@ u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 135 | std::memcpy(¶ms, input.data(), input.size()); | 134 | std::memcpy(¶ms, input.data(), input.size()); |
| 136 | NGLOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); | 135 | NGLOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); |
| 137 | channel = params.fd; | 136 | channel = params.fd; |
| 138 | std::memcpy(output.data(), ¶ms, output.size()); | ||
| 139 | return 0; | 137 | return 0; |
| 140 | } | 138 | } |
| 141 | 139 | ||
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 70625211e..9fee7d564 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |||
| @@ -49,7 +49,6 @@ u32 nvhost_gpu::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output | |||
| 49 | std::memcpy(¶ms, input.data(), input.size()); | 49 | std::memcpy(¶ms, input.data(), input.size()); |
| 50 | NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); | 50 | NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); |
| 51 | nvmap_fd = params.nvmap_fd; | 51 | nvmap_fd = params.nvmap_fd; |
| 52 | std::memcpy(output.data(), ¶ms, output.size()); | ||
| 53 | return 0; | 52 | return 0; |
| 54 | } | 53 | } |
| 55 | 54 | ||
| @@ -58,7 +57,6 @@ u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& out | |||
| 58 | IoctlClientData params{}; | 57 | IoctlClientData params{}; |
| 59 | std::memcpy(¶ms, input.data(), input.size()); | 58 | std::memcpy(¶ms, input.data(), input.size()); |
| 60 | user_data = params.data; | 59 | user_data = params.data; |
| 61 | std::memcpy(output.data(), ¶ms, output.size()); | ||
| 62 | return 0; | 60 | return 0; |
| 63 | } | 61 | } |
| 64 | 62 | ||
| @@ -91,7 +89,6 @@ u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>& | |||
| 91 | u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) { | 89 | u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) { |
| 92 | std::memcpy(&channel_priority, input.data(), input.size()); | 90 | std::memcpy(&channel_priority, input.data(), input.size()); |
| 93 | NGLOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); | 91 | NGLOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); |
| 94 | std::memcpy(output.data(), &channel_priority, output.size()); | ||
| 95 | return 0; | 92 | return 0; |
| 96 | } | 93 | } |
| 97 | 94 | ||