From: Vibhav Pant vibhavp@gmail.com
If the file mapping flags have SEC_LARGE_PAGES enabled, ensure that the mapping is anonymous and the requested size is a multiple of the minimum large page size supported by the host platform. --- dlls/ntdll/unix/sync.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index e070233104b..3727ff28acb 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -2017,6 +2017,26 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
*handle = 0;
+ if (sec_flags & SEC_LARGE_PAGES) + { + SIZE_T min_size; + NTSTATUS status; + + if (file != NULL || size == NULL) + { + return STATUS_INVALID_PARAMETER; + } + + status = virtual_get_min_large_page_size( &min_size ); + if (status != STATUS_SUCCESS) + { + return status == STATUS_NOT_SUPPORTED ? STATUS_INVALID_PARAMETER : status; + } + if (size->QuadPart % min_size != 0) + { + return STATUS_INVALID_PARAMETER; + } + } switch (protect & 0xff) { case PAGE_READONLY: