https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a7d6483e65d565772f4df…
commit a7d6483e65d565772f4df8ccc546502e005898f7
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun May 2 16:26:11 2021 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun May 2 16:26:11 2021 +0200
[NTOS:PS] Revert 4d7062abb6bcdfefd1c25d391020d98cb6538576 on request
---
ntoskrnl/ps/query.c | 49 ++++++++++---------------------------------------
1 file changed, 10 insertions(+), 39 deletions(-)
diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c
index 0d2d1cd6e41..b25e6928422 100644
--- a/ntoskrnl/ps/query.c
+++ b/ntoskrnl/ps/query.c
@@ -2032,48 +2032,19 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
ULONG_PTR TlsIndex = 0;
PVOID *ExpansionSlots;
PETHREAD ProcThread;
- ULONG Alignment;
BOOLEAN HasPrivilege;
PAGED_CODE();
- /* Check if we were called from user mode */
- if (PreviousMode != KernelMode)
- {
- /* Enter SEH */
- _SEH2_TRY
- {
- switch (ThreadInformationClass)
- {
- case ThreadPriority:
- Alignment = sizeof(KPRIORITY);
- break;
-
- case ThreadAffinityMask:
- case ThreadQuerySetWin32StartAddress:
- Alignment = sizeof(ULONG_PTR);
- break;
-
- case ThreadEnableAlignmentFaultFixup:
- Alignment = sizeof(BOOLEAN);
- break;
-
- default:
- Alignment = sizeof(ULONG);
- break;
- }
-
- /* Probe the buffer */
- ProbeForRead(ThreadInformation,
- ThreadInformationLength,
- Alignment);
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- /* Return the exception code */
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
- }
- _SEH2_END;
- }
+ /* Verify Information Class validity */
+#if 0
+ Status = DefaultSetInfoBufferCheck(ThreadInformationClass,
+ PsThreadInfoClass,
+ RTL_NUMBER_OF(PsThreadInfoClass),
+ ThreadInformation,
+ ThreadInformationLength,
+ PreviousMode);
+ if (!NT_SUCCESS(Status)) return Status;
+#endif
/* Check what kind of information class this is */
switch (ThreadInformationClass)