On 7/26/22 16:08, Rémi Bernon (@rbernon) wrote:
On Tue Jul 26 18:17:33 2022 +0000, **** wrote:
Zebediah Figura replied on the mailing list: ``` On 7/26/22 02:30, Rémi Bernon wrote:
From: Rémi Bernon <rbernon(a)codeweavers.com>
--- dlls/dinput/tests/joystick8.c | 11 +++++------ dlls/win32u/rawinput.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-)
Wait, why does this make a difference? _______________________________________________ wine-gitlab mailing list -- wine-gitlab(a)winehq.org To unsubscribe send an email to wine-gitlab-leave(a)winehq.org ``` Because the buffer is checked to be writable by `NtDeviceIoControlFile` and `check_write_access`, using the virtual memory protection info. With unix-allocated memory, its fail and returns invalid buffer status.
Ah, thanks for the clarification. This seems like something that's rather non-obvious to the reader; I think it would be a good idea to add a comment in the code. It'd probably be nice if we could have a backdoor into server_ioctl_file(), to avoid allocating a whole page like this, but maybe it's not worthwhile...