From: Vibhav Pant <vibhavp(a)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 4b2d7c1ccbc..81931931d9c 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -2058,6 +2058,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: -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5769