From: Jinoh Kang jinoh.kang.kr@gmail.com
--- dlls/ntdll/ntdll.spec | 4 +- dlls/ntdll/ntsyscalls.h | 592 ++++++++++++++-------------- dlls/ntdll/signal_arm64ec.c | 5 + dlls/ntdll/tests/om.c | 58 +++ dlls/ntdll/unix/sync.c | 20 + dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/wow64/sync.c | 11 + include/winternl.h | 1 + 8 files changed, 395 insertions(+), 298 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 2c5a69a410c..1580df9f188 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -253,7 +253,7 @@ # @ stub NtLockProductActivationKeys # @ stub NtLockRegistryKey @ stdcall -syscall NtLockVirtualMemory(long ptr ptr long) -# @ stub NtMakePermanentObject +@ stdcall -syscall NtMakePermanentObject(long) @ stdcall -syscall NtMakeTemporaryObject(long) # @ stub NtMapUserPhysicalPages # @ stub NtMapUserPhysicalPagesScatter @@ -1301,7 +1301,7 @@ # @ stub ZwLockProductActivationKeys # @ stub ZwLockRegistryKey @ stdcall -private -syscall ZwLockVirtualMemory(long ptr ptr long) NtLockVirtualMemory -# @ stub ZwMakePermanentObject +@ stdcall -private -syscall ZwMakePermanentObject(long) NtMakePermanentObject @ stdcall -private -syscall ZwMakeTemporaryObject(long) NtMakeTemporaryObject # @ stub ZwMapUserPhysicalPages # @ stub ZwMapUserPhysicalPagesScatter diff --git a/dlls/ntdll/ntsyscalls.h b/dlls/ntdll/ntsyscalls.h index 10813ee977d..53045c5f6be 100644 --- a/dlls/ntdll/ntsyscalls.h +++ b/dlls/ntdll/ntsyscalls.h @@ -91,156 +91,157 @@ SYSCALL_ENTRY( 0x0057, NtLoadKeyEx, 32 ) \ SYSCALL_ENTRY( 0x0058, NtLockFile, 40 ) \ SYSCALL_ENTRY( 0x0059, NtLockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x005a, NtMakeTemporaryObject, 4 ) \ - SYSCALL_ENTRY( 0x005b, NtMapViewOfSection, 40 ) \ - SYSCALL_ENTRY( 0x005c, NtMapViewOfSectionEx, 36 ) \ - SYSCALL_ENTRY( 0x005d, NtNotifyChangeDirectoryFile, 36 ) \ - SYSCALL_ENTRY( 0x005e, NtNotifyChangeKey, 40 ) \ - SYSCALL_ENTRY( 0x005f, NtNotifyChangeMultipleKeys, 48 ) \ - SYSCALL_ENTRY( 0x0060, NtOpenDirectoryObject, 12 ) \ - SYSCALL_ENTRY( 0x0061, NtOpenEvent, 12 ) \ - SYSCALL_ENTRY( 0x0062, NtOpenFile, 24 ) \ - SYSCALL_ENTRY( 0x0063, NtOpenIoCompletion, 12 ) \ - SYSCALL_ENTRY( 0x0064, NtOpenJobObject, 12 ) \ - SYSCALL_ENTRY( 0x0065, NtOpenKey, 12 ) \ - SYSCALL_ENTRY( 0x0066, NtOpenKeyEx, 16 ) \ - SYSCALL_ENTRY( 0x0067, NtOpenKeyTransacted, 16 ) \ - SYSCALL_ENTRY( 0x0068, NtOpenKeyTransactedEx, 20 ) \ - SYSCALL_ENTRY( 0x0069, NtOpenKeyedEvent, 12 ) \ - SYSCALL_ENTRY( 0x006a, NtOpenMutant, 12 ) \ - SYSCALL_ENTRY( 0x006b, NtOpenProcess, 16 ) \ - SYSCALL_ENTRY( 0x006c, NtOpenProcessToken, 12 ) \ - SYSCALL_ENTRY( 0x006d, NtOpenProcessTokenEx, 16 ) \ - SYSCALL_ENTRY( 0x006e, NtOpenSection, 12 ) \ - SYSCALL_ENTRY( 0x006f, NtOpenSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x0070, NtOpenSymbolicLinkObject, 12 ) \ - SYSCALL_ENTRY( 0x0071, NtOpenThread, 16 ) \ - SYSCALL_ENTRY( 0x0072, NtOpenThreadToken, 16 ) \ - SYSCALL_ENTRY( 0x0073, NtOpenThreadTokenEx, 20 ) \ - SYSCALL_ENTRY( 0x0074, NtOpenTimer, 12 ) \ - SYSCALL_ENTRY( 0x0075, NtPowerInformation, 20 ) \ - SYSCALL_ENTRY( 0x0076, NtPrivilegeCheck, 12 ) \ - SYSCALL_ENTRY( 0x0077, NtProtectVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x0078, NtPulseEvent, 8 ) \ - SYSCALL_ENTRY( 0x0079, NtQueryAttributesFile, 8 ) \ - SYSCALL_ENTRY( 0x007a, NtQueryDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x007b, NtQueryDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x007c, NtQueryDirectoryFile, 44 ) \ - SYSCALL_ENTRY( 0x007d, NtQueryDirectoryObject, 28 ) \ - SYSCALL_ENTRY( 0x007e, NtQueryEaFile, 36 ) \ - SYSCALL_ENTRY( 0x007f, NtQueryEvent, 20 ) \ - SYSCALL_ENTRY( 0x0080, NtQueryFullAttributesFile, 8 ) \ - SYSCALL_ENTRY( 0x0081, NtQueryInformationAtom, 20 ) \ - SYSCALL_ENTRY( 0x0082, NtQueryInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x0083, NtQueryInformationJobObject, 20 ) \ - SYSCALL_ENTRY( 0x0084, NtQueryInformationProcess, 20 ) \ - SYSCALL_ENTRY( 0x0085, NtQueryInformationThread, 20 ) \ - SYSCALL_ENTRY( 0x0086, NtQueryInformationToken, 20 ) \ - SYSCALL_ENTRY( 0x0087, NtQueryInstallUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x0088, NtQueryIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x0089, NtQueryKey, 20 ) \ - SYSCALL_ENTRY( 0x008a, NtQueryLicenseValue, 20 ) \ - SYSCALL_ENTRY( 0x008b, NtQueryMultipleValueKey, 24 ) \ - SYSCALL_ENTRY( 0x008c, NtQueryMutant, 20 ) \ - SYSCALL_ENTRY( 0x008d, NtQueryObject, 20 ) \ - SYSCALL_ENTRY( 0x008e, NtQueryPerformanceCounter, 8 ) \ - SYSCALL_ENTRY( 0x008f, NtQuerySection, 20 ) \ - SYSCALL_ENTRY( 0x0090, NtQuerySecurityObject, 20 ) \ - SYSCALL_ENTRY( 0x0091, NtQuerySemaphore, 20 ) \ - SYSCALL_ENTRY( 0x0092, NtQuerySymbolicLinkObject, 12 ) \ - SYSCALL_ENTRY( 0x0093, NtQuerySystemEnvironmentValue, 16 ) \ - SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValueEx, 20 ) \ - SYSCALL_ENTRY( 0x0095, NtQuerySystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x0096, NtQuerySystemInformationEx, 24 ) \ - SYSCALL_ENTRY( 0x0097, NtQuerySystemTime, 4 ) \ - SYSCALL_ENTRY( 0x0098, NtQueryTimer, 20 ) \ - SYSCALL_ENTRY( 0x0099, NtQueryTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x009a, NtQueryValueKey, 24 ) \ - SYSCALL_ENTRY( 0x009b, NtQueryVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x009c, NtQueryVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x009d, NtQueueApcThread, 20 ) \ - SYSCALL_ENTRY( 0x009e, NtRaiseException, 12 ) \ - SYSCALL_ENTRY( 0x009f, NtRaiseHardError, 24 ) \ - SYSCALL_ENTRY( 0x00a0, NtReadFile, 36 ) \ - SYSCALL_ENTRY( 0x00a1, NtReadFileScatter, 36 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00a3, NtRegisterThreadTerminatePort, 4 ) \ - SYSCALL_ENTRY( 0x00a4, NtReleaseKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00a5, NtReleaseMutant, 8 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x00a7, NtRemoveIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletionEx, 24 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveProcessDebug, 8 ) \ - SYSCALL_ENTRY( 0x00aa, NtRenameKey, 8 ) \ - SYSCALL_ENTRY( 0x00ab, NtReplaceKey, 12 ) \ - SYSCALL_ENTRY( 0x00ac, NtReplyWaitReceivePort, 16 ) \ - SYSCALL_ENTRY( 0x00ad, NtRequestWaitReplyPort, 12 ) \ - SYSCALL_ENTRY( 0x00ae, NtResetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00af, NtResetWriteWatch, 12 ) \ - SYSCALL_ENTRY( 0x00b0, NtRestoreKey, 12 ) \ - SYSCALL_ENTRY( 0x00b1, NtResumeProcess, 4 ) \ - SYSCALL_ENTRY( 0x00b2, NtResumeThread, 8 ) \ - SYSCALL_ENTRY( 0x00b3, NtRollbackTransaction, 8 ) \ - SYSCALL_ENTRY( 0x00b4, NtSaveKey, 8 ) \ - SYSCALL_ENTRY( 0x00b5, NtSecureConnectPort, 36 ) \ - SYSCALL_ENTRY( 0x00b6, NtSetContextThread, 8 ) \ - SYSCALL_ENTRY( 0x00b7, NtSetDebugFilterState, 12 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetEaFile, 16 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetInformationDebugObject, 20 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationKey, 16 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationObject, 16 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationProcess, 16 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationThread, 16 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationToken, 16 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetIntervalProfile, 8 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetLdtEntries, 24 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetSecurityObject, 12 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetSystemInformation, 12 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSystemTime, 8 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetThreadExecutionState, 8 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetTimer, 28 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetValueKey, 24 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00d0, NtShutdownSystem, 4 ) \ - SYSCALL_ENTRY( 0x00d1, NtSignalAndWaitForSingleObject, 16 ) \ - SYSCALL_ENTRY( 0x00d2, NtSuspendProcess, 4 ) \ - SYSCALL_ENTRY( 0x00d3, NtSuspendThread, 8 ) \ - SYSCALL_ENTRY( 0x00d4, NtSystemDebugControl, 24 ) \ - SYSCALL_ENTRY( 0x00d5, NtTerminateJobObject, 8 ) \ - SYSCALL_ENTRY( 0x00d6, NtTerminateProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateThread, 8 ) \ - SYSCALL_ENTRY( 0x00d8, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00d9, NtTraceControl, 24 ) \ - SYSCALL_ENTRY( 0x00da, NtUnloadDriver, 4 ) \ - SYSCALL_ENTRY( 0x00db, NtUnloadKey, 4 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnlockFile, 20 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnlockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x00de, NtUnmapViewOfSection, 8 ) \ - SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSectionEx, 12 ) \ - SYSCALL_ENTRY( 0x00e0, NtWaitForAlertByThreadId, 8 ) \ - SYSCALL_ENTRY( 0x00e1, NtWaitForDebugEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForMultipleObjects, 20 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForSingleObject, 12 ) \ - SYSCALL_ENTRY( 0x00e5, NtWow64AllocateVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00e6, NtWow64GetNativeSystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x00e7, NtWow64IsProcessorFeaturePresent, 4 ) \ - SYSCALL_ENTRY( 0x00e8, NtWow64ReadVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00e9, NtWow64WriteVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00ea, NtWriteFile, 36 ) \ - SYSCALL_ENTRY( 0x00eb, NtWriteFileGather, 36 ) \ - SYSCALL_ENTRY( 0x00ec, NtWriteVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00ed, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00ee, wine_nt_to_unix_file_name, 16 ) \ - SYSCALL_ENTRY( 0x00ef, wine_unix_to_nt_file_name, 12 ) + SYSCALL_ENTRY( 0x005a, NtMakePermanentObject, 4 ) \ + SYSCALL_ENTRY( 0x005b, NtMakeTemporaryObject, 4 ) \ + SYSCALL_ENTRY( 0x005c, NtMapViewOfSection, 40 ) \ + SYSCALL_ENTRY( 0x005d, NtMapViewOfSectionEx, 36 ) \ + SYSCALL_ENTRY( 0x005e, NtNotifyChangeDirectoryFile, 36 ) \ + SYSCALL_ENTRY( 0x005f, NtNotifyChangeKey, 40 ) \ + SYSCALL_ENTRY( 0x0060, NtNotifyChangeMultipleKeys, 48 ) \ + SYSCALL_ENTRY( 0x0061, NtOpenDirectoryObject, 12 ) \ + SYSCALL_ENTRY( 0x0062, NtOpenEvent, 12 ) \ + SYSCALL_ENTRY( 0x0063, NtOpenFile, 24 ) \ + SYSCALL_ENTRY( 0x0064, NtOpenIoCompletion, 12 ) \ + SYSCALL_ENTRY( 0x0065, NtOpenJobObject, 12 ) \ + SYSCALL_ENTRY( 0x0066, NtOpenKey, 12 ) \ + SYSCALL_ENTRY( 0x0067, NtOpenKeyEx, 16 ) \ + SYSCALL_ENTRY( 0x0068, NtOpenKeyTransacted, 16 ) \ + SYSCALL_ENTRY( 0x0069, NtOpenKeyTransactedEx, 20 ) \ + SYSCALL_ENTRY( 0x006a, NtOpenKeyedEvent, 12 ) \ + SYSCALL_ENTRY( 0x006b, NtOpenMutant, 12 ) \ + SYSCALL_ENTRY( 0x006c, NtOpenProcess, 16 ) \ + SYSCALL_ENTRY( 0x006d, NtOpenProcessToken, 12 ) \ + SYSCALL_ENTRY( 0x006e, NtOpenProcessTokenEx, 16 ) \ + SYSCALL_ENTRY( 0x006f, NtOpenSection, 12 ) \ + SYSCALL_ENTRY( 0x0070, NtOpenSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x0071, NtOpenSymbolicLinkObject, 12 ) \ + SYSCALL_ENTRY( 0x0072, NtOpenThread, 16 ) \ + SYSCALL_ENTRY( 0x0073, NtOpenThreadToken, 16 ) \ + SYSCALL_ENTRY( 0x0074, NtOpenThreadTokenEx, 20 ) \ + SYSCALL_ENTRY( 0x0075, NtOpenTimer, 12 ) \ + SYSCALL_ENTRY( 0x0076, NtPowerInformation, 20 ) \ + SYSCALL_ENTRY( 0x0077, NtPrivilegeCheck, 12 ) \ + SYSCALL_ENTRY( 0x0078, NtProtectVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x0079, NtPulseEvent, 8 ) \ + SYSCALL_ENTRY( 0x007a, NtQueryAttributesFile, 8 ) \ + SYSCALL_ENTRY( 0x007b, NtQueryDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x007c, NtQueryDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x007d, NtQueryDirectoryFile, 44 ) \ + SYSCALL_ENTRY( 0x007e, NtQueryDirectoryObject, 28 ) \ + SYSCALL_ENTRY( 0x007f, NtQueryEaFile, 36 ) \ + SYSCALL_ENTRY( 0x0080, NtQueryEvent, 20 ) \ + SYSCALL_ENTRY( 0x0081, NtQueryFullAttributesFile, 8 ) \ + SYSCALL_ENTRY( 0x0082, NtQueryInformationAtom, 20 ) \ + SYSCALL_ENTRY( 0x0083, NtQueryInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x0084, NtQueryInformationJobObject, 20 ) \ + SYSCALL_ENTRY( 0x0085, NtQueryInformationProcess, 20 ) \ + SYSCALL_ENTRY( 0x0086, NtQueryInformationThread, 20 ) \ + SYSCALL_ENTRY( 0x0087, NtQueryInformationToken, 20 ) \ + SYSCALL_ENTRY( 0x0088, NtQueryInstallUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x0089, NtQueryIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x008a, NtQueryKey, 20 ) \ + SYSCALL_ENTRY( 0x008b, NtQueryLicenseValue, 20 ) \ + SYSCALL_ENTRY( 0x008c, NtQueryMultipleValueKey, 24 ) \ + SYSCALL_ENTRY( 0x008d, NtQueryMutant, 20 ) \ + SYSCALL_ENTRY( 0x008e, NtQueryObject, 20 ) \ + SYSCALL_ENTRY( 0x008f, NtQueryPerformanceCounter, 8 ) \ + SYSCALL_ENTRY( 0x0090, NtQuerySection, 20 ) \ + SYSCALL_ENTRY( 0x0091, NtQuerySecurityObject, 20 ) \ + SYSCALL_ENTRY( 0x0092, NtQuerySemaphore, 20 ) \ + SYSCALL_ENTRY( 0x0093, NtQuerySymbolicLinkObject, 12 ) \ + SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValue, 16 ) \ + SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValueEx, 20 ) \ + SYSCALL_ENTRY( 0x0096, NtQuerySystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x0097, NtQuerySystemInformationEx, 24 ) \ + SYSCALL_ENTRY( 0x0098, NtQuerySystemTime, 4 ) \ + SYSCALL_ENTRY( 0x0099, NtQueryTimer, 20 ) \ + SYSCALL_ENTRY( 0x009a, NtQueryTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x009b, NtQueryValueKey, 24 ) \ + SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 20 ) \ + SYSCALL_ENTRY( 0x009f, NtRaiseException, 12 ) \ + SYSCALL_ENTRY( 0x00a0, NtRaiseHardError, 24 ) \ + SYSCALL_ENTRY( 0x00a1, NtReadFile, 36 ) \ + SYSCALL_ENTRY( 0x00a2, NtReadFileScatter, 36 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00a4, NtRegisterThreadTerminatePort, 4 ) \ + SYSCALL_ENTRY( 0x00a5, NtReleaseKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00a6, NtReleaseMutant, 8 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletionEx, 24 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveProcessDebug, 8 ) \ + SYSCALL_ENTRY( 0x00ab, NtRenameKey, 8 ) \ + SYSCALL_ENTRY( 0x00ac, NtReplaceKey, 12 ) \ + SYSCALL_ENTRY( 0x00ad, NtReplyWaitReceivePort, 16 ) \ + SYSCALL_ENTRY( 0x00ae, NtRequestWaitReplyPort, 12 ) \ + SYSCALL_ENTRY( 0x00af, NtResetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00b0, NtResetWriteWatch, 12 ) \ + SYSCALL_ENTRY( 0x00b1, NtRestoreKey, 12 ) \ + SYSCALL_ENTRY( 0x00b2, NtResumeProcess, 4 ) \ + SYSCALL_ENTRY( 0x00b3, NtResumeThread, 8 ) \ + SYSCALL_ENTRY( 0x00b4, NtRollbackTransaction, 8 ) \ + SYSCALL_ENTRY( 0x00b5, NtSaveKey, 8 ) \ + SYSCALL_ENTRY( 0x00b6, NtSecureConnectPort, 36 ) \ + SYSCALL_ENTRY( 0x00b7, NtSetContextThread, 8 ) \ + SYSCALL_ENTRY( 0x00b8, NtSetDebugFilterState, 12 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetEaFile, 16 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetInformationDebugObject, 20 ) \ + SYSCALL_ENTRY( 0x00be, NtSetInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationKey, 16 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationObject, 16 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationProcess, 16 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationThread, 16 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationToken, 16 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetIntervalProfile, 8 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetLdtEntries, 24 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetSecurityObject, 12 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetSystemInformation, 12 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSystemTime, 8 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetThreadExecutionState, 8 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetTimer, 28 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetValueKey, 24 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00d1, NtShutdownSystem, 4 ) \ + SYSCALL_ENTRY( 0x00d2, NtSignalAndWaitForSingleObject, 16 ) \ + SYSCALL_ENTRY( 0x00d3, NtSuspendProcess, 4 ) \ + SYSCALL_ENTRY( 0x00d4, NtSuspendThread, 8 ) \ + SYSCALL_ENTRY( 0x00d5, NtSystemDebugControl, 24 ) \ + SYSCALL_ENTRY( 0x00d6, NtTerminateJobObject, 8 ) \ + SYSCALL_ENTRY( 0x00d7, NtTerminateProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateThread, 8 ) \ + SYSCALL_ENTRY( 0x00d9, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00da, NtTraceControl, 24 ) \ + SYSCALL_ENTRY( 0x00db, NtUnloadDriver, 4 ) \ + SYSCALL_ENTRY( 0x00dc, NtUnloadKey, 4 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnlockFile, 20 ) \ + SYSCALL_ENTRY( 0x00de, NtUnlockVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSection, 8 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSectionEx, 12 ) \ + SYSCALL_ENTRY( 0x00e1, NtWaitForAlertByThreadId, 8 ) \ + SYSCALL_ENTRY( 0x00e2, NtWaitForDebugEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForMultipleObjects, 20 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForSingleObject, 12 ) \ + SYSCALL_ENTRY( 0x00e6, NtWow64AllocateVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00e7, NtWow64GetNativeSystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x00e8, NtWow64IsProcessorFeaturePresent, 4 ) \ + SYSCALL_ENTRY( 0x00e9, NtWow64ReadVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00ea, NtWow64WriteVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00eb, NtWriteFile, 36 ) \ + SYSCALL_ENTRY( 0x00ec, NtWriteFileGather, 36 ) \ + SYSCALL_ENTRY( 0x00ed, NtWriteVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00ee, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00ef, wine_nt_to_unix_file_name, 16 ) \ + SYSCALL_ENTRY( 0x00f0, wine_unix_to_nt_file_name, 12 )
#define ALL_SYSCALLS64 \ SYSCALL_ENTRY( 0x0000, NtAcceptConnectPort, 48 ) \ @@ -333,148 +334,149 @@ SYSCALL_ENTRY( 0x0057, NtLoadKeyEx, 64 ) \ SYSCALL_ENTRY( 0x0058, NtLockFile, 80 ) \ SYSCALL_ENTRY( 0x0059, NtLockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x005a, NtMakeTemporaryObject, 8 ) \ - SYSCALL_ENTRY( 0x005b, NtMapViewOfSection, 80 ) \ - SYSCALL_ENTRY( 0x005c, NtMapViewOfSectionEx, 72 ) \ - SYSCALL_ENTRY( 0x005d, NtNotifyChangeDirectoryFile, 72 ) \ - SYSCALL_ENTRY( 0x005e, NtNotifyChangeKey, 80 ) \ - SYSCALL_ENTRY( 0x005f, NtNotifyChangeMultipleKeys, 96 ) \ - SYSCALL_ENTRY( 0x0060, NtOpenDirectoryObject, 24 ) \ - SYSCALL_ENTRY( 0x0061, NtOpenEvent, 24 ) \ - SYSCALL_ENTRY( 0x0062, NtOpenFile, 48 ) \ - SYSCALL_ENTRY( 0x0063, NtOpenIoCompletion, 24 ) \ - SYSCALL_ENTRY( 0x0064, NtOpenJobObject, 24 ) \ - SYSCALL_ENTRY( 0x0065, NtOpenKey, 24 ) \ - SYSCALL_ENTRY( 0x0066, NtOpenKeyEx, 32 ) \ - SYSCALL_ENTRY( 0x0067, NtOpenKeyTransacted, 32 ) \ - SYSCALL_ENTRY( 0x0068, NtOpenKeyTransactedEx, 40 ) \ - SYSCALL_ENTRY( 0x0069, NtOpenKeyedEvent, 24 ) \ - SYSCALL_ENTRY( 0x006a, NtOpenMutant, 24 ) \ - SYSCALL_ENTRY( 0x006b, NtOpenProcess, 32 ) \ - SYSCALL_ENTRY( 0x006c, NtOpenProcessToken, 24 ) \ - SYSCALL_ENTRY( 0x006d, NtOpenProcessTokenEx, 32 ) \ - SYSCALL_ENTRY( 0x006e, NtOpenSection, 24 ) \ - SYSCALL_ENTRY( 0x006f, NtOpenSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x0070, NtOpenSymbolicLinkObject, 24 ) \ - SYSCALL_ENTRY( 0x0071, NtOpenThread, 32 ) \ - SYSCALL_ENTRY( 0x0072, NtOpenThreadToken, 32 ) \ - SYSCALL_ENTRY( 0x0073, NtOpenThreadTokenEx, 40 ) \ - SYSCALL_ENTRY( 0x0074, NtOpenTimer, 24 ) \ - SYSCALL_ENTRY( 0x0075, NtPowerInformation, 40 ) \ - SYSCALL_ENTRY( 0x0076, NtPrivilegeCheck, 24 ) \ - SYSCALL_ENTRY( 0x0077, NtProtectVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x0078, NtPulseEvent, 16 ) \ - SYSCALL_ENTRY( 0x0079, NtQueryAttributesFile, 16 ) \ - SYSCALL_ENTRY( 0x007a, NtQueryDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x007b, NtQueryDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x007c, NtQueryDirectoryFile, 88 ) \ - SYSCALL_ENTRY( 0x007d, NtQueryDirectoryObject, 56 ) \ - SYSCALL_ENTRY( 0x007e, NtQueryEaFile, 72 ) \ - SYSCALL_ENTRY( 0x007f, NtQueryEvent, 40 ) \ - SYSCALL_ENTRY( 0x0080, NtQueryFullAttributesFile, 16 ) \ - SYSCALL_ENTRY( 0x0081, NtQueryInformationAtom, 40 ) \ - SYSCALL_ENTRY( 0x0082, NtQueryInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x0083, NtQueryInformationJobObject, 40 ) \ - SYSCALL_ENTRY( 0x0084, NtQueryInformationProcess, 40 ) \ - SYSCALL_ENTRY( 0x0085, NtQueryInformationThread, 40 ) \ - SYSCALL_ENTRY( 0x0086, NtQueryInformationToken, 40 ) \ - SYSCALL_ENTRY( 0x0087, NtQueryInstallUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x0088, NtQueryIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x0089, NtQueryKey, 40 ) \ - SYSCALL_ENTRY( 0x008a, NtQueryLicenseValue, 40 ) \ - SYSCALL_ENTRY( 0x008b, NtQueryMultipleValueKey, 48 ) \ - SYSCALL_ENTRY( 0x008c, NtQueryMutant, 40 ) \ - SYSCALL_ENTRY( 0x008d, NtQueryObject, 40 ) \ - SYSCALL_ENTRY( 0x008e, NtQueryPerformanceCounter, 16 ) \ - SYSCALL_ENTRY( 0x008f, NtQuerySection, 40 ) \ - SYSCALL_ENTRY( 0x0090, NtQuerySecurityObject, 40 ) \ - SYSCALL_ENTRY( 0x0091, NtQuerySemaphore, 40 ) \ - SYSCALL_ENTRY( 0x0092, NtQuerySymbolicLinkObject, 24 ) \ - SYSCALL_ENTRY( 0x0093, NtQuerySystemEnvironmentValue, 32 ) \ - SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValueEx, 40 ) \ - SYSCALL_ENTRY( 0x0095, NtQuerySystemInformation, 32 ) \ - SYSCALL_ENTRY( 0x0096, NtQuerySystemInformationEx, 48 ) \ - SYSCALL_ENTRY( 0x0097, NtQuerySystemTime, 8 ) \ - SYSCALL_ENTRY( 0x0098, NtQueryTimer, 40 ) \ - SYSCALL_ENTRY( 0x0099, NtQueryTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x009a, NtQueryValueKey, 48 ) \ - SYSCALL_ENTRY( 0x009b, NtQueryVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x009c, NtQueryVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x009d, NtQueueApcThread, 40 ) \ - SYSCALL_ENTRY( 0x009e, NtRaiseException, 24 ) \ - SYSCALL_ENTRY( 0x009f, NtRaiseHardError, 48 ) \ - SYSCALL_ENTRY( 0x00a0, NtReadFile, 72 ) \ - SYSCALL_ENTRY( 0x00a1, NtReadFileScatter, 72 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00a3, NtRegisterThreadTerminatePort, 8 ) \ - SYSCALL_ENTRY( 0x00a4, NtReleaseKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00a5, NtReleaseMutant, 16 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x00a7, NtRemoveIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletionEx, 48 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveProcessDebug, 16 ) \ - SYSCALL_ENTRY( 0x00aa, NtRenameKey, 16 ) \ - SYSCALL_ENTRY( 0x00ab, NtReplaceKey, 24 ) \ - SYSCALL_ENTRY( 0x00ac, NtReplyWaitReceivePort, 32 ) \ - SYSCALL_ENTRY( 0x00ad, NtRequestWaitReplyPort, 24 ) \ - SYSCALL_ENTRY( 0x00ae, NtResetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00af, NtResetWriteWatch, 24 ) \ - SYSCALL_ENTRY( 0x00b0, NtRestoreKey, 24 ) \ - SYSCALL_ENTRY( 0x00b1, NtResumeProcess, 8 ) \ - SYSCALL_ENTRY( 0x00b2, NtResumeThread, 16 ) \ - SYSCALL_ENTRY( 0x00b3, NtRollbackTransaction, 16 ) \ - SYSCALL_ENTRY( 0x00b4, NtSaveKey, 16 ) \ - SYSCALL_ENTRY( 0x00b5, NtSecureConnectPort, 72 ) \ - SYSCALL_ENTRY( 0x00b6, NtSetContextThread, 16 ) \ - SYSCALL_ENTRY( 0x00b7, NtSetDebugFilterState, 24 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetEaFile, 32 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetInformationDebugObject, 40 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationJobObject, 32 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationKey, 32 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationObject, 32 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationProcess, 32 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationThread, 32 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationToken, 32 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetIntervalProfile, 16 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetLdtEntries, 32 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetSecurityObject, 24 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetSystemInformation, 24 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSystemTime, 16 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetThreadExecutionState, 16 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetTimer, 56 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetValueKey, 48 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00d0, NtShutdownSystem, 8 ) \ - SYSCALL_ENTRY( 0x00d1, NtSignalAndWaitForSingleObject, 32 ) \ - SYSCALL_ENTRY( 0x00d2, NtSuspendProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d3, NtSuspendThread, 16 ) \ - SYSCALL_ENTRY( 0x00d4, NtSystemDebugControl, 48 ) \ - SYSCALL_ENTRY( 0x00d5, NtTerminateJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00d6, NtTerminateProcess, 16 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateThread, 16 ) \ - SYSCALL_ENTRY( 0x00d8, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00d9, NtTraceControl, 48 ) \ - SYSCALL_ENTRY( 0x00da, NtUnloadDriver, 8 ) \ - SYSCALL_ENTRY( 0x00db, NtUnloadKey, 8 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnlockFile, 40 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnlockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x00de, NtUnmapViewOfSection, 16 ) \ - SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSectionEx, 24 ) \ - SYSCALL_ENTRY( 0x00e0, NtWaitForAlertByThreadId, 16 ) \ - SYSCALL_ENTRY( 0x00e1, NtWaitForDebugEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForMultipleObjects, 40 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForSingleObject, 24 ) \ - SYSCALL_ENTRY( 0x00e5, NtWriteFile, 72 ) \ - SYSCALL_ENTRY( 0x00e6, NtWriteFileGather, 72 ) \ - SYSCALL_ENTRY( 0x00e7, NtWriteVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00e8, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00e9, wine_nt_to_unix_file_name, 32 ) \ - SYSCALL_ENTRY( 0x00ea, wine_unix_to_nt_file_name, 24 ) + SYSCALL_ENTRY( 0x005a, NtMakePermanentObject, 8 ) \ + SYSCALL_ENTRY( 0x005b, NtMakeTemporaryObject, 8 ) \ + SYSCALL_ENTRY( 0x005c, NtMapViewOfSection, 80 ) \ + SYSCALL_ENTRY( 0x005d, NtMapViewOfSectionEx, 72 ) \ + SYSCALL_ENTRY( 0x005e, NtNotifyChangeDirectoryFile, 72 ) \ + SYSCALL_ENTRY( 0x005f, NtNotifyChangeKey, 80 ) \ + SYSCALL_ENTRY( 0x0060, NtNotifyChangeMultipleKeys, 96 ) \ + SYSCALL_ENTRY( 0x0061, NtOpenDirectoryObject, 24 ) \ + SYSCALL_ENTRY( 0x0062, NtOpenEvent, 24 ) \ + SYSCALL_ENTRY( 0x0063, NtOpenFile, 48 ) \ + SYSCALL_ENTRY( 0x0064, NtOpenIoCompletion, 24 ) \ + SYSCALL_ENTRY( 0x0065, NtOpenJobObject, 24 ) \ + SYSCALL_ENTRY( 0x0066, NtOpenKey, 24 ) \ + SYSCALL_ENTRY( 0x0067, NtOpenKeyEx, 32 ) \ + SYSCALL_ENTRY( 0x0068, NtOpenKeyTransacted, 32 ) \ + SYSCALL_ENTRY( 0x0069, NtOpenKeyTransactedEx, 40 ) \ + SYSCALL_ENTRY( 0x006a, NtOpenKeyedEvent, 24 ) \ + SYSCALL_ENTRY( 0x006b, NtOpenMutant, 24 ) \ + SYSCALL_ENTRY( 0x006c, NtOpenProcess, 32 ) \ + SYSCALL_ENTRY( 0x006d, NtOpenProcessToken, 24 ) \ + SYSCALL_ENTRY( 0x006e, NtOpenProcessTokenEx, 32 ) \ + SYSCALL_ENTRY( 0x006f, NtOpenSection, 24 ) \ + SYSCALL_ENTRY( 0x0070, NtOpenSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x0071, NtOpenSymbolicLinkObject, 24 ) \ + SYSCALL_ENTRY( 0x0072, NtOpenThread, 32 ) \ + SYSCALL_ENTRY( 0x0073, NtOpenThreadToken, 32 ) \ + SYSCALL_ENTRY( 0x0074, NtOpenThreadTokenEx, 40 ) \ + SYSCALL_ENTRY( 0x0075, NtOpenTimer, 24 ) \ + SYSCALL_ENTRY( 0x0076, NtPowerInformation, 40 ) \ + SYSCALL_ENTRY( 0x0077, NtPrivilegeCheck, 24 ) \ + SYSCALL_ENTRY( 0x0078, NtProtectVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x0079, NtPulseEvent, 16 ) \ + SYSCALL_ENTRY( 0x007a, NtQueryAttributesFile, 16 ) \ + SYSCALL_ENTRY( 0x007b, NtQueryDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x007c, NtQueryDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x007d, NtQueryDirectoryFile, 88 ) \ + SYSCALL_ENTRY( 0x007e, NtQueryDirectoryObject, 56 ) \ + SYSCALL_ENTRY( 0x007f, NtQueryEaFile, 72 ) \ + SYSCALL_ENTRY( 0x0080, NtQueryEvent, 40 ) \ + SYSCALL_ENTRY( 0x0081, NtQueryFullAttributesFile, 16 ) \ + SYSCALL_ENTRY( 0x0082, NtQueryInformationAtom, 40 ) \ + SYSCALL_ENTRY( 0x0083, NtQueryInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x0084, NtQueryInformationJobObject, 40 ) \ + SYSCALL_ENTRY( 0x0085, NtQueryInformationProcess, 40 ) \ + SYSCALL_ENTRY( 0x0086, NtQueryInformationThread, 40 ) \ + SYSCALL_ENTRY( 0x0087, NtQueryInformationToken, 40 ) \ + SYSCALL_ENTRY( 0x0088, NtQueryInstallUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x0089, NtQueryIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x008a, NtQueryKey, 40 ) \ + SYSCALL_ENTRY( 0x008b, NtQueryLicenseValue, 40 ) \ + SYSCALL_ENTRY( 0x008c, NtQueryMultipleValueKey, 48 ) \ + SYSCALL_ENTRY( 0x008d, NtQueryMutant, 40 ) \ + SYSCALL_ENTRY( 0x008e, NtQueryObject, 40 ) \ + SYSCALL_ENTRY( 0x008f, NtQueryPerformanceCounter, 16 ) \ + SYSCALL_ENTRY( 0x0090, NtQuerySection, 40 ) \ + SYSCALL_ENTRY( 0x0091, NtQuerySecurityObject, 40 ) \ + SYSCALL_ENTRY( 0x0092, NtQuerySemaphore, 40 ) \ + SYSCALL_ENTRY( 0x0093, NtQuerySymbolicLinkObject, 24 ) \ + SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValue, 32 ) \ + SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValueEx, 40 ) \ + SYSCALL_ENTRY( 0x0096, NtQuerySystemInformation, 32 ) \ + SYSCALL_ENTRY( 0x0097, NtQuerySystemInformationEx, 48 ) \ + SYSCALL_ENTRY( 0x0098, NtQuerySystemTime, 8 ) \ + SYSCALL_ENTRY( 0x0099, NtQueryTimer, 40 ) \ + SYSCALL_ENTRY( 0x009a, NtQueryTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x009b, NtQueryValueKey, 48 ) \ + SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 40 ) \ + SYSCALL_ENTRY( 0x009f, NtRaiseException, 24 ) \ + SYSCALL_ENTRY( 0x00a0, NtRaiseHardError, 48 ) \ + SYSCALL_ENTRY( 0x00a1, NtReadFile, 72 ) \ + SYSCALL_ENTRY( 0x00a2, NtReadFileScatter, 72 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00a4, NtRegisterThreadTerminatePort, 8 ) \ + SYSCALL_ENTRY( 0x00a5, NtReleaseKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00a6, NtReleaseMutant, 16 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletionEx, 48 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveProcessDebug, 16 ) \ + SYSCALL_ENTRY( 0x00ab, NtRenameKey, 16 ) \ + SYSCALL_ENTRY( 0x00ac, NtReplaceKey, 24 ) \ + SYSCALL_ENTRY( 0x00ad, NtReplyWaitReceivePort, 32 ) \ + SYSCALL_ENTRY( 0x00ae, NtRequestWaitReplyPort, 24 ) \ + SYSCALL_ENTRY( 0x00af, NtResetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00b0, NtResetWriteWatch, 24 ) \ + SYSCALL_ENTRY( 0x00b1, NtRestoreKey, 24 ) \ + SYSCALL_ENTRY( 0x00b2, NtResumeProcess, 8 ) \ + SYSCALL_ENTRY( 0x00b3, NtResumeThread, 16 ) \ + SYSCALL_ENTRY( 0x00b4, NtRollbackTransaction, 16 ) \ + SYSCALL_ENTRY( 0x00b5, NtSaveKey, 16 ) \ + SYSCALL_ENTRY( 0x00b6, NtSecureConnectPort, 72 ) \ + SYSCALL_ENTRY( 0x00b7, NtSetContextThread, 16 ) \ + SYSCALL_ENTRY( 0x00b8, NtSetDebugFilterState, 24 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetEaFile, 32 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetInformationDebugObject, 40 ) \ + SYSCALL_ENTRY( 0x00be, NtSetInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationJobObject, 32 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationKey, 32 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationObject, 32 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationProcess, 32 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationThread, 32 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationToken, 32 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetIntervalProfile, 16 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetLdtEntries, 32 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetSecurityObject, 24 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetSystemInformation, 24 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSystemTime, 16 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetThreadExecutionState, 16 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetTimer, 56 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetValueKey, 48 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00d1, NtShutdownSystem, 8 ) \ + SYSCALL_ENTRY( 0x00d2, NtSignalAndWaitForSingleObject, 32 ) \ + SYSCALL_ENTRY( 0x00d3, NtSuspendProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d4, NtSuspendThread, 16 ) \ + SYSCALL_ENTRY( 0x00d5, NtSystemDebugControl, 48 ) \ + SYSCALL_ENTRY( 0x00d6, NtTerminateJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00d7, NtTerminateProcess, 16 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateThread, 16 ) \ + SYSCALL_ENTRY( 0x00d9, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00da, NtTraceControl, 48 ) \ + SYSCALL_ENTRY( 0x00db, NtUnloadDriver, 8 ) \ + SYSCALL_ENTRY( 0x00dc, NtUnloadKey, 8 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnlockFile, 40 ) \ + SYSCALL_ENTRY( 0x00de, NtUnlockVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSection, 16 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSectionEx, 24 ) \ + SYSCALL_ENTRY( 0x00e1, NtWaitForAlertByThreadId, 16 ) \ + SYSCALL_ENTRY( 0x00e2, NtWaitForDebugEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForMultipleObjects, 40 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForSingleObject, 24 ) \ + SYSCALL_ENTRY( 0x00e6, NtWriteFile, 72 ) \ + SYSCALL_ENTRY( 0x00e7, NtWriteFileGather, 72 ) \ + SYSCALL_ENTRY( 0x00e8, NtWriteVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00e9, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00ea, wine_nt_to_unix_file_name, 32 ) \ + SYSCALL_ENTRY( 0x00eb, wine_unix_to_nt_file_name, 24 ) diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 6f73919c886..a1a71ee71df 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -611,6 +611,11 @@ NTSTATUS SYSCALL_API NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *s SYSCALL_FUNC( NtLockVirtualMemory ); }
+NTSTATUS SYSCALL_API NtMakePermanentObject( HANDLE handle ) +{ + SYSCALL_FUNC( NtMakePermanentObject ); +} + NTSTATUS SYSCALL_API NtMakeTemporaryObject( HANDLE handle ) { SYSCALL_FUNC( NtMakeTemporaryObject ); diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 74451ae891c..92171a523a4 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -3163,7 +3163,9 @@ static void test_object_permanence(void) ULONG initial_attr; ACCESS_MASK access; BOOLEAN make_temporary; + BOOLEAN make_permanent; NTSTATUS make_temp_status; + NTSTATUS make_perm_status; } tests[] = { { .name = "permanent object persists", @@ -3185,6 +3187,29 @@ static void test_object_permanence(void) .make_temporary = TRUE, .make_temp_status = STATUS_ACCESS_DENIED, }, + { + .name = "NtMakePermanentObject() succeeds even if already permanent", + .initial_attr = OBJ_PERMANENT, + .access = GENERIC_ALL, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() fails w/o DELETE access even if already permanent", + .initial_attr = OBJ_PERMANENT, + .access = EVENT_ALL_ACCESS & ~DELETE, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() reverses effect of NtMakeTemporaryObject()", + .initial_attr = OBJ_PERMANENT, + .access = GENERIC_ALL, + .make_temporary = TRUE, + .make_temp_status = STATUS_SUCCESS, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + },
{ .name = "temporary object disappears", @@ -3206,6 +3231,30 @@ static void test_object_permanence(void) .make_temporary = TRUE, .make_temp_status = STATUS_ACCESS_DENIED, }, + { + .name = "NtMakePermanentObject() makes an object persist", + .initial_attr = 0, + .access = GENERIC_ALL, + .make_temporary = FALSE, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() fails w/o DELETE access", + .initial_attr = 0, + .access = EVENT_ALL_ACCESS & ~DELETE, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() is not blocked by calling NtMakeTemporaryObject() on an already temporary object", + .initial_attr = 0, + .access = GENERIC_ALL, + .make_temporary = TRUE, + .make_temp_status = STATUS_SUCCESS, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, }; const struct object_permanence_test *test; HANDLE process_token = NULL, thread_token = NULL; @@ -3319,6 +3368,15 @@ static void test_object_permanence(void) } winetest_pop_context();
+ if (test->make_permanent) + { + NTSTATUS expected_status = creatpermapriv ? test->make_perm_status : STATUS_PRIVILEGE_NOT_HELD; + status = NtMakePermanentObject( handle ); + todo_wine + ok( status == expected_status, "NtMakePermanentObject returned %08lx expected (%08lx)\n", status, expected_status ); + if (!NT_ERROR(status)) is_permanent = TRUE; + } + if (winetest_debug > 1) trace( "NOTE: about to close earlier handle (%p) which should be the last", handle ); NtClose( handle ); diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 68a861f047a..ae7bc115ffe 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -1272,6 +1272,26 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, UNICODE_STRING *target }
+/************************************************************************** + * NtMakePermanentObject (NTDLL.@) + */ +NTSTATUS WINAPI NtMakePermanentObject( HANDLE handle ) +{ + unsigned int ret; + + TRACE("%p\n", handle); + + SERVER_START_REQ( set_object_permanence ) + { + req->handle = wine_server_obj_handle( handle ); + req->permanent = 1; + ret = wine_server_call( req ); + } + SERVER_END_REQ; + return ret; +} + + /************************************************************************** * NtMakeTemporaryObject (NTDLL.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index d098cf19c78..996777fd7fd 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -799,7 +799,6 @@ @ stdcall NtFsControlFile(long long ptr ptr ptr long ptr long ptr long) @ stub NtGlobalFlag @ stdcall NtLockFile(long long ptr ptr ptr ptr ptr ptr long long) -@ stub NtMakePermanentObject @ stdcall NtMapViewOfSection(long long ptr long long ptr ptr long long long) @ stdcall NtNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) @ stdcall NtOpenFile(ptr long ptr ptr long long) @@ -1446,6 +1445,7 @@ @ stdcall -private ZwLoadKey(ptr ptr) NtLoadKey @ stdcall -private ZwLockFile(long long ptr ptr ptr ptr ptr ptr long long) NtLockFile @ stdcall -private ZwLockVirtualMemory(long ptr ptr long) NtLockVirtualMemory +@ stdcall ZwMakePermanentObject(long) NtMakePermanentObject @ stdcall ZwMakeTemporaryObject(long) NtMakeTemporaryObject @ stdcall ZwMapViewOfSection(long long ptr long long ptr ptr long long long) NtMapViewOfSection @ stdcall -private ZwNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) NtNotifyChangeDirectoryFile diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index 681aab7e827..628184ff7c1 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -534,6 +534,17 @@ NTSTATUS WINAPI wow64_NtListenPort( UINT *args ) }
+/********************************************************************** + * wow64_NtMakePermanentObject + */ +NTSTATUS WINAPI wow64_NtMakePermanentObject( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + + return NtMakePermanentObject( handle ); +} + + /********************************************************************** * wow64_NtMakeTemporaryObject */ diff --git a/include/winternl.h b/include/winternl.h index 6b4009b913e..c39d6427e52 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4480,6 +4480,7 @@ NTSYSAPI NTSTATUS WINAPI NtLoadKey2(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES NTSYSAPI NTSTATUS WINAPI NtLoadKeyEx(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG,HANDLE,HANDLE,ACCESS_MASK,HANDLE *,IO_STATUS_BLOCK *); NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); +NTSYSAPI NTSTATUS WINAPI NtMakePermanentObject(HANDLE); NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE); NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG_PTR,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI NtMapViewOfSectionEx(HANDLE,HANDLE,PVOID*,const LARGE_INTEGER*,SIZE_T*,ULONG,ULONG,MEM_EXTENDED_PARAMETER*,ULONG);