ntdll: a simple implementation of cross-process NtAllocateVirtualMemory

Alexandre Julliard julliard at winehq.org
Fri Jun 2 13:33:08 CDT 2006

tkho at ucla.edu writes:

> I ran across the need to do memory allocations across processes and came upon
> Alexander Yaworsky's patch at
> http://www.winehq.org/pipermail/wine-devel/2004-September/029953.html and took
> a different approach. Instead of waiting for the target process to check a fd,
> I changed the implementation to use ptrace to interrupt the target process and
> execute code in kernel32 that does an mmap/munmap.

The problem here is that you don't control at what point you interrupt
the process, so you can't do anything in it except system calls, and
that won't be enough. Another problem is that you make the server wait
on the client to execute the code, and that's a big no-no, the server
can't trust the client.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list