https://git.reactos.org/?p=reactos.git;a=commitdiff;h=205eadcb84ce04acd23e8…
commit 205eadcb84ce04acd23e8920c7313d55fee28fee
Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org>
AuthorDate: Wed Jan 1 19:52:20 2025 +0700
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Jan 1 19:52:20 2025 +0700
[NTOS:PS] Fix returned flags for QUOTA_LIMITS_EX query (#7589)
Use the information from EPROCESS::Vm.
Addendum to commit 1e06829961cb597f7e1927a5e35b66febe674a96.
---
ntoskrnl/ps/query.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c
index 01aa0361af8..506497c1a17 100644
--- a/ntoskrnl/ps/query.c
+++ b/ntoskrnl/ps/query.c
@@ -212,9 +212,13 @@ NtQueryInformationProcess(
/* Get additional information, if needed */
if (Extended)
{
+ QuotaLimits.Flags |= (Process->Vm.Flags.MaximumWorkingSetHard ?
+ QUOTA_LIMITS_HARDWS_MAX_ENABLE : QUOTA_LIMITS_HARDWS_MAX_DISABLE);
+ QuotaLimits.Flags |= (Process->Vm.Flags.MinimumWorkingSetHard ?
+ QUOTA_LIMITS_HARDWS_MIN_ENABLE : QUOTA_LIMITS_HARDWS_MIN_DISABLE);
+
/* FIXME: Get the correct information */
//QuotaLimits.WorkingSetLimit = (SIZE_T)-1; // Not used on Win2k3, it is
set to 0
- QuotaLimits.Flags = QUOTA_LIMITS_HARDWS_MIN_DISABLE |
QUOTA_LIMITS_HARDWS_MAX_DISABLE;
QuotaLimits.CpuRateLimit.RateData = 0;
}