[NTOSKRNL:CC] Implemented CcSetBcbOwnerPointer

Implemented CcSetBcbOwnerPointer, now it correctly handle resource from MBCB
This commit is contained in:
Dibyamartanda Samanta 2024-07-31 08:46:17 +02:00 committed by CodingWorkshop Signing Team
parent 67ee8f85ce
commit d825fe1dcb
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -271,7 +271,19 @@ CcSetBcbOwnerPointer(
IN PMBCB Bcb, IN PMBCB Bcb,
IN PVOID OwnerPointer) IN PVOID OwnerPointer)
{ {
//Unimimplemented if (Bcb->NodeTypeCode == 762)
{
/* Iterate through all bitmap ranges */
for (auto it = ListEntryIterator::begin(&Bcb->BitmapRanges); it != ListEntryIterator::end(&Bcb->BitmapRanges); ++it)
{ auto* Bcb = CONTAINING_RECORD(it->Blink,MBCB,BitmapRanges);
ExSetResourceOwnerPointer(&Bcb->DirtyPages,OwnerPointer);
}
}
else
{
/* Single bitmap range */
ExSetResourceOwnerPointer(&Bcb->BitmapRange1.FirstDirtyPage,OwnerPointer);
}
} }