mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-11 02:51:10 +00:00
fix: let Wine write hooks into code FEX has translated Wine 11's wineserver writes another process's memory with process_vm_writev, which the kernel refuses on a page that is not writable. FEX's WoW64 layer keeps the pages it has translated read-only to catch self-modifying code and re-protects them right after a program unprotects them, so WriteProcessMemory and NtWriteVirtualMemory into ntdll failed with a partial copy and Ubisoft games stopped at "Error at hooking API NtProtectVirtualMemory". Wine only falls back to /proc/<pid>/mem on ENOSYS or EPERM. libblsession now completes a single-buffer write that wineserver was refused with EFAULT through /proc/<pid>/mem, the way Wine wrote before Wine 11. Other programs and every other error keep the kernel's answer. The iovecs are read with process_vm_readv, so a bad pointer still returns EFAULT, and offsets are 64-bit in the i386 build.