Reactos

[NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything.

For NT6+ appcompat setting return STATUS_NOT_IMPLEMENTED

+31
+5
ntoskrnl/include/internal/rtl.h
··· 34 34 _Out_ PUSHORT Position 35 35 ); 36 36 37 + _IRQL_requires_max_(APC_LEVEL) 38 + ULONG 39 + NTAPI 40 + RtlRosGetAppcompatVersion(VOID); 41 + 37 42 /* EOF */
+9
ntoskrnl/ps/query.c
··· 1902 1902 /* Only supported on x86 */ 1903 1903 #if defined (_X86_) 1904 1904 Ke386SetIOPL(); 1905 + #elif defined(_M_AMD64) 1906 + /* On x64 this function isn't implemented. 1907 + On Windows 2003 it returns success. 1908 + On Vista+ it returns STATUS_NOT_IMPLEMENTED. */ 1909 + if ((ExGetPreviousMode() != KernelMode) && 1910 + (RtlRosGetAppcompatVersion() > _WIN32_WINNT_WS03)) 1911 + { 1912 + Status = STATUS_NOT_IMPLEMENTED; 1913 + } 1905 1914 #else 1906 1915 Status = STATUS_NOT_IMPLEMENTED; 1907 1916 #endif
+17
sdk/lib/rtl/process.c
··· 493 493 /* Forward to kernel */ 494 494 return NtGetCurrentProcessorNumber(); 495 495 } 496 + 497 + _IRQL_requires_max_(APC_LEVEL) 498 + ULONG 499 + NTAPI 500 + RtlRosGetAppcompatVersion(VOID) 501 + { 502 + /* Get the current PEB */ 503 + PPEB Peb = RtlGetCurrentPeb(); 504 + if (Peb == NULL) 505 + { 506 + /* Default to Server 2003 */ 507 + return _WIN32_WINNT_WS03; 508 + } 509 + 510 + /* Calculate OS version from PEB fields */ 511 + return (Peb->OSMajorVersion << 8) | Peb->OSMinorVersion; 512 + }