Commit Graph

60 Commits

Author SHA1 Message Date
3ae19eaf01
[NTOSKRNL::CC] Implement CcOkToAddWriteBehindThread 2024-08-17 20:13:20 +02:00
e75a2adeec
[NTOSKRNL:CC] Implement CcAdjustWriteBehindThreadPool and CcAdjustWriteBehindThreadPoolIfNeeded
These two function are responsible for  calling threadpool,when needed
2024-08-17 15:32:37 +02:00
1c173364a1
[NTOSKRNL::CC]Implement CcRescheduleLazyWriteScan CcSetLazyWriteScanQueued
These two function Rescheduling and Scheduling Lazy write scan
2024-08-17 15:08:39 +02:00
104a0212e0
[NTOSKRNL:CC] Add CcQueueLazyWriteScanThread
Implemented CcQueueLazyWriteScanThread
2024-08-17 08:47:34 +02:00
1dec536c4d
[NTOSKRNL:CC] Threadpool 2024-08-16 07:53:05 +02:00
e25bcab194
[NTOSKRNL:CC] Disable Fault Clustering while Probing
It ensure fault clustering is disabled for current thread, otherwise on some test it was failing MmProbeAndLockPages
2024-08-16 06:50:35 +02:00
688615fa39
[NTOSKRNL:CC] Bug Fix
Some test failed due to miss use of ForwardClusterOnly
2024-08-16 06:45:16 +02:00
8a9e450310
[NTOSKRNL:CC] Pinsupport Optimize Spinlock
Use more optimized KeAcquireInStackQueuedSpinLock for better performance
2024-08-07 16:53:50 +02:00
62ebdde712
[NTOSKRNL:CC] Cache Controller Pinsupport :: CcPinRead and CcPinMappedData
Completely implemented CcPinRead and CcPinMappedData

In future Refactor with BCB Iterator with bounds checking.
2024-08-07 16:09:29 +02:00
47bfb48ebb
Update NTOSKRNL/CC/ccpinsupport.cpp
Loop was prematurely terminating  due to wrong condition 
of if(BeyondLastByte.QuadPart < LocalFileOffset.QuadPart + RemainingLength)
we are mapping across the length, 
itroduced some guard checks 
if(localbcb != nullptr)
   {
    CcSetDirtyPinnedData(localbcb, nullptr);
    *Bcb = localbcb;
   }  to fix some test case where it was failing
2024-08-07 15:28:55 +02:00
10527bf405
[NTOSKRNL:CC] CcSetDirtyPinnedData :: use reconstructed OBCB Structure
Their no PBCB anymore, since we reconstructed it by looking at _OBCB  which is reconstructed from CcAllocateObcb, 
we know that bcb array is array of PCC_BCB structure, thus modified CcSetDirtyPinnedData to use OBCB instead
2024-08-07 15:09:57 +02:00
4258a10fbb
[NTOSKRNL:CC] CcMapDataForOverwrite
Modified CcMapDataForOverwrite to use CalculatePageCount Template
2024-08-07 14:56:02 +02:00
0e2abe7eb5
[NTOSKRNL:CC] Add CalculatePageCount Template
Added CalculatePageCount Template function to calculate total pagecount from file offset and length
2024-08-07 14:47:04 +02:00
2bc93fca07
[NTOSKRNL:CC] Fix NullPtr
NullPtr became Nullptre? Somehow
2024-08-07 11:01:45 +02:00
d7ee2f9afc
[NTOSKRNL:CC] CcMapDataForOverwrite
Implemented CcMapDataForOverwrite
2024-08-07 10:38:18 +02:00
ddda3559c6
[NTOSKRNL:CC] Implement CcPinFileData
Implemented CcPinFileData
Note: Future had to be refactored to be more functional in styling
2024-08-06 14:50:17 +02:00
4370544c97
[NTOSKRNL:CC] Pin Support::Implemented CcSetDirtyPinnedData
Implemented CcSetDirtyPinnedData
Note: In Future Implement Specialized Iterator for Bcbs ,introduce bounds checking similar
to GSL Span
2024-08-06 13:59:37 +02:00
a40c3d4200
[NTOSKRNL:CC] Pin Support Protocols :: added functions
Completed Implementation for::
*CcPreparePinWrite
*CcMapData
*CcAllocateObcb
Reconstructed/Guessed OBCB Structure
2024-08-01 15:23:57 +02:00
dac01f6510
[NTOSKRNL:CC] Added Bounds Checked Array Class
This Bounds Checked array will be used for OBCB type
2024-08-01 14:02:45 +02:00
d825fe1dcb
[NTOSKRNL:CC] Implemented CcSetBcbOwnerPointer
Implemented CcSetBcbOwnerPointer, now it correctly handle resource from MBCB
2024-07-31 08:46:17 +02:00
3adfb0cff6 [NTOSKRNL:CC] Implemented CcUnpinFileDataEx
Implemented CcUnpinFileDataEx responsible for unpinning BCB and cleaning if it is dirty 
*Fixed Typo for freeing pool memory of some other function
2024-07-04 20:33:07 +02:00
7157abd1f9 [NTOSKRNL:CC] Pin Support Protocols
Added  Function Parameters for:

