https://bugs.winehq.org/show_bug.cgi?id=37355
--- Comment #26 from Zebediah Figura z.figura12@gmail.com --- (In reply to Richard Yao from comment #25)
The problem is that there is no way to properly implement this on Linux since there is no way to simply map the memory of a different process if you are not inside the kernel. Since wine is no kernel module it can only use memory of different processes, when they explicitly create it as shared memory block. Sadly you can not declare a memory block as shared after it was allocated, so this does not help implementing this command.
It occurred to me that there is a simpler way of doing this on Linux. You just open /proc/$PID/mem, do lseek to the region that you want (after doing page alignment) and then call mmap (also after doing page alignment). The downside is that this requires root privileges, but on the bright side, you don't need to write a kernel module.
I think needing root privileges probably rules this approach out. Is there anything preventing the aforementioned approach using APCs from working?