yuzu-fork/src/core/hle
Lioncash d8deb39b83 svc: Handle memory writing explicitly within QueryProcessMemory
Moves the memory writes directly into QueryProcessMemory instead of
letting the wrapper function do it. It would be inaccurate to allow the
handler to do it because there's cases where memory shouldn't even be
written to. For example, if the given process handle is invalid.

HOWEVER, if the memory writing is within the wrapper, then we have no
control over if these memory writes occur, meaning in an error case, 68
bytes of memory randomly get trashed with zeroes, 64 of those being
written to wherever the memory info address points to, and the remaining
4 being written wherever the page info address points to.

One solution in this case would be to just conditionally check within
the handler itself, but this is kind of smelly, given the handler
shouldn't be performing conditional behavior itself, it's a behavior of
the managed function. In other words, if you remove the handler from the
equation entirely, does the function still retain its proper behavior?
In this case, no.

Now, we don't potentially trash memory from this function if an invalid
query is performed.
2018-12-12 15:43:31 -05:00
..
kernel svc: Handle memory writing explicitly within QueryProcessMemory 2018-12-12 15:43:31 -05:00
service Merge pull request #1819 from DarkLordZach/disable-addons 2018-12-10 21:52:19 -05:00
ipc.h kernel/errors: Remove now-unused, unnecessary, error codes 2018-10-24 14:58:37 -04:00
ipc_helpers.h hle_ipc: Add member function for querying the existence of a domain header 2018-10-29 23:28:04 -04:00
lock.cpp Fix build on macOS and linux 2018-01-13 22:38:52 +00:00
lock.h Use recursive_mutex instead of mutex to fix #2902 2017-08-29 20:39:55 +12:00
result.h file_sys/errors: Extract FS-related error codes to file_sys/errors.h 2018-11-16 00:13:50 -05:00