CcPinFileData
CcMapData
CcMapDataCommon
CcPinMappedData
CcPinRead
CcPreparePinWrite
CcSetBcbOwnerPointer

Functions Implemented:
CcUnpinData
CcUnpinDataForThread
2024-07-02 16:01:52 +02:00
05cd85be9b [NTOSKRNL:CC] Pin Hadler Initial Commit
* Implemented  CcMapDataCommon
Rest of the API will be implemented Soon.
2024-06-21 17:49:04 +02:00
bf0136ce21 [NTOSKRNL:CC] Fix Probing and locking of pages,
Set Ideal processor to 1 before probing and locking pages,
then restore it back to original state
2024-06-20 19:12:51 +02:00
1f041b4444 Update NTOSKRNL/CC/cclazywriter.cpp 2024-05-25 10:15:26 +02:00
785ff4b644 [NTOSKRNL:CC] Bug Fix 2024-05-25 09:42:40 +02:00
5a5ebcae89 [NTOSKRNL:CC] Fixed Probing code 2024-05-24 18:05:45 +02:00
2300440e3d [NTOSKRNL:CC] MDL Handler Refactored for using RAII 2024-05-24 10:42:12 +02:00
ac5f558605 RAII:: Added Spinlock Guard, 2024-05-24 10:38:19 +02:00
438ce9293c Update NTOSKRNL/CC/ccloghandler.cpp 2024-05-24 10:33:06 +02:00
4784e99b74 [NTOSKRNL:CC] Implementation of CcGetNumberOfMappedPages
Added CcGetNumberOfMappedPages,
2024-05-24 10:32:14 +02:00
5d6f81cb08 [NTOSKRNL:CC] Add RAII Wrapper Spinlock Guard 2024-05-24 10:28:15 +02:00
8e73c913ed [NTOSKRNL:CC] added CcGetCachedDirtyPageCountForFile
Added CcGetCachedDirtyPageCountForFile
2024-05-24 08:16:13 +02:00
c3b506d686 [NTOSKRNL:CC] Bug Fix 2024-05-24 07:50:01 +02:00
18f2c27449 [NTOSKRNL:CC] Added more Log Handle Directives
Added CcSetLoggedDataThreshold,CcIsThereDirtyLoggedPages
2024-05-24 07:38:40 +02:00
88449693d4 Update NTOSKRNL/CC/cclazywriter.cpp 2024-05-21 14:46:57 +02:00
a8a6e6be35 Fixed CcComputeNextScanTime 2024-05-21 14:40:02 +02:00
25a937916b Add NTOSKRNL/CC/ccinternal.hpp 2024-05-21 14:31:59 +02:00
49302f5b41 [NTOSKRNL:CC] Implementation of Lazy Writer
Lazy Writer is complete
2024-05-21 14:30:43 +02:00
3ff9824c8b [NTOSKRNL:CC] Implementation of Lazy Writer
Implemented following function
*CcPostWorkQueue
*CcScheduleLazyWriteScanEx
*CcScheduleLazyWriteScan
*CcExceptionFilter
*CcPerformReadAhead
*CcPostDeferredWrites
*CcSetValidData
*CcWriteBehind
*CcLazyWriteScan
2024-05-21 11:38:04 +02:00
189cf42f74 [NTOSKRNL:CC] Fixing Synchronization Bug
Fixing Bug identified by PeyTy
2024-05-18 17:22:16 +02:00
5b5000d7f1 [NTOSKRNL:CC] CC LOG: Added CcGetLsnForFileObject
Added CcGetLsnForFileObject  and fixed some Synchronization code,
2024-05-18 08:22:19 +02:00
90e470627f Update NTOSKRNL/CC/ccloghandler.cpp 2024-05-17 18:08:23 +02:00
9fa8fa9fee Fixed Parameters
Fixed Parameters for CcSetLogHandleForFileEx  and CcSetAdditionalCacheAttributesEx as per WIndows SDK
2024-05-17 18:02:27 +02:00
3af1178f6d Update NTOSKRNL/CC/ccloghandler.cpp 2024-05-17 17:55:18 +02:00
36cd225c02 [NTOSKRNL:CC] Fixing Code Formating 2024-05-17 17:54:09 +02:00
7314c677e7 Update NTOSKRNL/CC/ccloghandler.cpp 2024-05-17 17:48:27 +02:00
9fb0e1c897 Update NTOSKRNL/CC/ccloghandler.cpp 2024-05-17 17:47:10 +02:00
47d3ad5e82 [NTOSKRNL:CC] Catch Controller Add LOG Handler Directives
Implemented everything, CcGetLsnForFileObject  is left now
2024-05-17 17:45:28 +02:00
98d2bb9ea6 Update NTOSKRNL/CC/ccmdlhandler.cpp 2024-05-17 17:07:42 +02:00