#include "mi.h"Go to the source code of this file.
Defines | |
| #define | xMAX_NAME 1024 |
Typedefs | |
| typedef enum _SEGMENT_DEREFERENCE_OBJECT | BALANCE_OBJECT |
Enumerations | |
| enum | _SEGMENT_DEREFERENCE_OBJECT { SegmentDereference, UsedSegmentCleanup, SegMaximumObject } |
Functions | |
| ULONG FASTCALL | MiCheckProtoPtePageState (IN PMMPTE PrototypePte, IN ULONG PfnLockHeld) |
| VOID | VadTreeWalk (PMMVAD Start) |
| VOID | MiRemoveUnusedSegments (VOID) |
| VOID FASTCALL | MiInsertBasedSection (IN PSECTION Section) |
| VOID FASTCALL | MiRemoveBasedSection (IN PSECTION Section) |
| PVOID | MiFindEmptySectionBaseDown (IN ULONG SizeOfRange, IN PVOID HighestAddressToEndAt) |
| VOID | MiSegmentDelete (PSEGMENT Segment) |
| VOID | MiSectionDelete (PVOID Object) |
| VOID | MiDereferenceSegmentThread (IN PVOID StartContext) |
| ULONG | MiSectionInitialization () |
| BOOLEAN | MmForceSectionClosed (IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN BOOLEAN DelayClose) |
| VOID | MiCleanSection (IN PCONTROL_AREA ControlArea, IN LOGICAL DirtyDataPagesOk) |
| NTSTATUS | MmGetFileNameForSection (IN HANDLE Section, OUT PSTRING FileName) |
| VOID | MiCheckControlArea (IN PCONTROL_AREA ControlArea, IN PEPROCESS CurrentProcess, IN KIRQL PreviousIrql) |
| VOID | MiCheckForControlAreaDeletion (IN PCONTROL_AREA ControlArea) |
| BOOLEAN | MiCheckControlAreaStatus (IN SECTION_CHECK_TYPE SectionCheckType, IN PSECTION_OBJECT_POINTERS SectionObjectPointers, IN ULONG DelayClose, OUT PCONTROL_AREA *ControlAreaOut, OUT PKIRQL PreviousIrql) |
| PEVENT_COUNTER | MiGetEventCounter () |
| VOID | MiFreeEventCounter (IN PEVENT_COUNTER Support, IN ULONG Flush) |
| VOID | MiFlushEventCounter () |
| BOOLEAN | MmCanFileBeTruncated (IN PSECTION_OBJECT_POINTERS SectionPointer, IN PLARGE_INTEGER NewFileSize) |
| ULONG | MiCanFileBeTruncatedInternal (IN PSECTION_OBJECT_POINTERS SectionPointer, IN PLARGE_INTEGER NewFileSize OPTIONAL, IN LOGICAL BlockNewViews, OUT PKIRQL PreviousIrql) |
Variables | |
| MMEVENT_COUNT_LIST | MmEventCountList |
| ULONG | MmUnusedSegmentForceFree |
| SIZE_T | MmSharedCommit = 0 |
| ULONG | MMCONTROL |
| POBJECT_TYPE | IoFileObjectType |
| GENERIC_MAPPING | MiSectionMapping |
|
|
Referenced by MmGetFileNameForSection(). |
|
|
|
|
|
Definition at line 48 of file sectsup.c.
|
|
||||||||||||||||||||
|
Definition at line 2614 of file sectsup.c. References ASSERT, _SUBSECTION::ControlArea, FALSE, LOCK_PFN, MiEndingOffset(), MmFlushForWrite, MmFlushImageSection(), _SUBSECTION::NextSubsection, NULL, _CONTROL_AREA::NumberOfMappedViews, _CONTROL_AREA::NumberOfUserReferences, PAGE_SIZE, TRUE, _CONTROL_AREA::u, and UNLOCK_PFN. Referenced by MmCanFileBeTruncated(), and MmPurgeSection().
|
|
||||||||||||||||
|
Definition at line 1823 of file sectsup.c. References ASSERT, _EVENT_COUNTER::Event, FALSE, KeSetEvent(), LOCK_WS_UNSAFE, MI_UNUSED_SEGMENTS_INSERT_CHARGE, MiCleanSection(), MiHydra, MiPurgeImageSection(), MiRemoveImageSectionObject(), MiSegmentDelete(), MM_PFN_LOCK_ASSERT, MmMaxUnusedSegmentNonPagedPoolUsage, MmMaxUnusedSegmentPagedPoolUsage, MmUnusedSegmentCleanup, MmUnusedSegmentList, MmUnusedSegmentNonPagedPoolUsage, MmUnusedSegmentPagedPoolUsage, NULL, TRUE, UNLOCK_PFN, and UNLOCK_WS_UNSAFE. Referenced by MiFlushRelease(), MiMapViewInSystemSpace(), MiMapViewOfDataSection(), MiMapViewOfImageSection(), MiRemoveMappedPtes(), MiRemoveMappedView(), MiSectionDelete(), MiShareSessionImage(), MiWriteComplete(), MmCreateSection(), MmFlushImageSection(), MmFlushSection(), MmPurgeSection(), MmShutdownSystem(), and MmUnmapViewInSystemCache().
|
|
||||||||||||||||||||||||
|
Definition at line 2149 of file sectsup.c. References CheckBothSection, CheckImageSection, CheckUserDataSection, _EVENT_COUNTER::Event, FALSE, KeDelayExecutionThread(), KeEnterCriticalRegion, KeLeaveCriticalRegion, KernelMode, KeWaitForSingleObject(), LOCK_PFN, MiFreeEventCounter(), MiGetEventCounter(), MmShortTime, NULL, _CONTROL_AREA::NumberOfMappedViews, _CONTROL_AREA::NumberOfSectionReferences, _CONTROL_AREA::NumberOfUserReferences, _EVENT_COUNTER::RefCount, TRUE, _CONTROL_AREA::u, UNLOCK_PFN, UNLOCK_PFN_AND_THEN_WAIT, _CONTROL_AREA::WaitingForDeletion, and WrPageOut. Referenced by MmFlushImageSection(), and MmForceSectionClosed().
|
|
|
Definition at line 2059 of file sectsup.c. References ASSERT, FALSE, KeReleaseSemaphore(), L, _MMDEREFERENCE_SEGMENT_HEADER::ListHead, _MMDEREFERENCE_SEGMENT_HEADER::Lock, MI_UNUSED_SEGMENTS_REMOVE_CHARGE, MiHydra, MiRemoveImageSectionObject(), MM_PFN_LOCK_ASSERT, MmDereferenceSegmentHeader, NULL, _MMDEREFERENCE_SEGMENT_HEADER::Semaphore, and TRUE. Referenced by MiRestoreTransitionPte().
|
|
||||||||||||
|
Referenced by MiCleanSection(), MiFlushSectionInternal(), and MmPurgeSection(). |
|
||||||||||||
|
Definition at line 1075 of file sectsup.c. References ASSERT, _MDL::ByteCount, _SUBSECTION::ControlArea, DbgPrint, FALSE, FreePageList, IoSynchronousPageWrite(), IS_PTE_NOT_DEMAND_ZERO, KeBugCheckEx(), KeClearEvent, KeDelayExecutionThread(), KeEnterCriticalRegion, KeInitializeEvent, KeLeaveCriticalRegion, KernelMode, KeWaitForSingleObject(), LOCK_PFN, _MDL::MappedSystemVa, MDL_MAPPED_TO_SYSTEM_VA, MDL_PAGES_LOCKED, _MDL::MdlFlags, MI_ADD_LOCKED_PAGE_CHARGE_FOR_MODIFIED_PAGE, MI_GET_PAGE_FRAME_FROM_TRANSITION_PTE, MI_INITIALIZE_ZERO_MDL, MI_IS_PFN_DELETED, MI_PFN_ELEMENT, MI_REMOVE_LOCKED_PAGE_CHARGE, MI_SET_PFN_DELETED, MiCheckProtoPtePageState(), MiDecrementReferenceCount(), MiDecrementShareCount(), MiEndingOffset(), MiGetSubsectionAddress, MiHydra, MiInsertPageInList(), MiIsPteOnPdeBoundary, MiMakeSystemAddressValidPfn(), MiReleasePageFileSpace(), MiRemoveImageSectionObject(), MiSegmentDelete(), MiStartingOffset(), MiUnlinkPageFromList(), MM_DBG_FLUSH_SECTION, MM_MAXIMUM_WRITE_CLUSTER, MmMappedFileIoComplete, MmModifiedWriteClusterSize, MmPageLocationList, MmShortTime, MmUnmapLockedPages(), _SUBSECTION::NextSubsection, NT_SUCCESS, NTSTATUS(), NULL, _MMPFN::OriginalPte, PAGE_SHIFT, PAGE_SIZE, _MMPFN::PteAddress, _MMPFN::PteFrame, _SUBSECTION::PtesInSubsection, _MDL::Size, _MDL::StartVa, Status, _SUBSECTION::SubsectionBase, TRUE, _CONTROL_AREA::u, _MMPTE::u, _MMPFN::u3, UNLOCK_PFN, UNLOCK_PFN_AND_THEN_WAIT, and WrPageOut. Referenced by MiCheckControlArea(), MiRemoveUnusedSegments(), MmFlushImageSection(), and MmForceSectionClosed().
|
|
|
Definition at line 603 of file sectsup.c. References ASSERT, DbgPrint, _CONTROL_AREA::DereferenceList, DISPATCH_LEVEL, _MMPAGE_FILE_EXPANSION::Event, ExFreePool(), FALSE, KeClearEvent, KeSetEvent(), KeSetPriorityThread(), KeWaitForMultipleObjects(), _MMDEREFERENCE_SEGMENT_HEADER::ListHead, _MMDEREFERENCE_SEGMENT_HEADER::Lock, MiAttemptPageFileReduction(), MiExtendPagingFiles(), MiRemoveUnusedSegments(), MiSegmentDelete(), MM_DBG_SECTIONS, MmDereferenceSegmentHeader, MmUnusedSegmentCleanup, NTSTATUS(), NULL, PsGetCurrentThread, _MMPAGE_FILE_EXPANSION::RequestedExpansionSize, SegMaximumObject, _CONTROL_AREA::Segment, SegmentDereference, _MMDEREFERENCE_SEGMENT_HEADER::Semaphore, Status, _CONTROL_AREA::u, UsedSegmentCleanup, UserMode, VOID(), and WrVirtualMemory. Referenced by MiSectionInitialization().
|
|
||||||||||||
|
Definition at line 154 of file sectsup.c. References MiFindEmptyAddressRangeDownTree(), MmSectionBasedRoot, and X64K. Referenced by MmCreateSection().
|
|
|
Definition at line 2487 of file sectsup.c. References APC_LEVEL, _MMEVENT_COUNT_LIST::Count, ExFreePool(), _EVENT_COUNTER::ListEntry, _MMEVENT_COUNT_LIST::ListHead, LOCK_PFN, MM_PFN_LOCK_ASSERT, MmEventCountList, NULL, and UNLOCK_PFN. Referenced by MiFreeEventCounter().
|
|
||||||||||||
|
Definition at line 2438 of file sectsup.c. References ASSERT, _MMEVENT_COUNT_LIST::Count, _MMEVENT_COUNT_LIST::ListHead, MiFlushEventCounter(), MM_PFN_LOCK_ASSERT, MmEventCountList, and NULL. Referenced by MiCheckControlAreaStatus(), MiCheckPurgeAndUpMapCount(), and MmCreateSection().
|
|
|
Definition at line 2377 of file sectsup.c. References APC_LEVEL, ASSERT, _MMEVENT_COUNT_LIST::Count, _EVENT_COUNTER::Event, ExAllocatePoolWithTag, FALSE, KeClearEvent, KeInitializeEvent, _EVENT_COUNTER::ListEntry, _MMEVENT_COUNT_LIST::ListHead, LOCK_PFN, MM_PFN_LOCK_ASSERT, MmEventCountList, NonPagedPool, NULL, _EVENT_COUNTER::RefCount, and UNLOCK_PFN. Referenced by MiCheckControlAreaStatus(), MiCheckPurgeAndUpMapCount(), and MmCreateSection().
|
|
|
Definition at line 79 of file sectsup.c. References ASSERT, MiInsertNode(), and MmSectionBasedRoot. Referenced by MmCreateSection().
|
|
|
Definition at line 118 of file sectsup.c. References MiRemoveNode(), and MmSectionBasedRoot. Referenced by MiSectionDelete().
|
|
|
Definition at line 2748 of file sectsup.c. References ASSERT, _SECTION_OBJECT_POINTERS::DataSectionObject, DbgPrint, _CONTROL_AREA::DereferenceList, FALSE, _CONTROL_AREA::FilePointer, FSRTL_FSP_TOP_LEVEL_IRP, FsRtlAcquireFileForCcFlush(), FsRtlReleaseFileForCcFlush(), _SECTION_OBJECT_POINTERS::ImageSectionObject, IoSetTopLevelIrp(), KeDelayExecutionThread(), KernelMode, LOCK_PFN, MI_UNUSED_SEGMENTS_INSERT_CHARGE, MI_UNUSED_SEGMENTS_REMOVE_CHARGE, MiCleanSection(), MiFlushSectionInternal(), MM_DBG_SECTIONS, MmMaxUnusedSegmentNonPagedPoolUsage, MmMaxUnusedSegmentPagedPoolUsage, MmShortTime, MmUnusedSegmentCount, MmUnusedSegmentForceFree, MmUnusedSegmentList, MmUnusedSegmentNonPagedPoolReduction, MmUnusedSegmentNonPagedPoolUsage, MmUnusedSegmentPagedPoolReduction, MmUnusedSegmentPagedPoolUsage, _CONTROL_AREA::ModifiedWriteCount, _SUBSECTION::NextSubsection, NT_SUCCESS, NTSTATUS(), NULL, _CONTROL_AREA::NumberOfMappedViews, _CONTROL_AREA::NumberOfSectionReferences, _SUBSECTION::PtesInSubsection, _FILE_OBJECT::SectionObjectPointer, _CONTROL_AREA::Segment, Status, STATUS_MAPPED_WRITER_COLLISION, _SUBSECTION::SubsectionBase, TRUE, _CONTROL_AREA::u, and UNLOCK_PFN. Referenced by MiDereferenceSegmentThread().
|
|
|
Definition at line 511 of file sectsup.c. References _SEGMENT::ControlArea, DbgPrint, LOCK_PFN, MiCheckControlArea(), MiRemoveBasedSection(), MM_DBG_SECTIONS, MmSectionBasedMutex, NULL, _CONTROL_AREA::NumberOfSectionReferences, _CONTROL_AREA::NumberOfUserReferences, PSECTION, and _CONTROL_AREA::Segment. Referenced by MiSectionInitialization().
|
|
|
Definition at line 768 of file sectsup.c. References CONTROL_AREA, _SEGMENT::ControlArea, ExAllocatePoolWithTag, ExFreePool(), FALSE, Handle, KeInitializeEvent, KeInitializeSemaphore(), KeInitializeSpinLock(), KernelMode, L, _MMDEREFERENCE_SEGMENT_HEADER::ListHead, _MMDEREFERENCE_SEGMENT_HEADER::Lock, MiDereferenceSegmentThread(), MiSectionDelete(), MiSectionMapping, MMCONTROL, MmDereferenceSegmentHeader, MmSectionBasedRoot, MmSectionObjectType, MmUnusedSegmentCleanup, MmUnusedSegmentList, NonPagedPool, NT_SUCCESS, NtClose(), NTSTATUS(), NULL, _CONTROL_AREA::NumberOfSectionReferences, ObCreateObject(), ObCreateObjectType(), ObInsertObject(), ObjectAttributes, PagedPool, PHYSICAL_ADDRESS_BITS, PsCreateSystemThread(), PSECTION, RtlInitUnicodeString(), SECTION, _CONTROL_AREA::Segment, SEGMENT, _SEGMENT::SegmentPteTemplate, _MMDEREFERENCE_SEGMENT_HEADER::Semaphore, Status, ThreadHandle, TRUE, _CONTROL_AREA::u, and ZeroPte. Referenced by MmInitSystem().
|
|
|
Definition at line 191 of file sectsup.c. References ASSERT, _SEGMENT::BasedAddress, _SEGMENT::ControlArea, _SECTION_OBJECT_POINTERS::DataSectionObject, DbgPrint, _CONTROL_AREA::DereferenceList, Event(), ExFreePool(), FALSE, File, _FILE_OBJECT::FileName, _CONTROL_AREA::FilePointer, FreePageList, _SECTION_OBJECT_POINTERS::ImageSectionObject, IS_PTE_NOT_DEMAND_ZERO, KeSetEvent(), _MMDEREFERENCE_SEGMENT_HEADER::Lock, LOCK_PFN, MI_GET_PAGE_FRAME_FROM_TRANSITION_PTE, MI_PFN_ELEMENT, MI_SET_PFN_DELETED, MI_UNUSED_SEGMENTS_REMOVE_CHARGE, MI_WRITE_INVALID_PTE, MiDecrementShareCount(), MiInsertPageInList(), MiIsPteOnPdeBoundary, MiMakeSystemAddressValidPfn(), MiReleasePageFileSpace(), MiReturnCommitment(), MiUnlinkPageFromList(), MM_DBG_COMMIT_RETURN_SEGMENT_DELETE1, MM_DBG_COMMIT_RETURN_SEGMENT_DELETE2, MM_DBG_SECTIONS, MM_TRACK_COMMIT, MmDereferenceSegmentHeader, MmIsAddressValid(), MmPageLocationList, MmSectionCommitMutex, MmSharedCommit, _SUBSECTION::NextSubsection, _SEGMENT::NonExtendedPtes, NT_SUCCESS, NTSTATUS(), NULL, _SEGMENT::NumberOfCommittedPages, ObDereferenceObject, _MMPFN::OriginalPte, PERFINFO_SEGMENT_DELETE, _SEGMENT::PrototypePte, PsGetCurrentProcess, _MMPFN::PteFrame, RtlFreeAnsiString(), RtlUnicodeStringToAnsiString(), _FILE_OBJECT::SectionObjectPointer, Status, _SUBSECTION::SubsectionBase, TRUE, _MMPTE::u, _CONTROL_AREA::u, _MMPFN::u3, UNLOCK_PFN, _CONTROL_AREA::WaitingForDeletion, and ZeroPte. Referenced by MiCheckControlArea(), MiCleanSection(), and MiDereferenceSegmentThread().
|
|
||||||||||||
|
Definition at line 2552 of file sectsup.c. References FALSE, MiCanFileBeTruncatedInternal(), TRUE, and UNLOCK_PFN. Referenced by CcPurgeCacheSection().
|
|
||||||||||||
|
Definition at line 957 of file sectsup.c. References ASSERT, CheckBothSection, MiCheckControlAreaStatus(), MiCleanSection(), MiHydra, NULL, _CONTROL_AREA::NumberOfMappedViews, TRUE, _CONTROL_AREA::u, and UNLOCK_PFN.
|
|
||||||||||||
|
Definition at line 1721 of file sectsup.c. References ExAllocatePoolWithTag, ExFreePool(), FALSE, FileName, KernelMode, MmSectionObjectType, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObQueryNameString(), ObReferenceObjectByHandle(), PagedPool, PSECTION, RtlUnicodeStringToAnsiString(), Status, TRUE, and xMAX_NAME. Referenced by DbgkCreateThread(), and DbgkpSectionHandleToFileHandle().
|
|
|
Referenced by MiMapViewOfImageSection(), and MmInitializeProcessAddressSpace(). |
|
|
|
|
|
Initial value:
Definition at line 56 of file sectsup.c. Referenced by MiSectionInitialization(), and MiSuperSectionInitialization(). |
|
|
Definition at line 42 of file sectsup.c. Referenced by MiCreateImageFileMap(), MiCreatePagingFileMap(), MiSectionInitialization(), and MmCreateSection(). |
|
|
Definition at line 30 of file sectsup.c. Referenced by MiFlushEventCounter(), MiFreeEventCounter(), MiGetEventCounter(), and MmInitSystem(). |
|
|
|
|
|
Definition at line 39 of file sectsup.c. Referenced by MiAllocatePoolPages(), MiRemoveUnusedSegments(), and MmResourcesAvailable(). |
1.3.7