From: Vibhav Pant vibhavp@gmail.com
If large pages are requested (SEC_LARGE_PAGES), return STATUS_INVALID_PARAMETER if: * If the backing file object (file) is not NULL. * The maximum size of the section is NULL. * Large pages are not supported by the host platform. * Large pages are supported, but the requested size is not a multiple of the minimum large page size. --- dlls/ntdll/unix/sync.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index e070233104b..4fca4cbcba3 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -2017,6 +2017,19 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
*handle = 0;
+ if (sec_flags & SEC_LARGE_PAGES) + { + SIZE_T min_size = user_shared_data->LargePageMinimum; + if (file != NULL || size == NULL) + { + return STATUS_INVALID_PARAMETER; + } + + if (min_size == 0 || size->QuadPart % min_size != 0) + { + return STATUS_INVALID_PARAMETER; + } + } switch (protect & 0xff) { case PAGE_READONLY: