suyu/src
Lioncash 09a219d5b4 svc: Write out the complete MemoryInfo structure in QueryProcessMemory
In the previous change, the memory writing was moved into the service
function itself, however it still had a problem, in that the entire
MemoryInfo structure wasn't being written out, only the first 32 bytes
of it were being written out. We still need to write out the trailing
two reference count members and zero out the padding bits.

Not doing this can result in wrong behavior in userland code in the following
scenario:

MemoryInfo info;                 // Put on the stack, not quaranteed to be zeroed out.
svcQueryMemory(&info, ...);

if (info.device_refcount == ...) // Whoops, uninitialized read.

This can also cause the wrong thing to happen if the user code uses
std::memcmp to compare the struct, with another one (questionable, but
allowed), as the padding bits are not guaranteed to be a deterministic
value. Note that the kernel itself also fully zeroes out the structure
before writing it out including the padding bits.
2018-12-12 15:44:58 -05:00
..
audio_core core: Port all current usages of Event to Readable/WritableEvent 2018-11-29 08:45:41 -05:00
common Backport review comment from citra-emu/citra#4418 2018-12-07 16:21:18 +01:00
core svc: Write out the complete MemoryInfo structure in QueryProcessMemory 2018-12-12 15:44:58 -05:00
input_common Port #4141 from citra: Joystick hotplug support (#1275) 2018-09-10 21:29:59 -04:00
tests global: Use std::optional instead of boost::optional (#1578) 2018-10-30 00:03:25 -04:00
video_core Merge pull request #1740 from FernandoS27/shader_props 2018-12-10 12:43:43 -05:00
web_service compatdb: Use a seperate endpoint for testcase submission 2018-10-28 13:23:02 +01:00
yuzu Merge pull request #1819 from DarkLordZach/disable-addons 2018-12-10 21:52:19 -05:00
yuzu_cmd qt: Add Properties menu to game list right-click 2018-12-04 13:34:50 -05:00
.clang-format Remove special rules for Windows.h and library includes 2016-09-21 00:16:33 -07:00
CMakeLists.txt Port web_service from Citra 2018-10-02 15:30:48 +02:00