On Wed Jan 31 17:53:14 2024 +0000, Jinoh Kang wrote:
Even on the unix side mixing Nt mappings with native mmap on their fds
I think we're doing exactly this with KUSD; see `virtual_map_user_shared_data`.
So, that would essentially be something like?
```suggestion:-3+3 if (!(status = NtOpenSection( &handle, SECTION_MAP_READ, &attr ))) { int fd;
if (!(status = wine_server_handle_to_fd( handle, 0, &fd, NULL ))) { if ((ptr = mmap( NULL, size, PROT_READ, MAP_SHARED, fd, 0 )) == MAP_FAILED) status = STATUS_UNSUCCESSFUL; close( fd ); }
NtClose( handle ); } ```
Seems to be simple enough to me.