https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d484a68ccb267c7de64d4116c987cb8d85464830

commit d484a68ccb267c7de64d4116c987cb8d85464830
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Sun Oct 24 17:49:56 2021 +0200
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Thu Nov 18 22:36:07 2021 +0100

    [NDK][NTOS:EX] Add/fix SAL annotations for Nt/ZwSetSystemInformation + last 
parameter type. (#4064)
---
 ntoskrnl/ex/sysinfo.c     | 9 +++++----
 sdk/include/ndk/exfuncs.h | 7 ++++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c
index 552f9812046..e786252fff3 100644
--- a/ntoskrnl/ex/sysinfo.c
+++ b/ntoskrnl/ex/sysinfo.c
@@ -2989,12 +2989,13 @@ NtQuerySystemInformation(
     return FStatus;
 }
 
-
+__kernel_entry
 NTSTATUS
 NTAPI
-NtSetSystemInformation (IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
-                        IN PVOID SystemInformation,
-                        IN ULONG SystemInformationLength)
+NtSetSystemInformation(
+    _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
+    _In_reads_bytes_(SystemInformationLength) PVOID SystemInformation,
+    _In_ ULONG SystemInformationLength)
 {
     NTSTATUS Status = STATUS_INVALID_INFO_CLASS;
     KPROCESSOR_MODE PreviousMode;
diff --git a/sdk/include/ndk/exfuncs.h b/sdk/include/ndk/exfuncs.h
index e6e78c85ffa..bca4e87010c 100644
--- a/sdk/include/ndk/exfuncs.h
+++ b/sdk/include/ndk/exfuncs.h
@@ -555,12 +555,13 @@ NtSetSystemEnvironmentValueEx(
     _Inout_ PULONG Attributes
 );
 
+__kernel_entry
 NTSYSCALLAPI
 NTSTATUS
 NTAPI
 NtSetSystemInformation(
     _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
-    _In_ PVOID SystemInformation,
+    _In_reads_bytes_(SystemInformationLength) PVOID SystemInformation,
     _In_ ULONG SystemInformationLength
 );
 
@@ -1000,8 +1001,8 @@ NTSTATUS
 NTAPI
 ZwSetSystemInformation(
     _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
-    _In_ PVOID SystemInformation,
-    _In_ SIZE_T SystemInformationLength
+    _In_reads_bytes_(SystemInformationLength) PVOID SystemInformation,
+    _In_ ULONG SystemInformationLength
 );
 
 #ifdef NTOS_MODE_USER

Reply via email to