16#define MODULE_INVOLVED_IN_ARM3
69 if (!
Process->Vm.Flags.SessionLeader)
142 BitmapSize = ((
Size + 31) / 32) *
sizeof(
ULONG);
184 if (
Process->Vm.Flags.SessionLeader == 1)
return 0;
188 if (!SessionGlobal)
return 0;
199 if (
Process->Vm.Flags.SessionLeader == 1)
return 0;
203 if (!SessionGlobal)
return -1;
363 if (ReferenceCount == 0)
371 if (
Process->Vm.Flags.SessionLeader)
444 NewProcess->Session = SessionGlobal;
490 AllocatedPageTable =
FALSE;
495 AllocatedPageTable =
TRUE;
507 if (AllocatedPageTable !=
FALSE)
603#if (_MI_PAGING_LEVELS < 3)
608 PMMPTE PointerPte, SessionPte;
630 DPRINT1(
"Lost session race\n");
638 if (NewFlags ==
Flags)
break;
647#if (_MI_PAGING_LEVELS < 3)
666 DPRINT1(
"Too many sessions created. Expansion not yet supported\n");
667#if (_MI_PAGING_LEVELS < 3)
714 if (!SessionPageDirIndex)
735 SessionPageDirIndex);
794 DPRINT1(
"Session %lu is ready to go: 0x%p 0x%p, %lx 0x%p\n",
830 ULONG SessionLeaderExists;
836 DPRINT1(
"Process already in session\n");
841 if (!
Process->Vm.Flags.SessionLeader)
845 if (SessionLeaderExists)
847 DPRINT1(
"Session leader race\n");
894 DPRINT1(
"Not in a session!\n");
899 if (!
Process->Vm.Flags.SessionLeader)
901 DPRINT1(
"Not a session leader!\n");
927 EntryProcess = SessionEntry;
935 EntrySession = EntryProcess->
Session;
940 CurrentSession = CurrentProcess->
Session;
963 if (CurrentSession == EntrySession)
966 EntryProcess = CurrentProcess;
995 EntryProcess = SessionEntry;
1003 EntrySession = EntryProcess->
Session;
1036 EntryProcess = SessionEntry;
1066 ListEntry = ListEntry->
Flink;
1076 SessionProcessLinks);
HARDWARE_PTE_ARMV6 TempPte
HARDWARE_PDE_ARMV6 TempPde
#define InterlockedIncrement
#define InterlockedDecrement
#define RtlInitializeBitMap
#define RtlFindClearBitsAndSet
#define NT_SUCCESS(StatCode)
#define _IRQL_requires_max_(irql)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeGetCurrentIrql()
#define InitializeListHead(ListHead)
#define ExInitializePushLock
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
VOID FASTCALL KeInitializeGuardedMutex(OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
#define PSF_PROCESS_IN_SESSION_BIT
#define PSF_SESSION_CREATION_UNDERWAY_BIT
#define InterlockedCompareExchange
#define KeLeaveCriticalRegion()
#define KeEnterCriticalRegion()
PFN_NUMBER MmLowestPhysicalPage
PFN_NUMBER MmHighestPhysicalPage
FORCEINLINE KIRQL MiAcquireExpansionLock(VOID)
FORCEINLINE BOOLEAN MI_IS_PHYSICAL_ADDRESS(IN PVOID Address)
#define MI_SESSION_TAG_PAGES_MAXIMUM
struct _MM_SESSION_SPACE * PMM_SESSION_SPACE
#define MI_SET_PFN_DELETED(x)
#define MI_IS_SESSION_ADDRESS(Address)
#define MI_GET_NEXT_COLOR()
PFN_NUMBER NTAPI MiRemoveAnyPage(IN ULONG Color)
VOID NTAPI MiReleaseSystemPtes(IN PMMPTE StartingPte, IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE SystemPtePoolType)
VOID NTAPI MiInitializePfnAndMakePteValid(IN PFN_NUMBER PageFrameIndex, IN PMMPTE PointerPte, IN MMPTE TempPte)
FORCEINLINE VOID MiReleaseExpansionLock(KIRQL OldIrql)
VOID NTAPI MiInitializePfnForOtherProcess(IN PFN_NUMBER PageFrameIndex, IN PVOID PteAddress, IN PFN_NUMBER PteFrame)
#define MI_INITIAL_SESSION_IDS
FORCEINLINE VOID MI_WRITE_VALID_PDE(IN PMMPDE PointerPde, IN MMPDE TempPde)
VOID NTAPI MiDecrementShareCount(IN PMMPFN Pfn1, IN PFN_NUMBER PageFrameIndex)
PMMPTE NTAPI MiReserveSystemPtes(IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE SystemPtePoolType)
BOOLEAN NTAPI MiInitializeSystemSpaceMap(IN PMMSESSION InputSession OPTIONAL)
FORCEINLINE VOID MI_WRITE_VALID_PTE(IN PMMPTE PointerPte, IN MMPTE TempPte)
FORCEINLINE PMMPFN MI_PFN_ELEMENT(IN PFN_NUMBER Pfn)
#define MI_SESSION_DATA_PAGES_MAXIMUM
FORCEINLINE PFN_NUMBER MiRemoveZeroPageSafe(IN ULONG Color)
BOOLEAN NTAPI MmIsAddressValid(IN PVOID VirtualAddress)
#define MiAddressToPte(x)
#define MiAddressToPde(x)
#define ExFreePoolWithTag(_P, _T)
VOID NTAPI MiZeroPhysicalPage(IN PFN_NUMBER PageFrameIndex)
LCID PsDefaultSystemLocaleId
LCID PsDefaultThreadLocaleId
#define MI_MAKE_DIRTY_PAGE(x)
#define MiPteToAddress(_Pte)
VOID FASTCALL KeZeroPages(IN PVOID Address, IN ULONG Size)
PFN_COUNT MmNumberOfPhysicalPages
_Out_ PKAPC_STATE ApcState
VOID NTAPI KeFlushEntireTb(IN BOOLEAN Invalid, IN BOOLEAN AllProcessors)
PETHREAD MiExpansionLockOwner
PFN_NUMBER MiSessionTagPages
NTSTATUS NTAPI MmSessionCreate(OUT PULONG SessionId)
BOOLEAN NTAPI MmIsSessionAddress(IN PVOID Address)
ULONG NTAPI MmGetSessionId(IN PEPROCESS Process)
VOID NTAPI MiReleaseProcessReferenceToSessionDataPage(IN PMM_SESSION_SPACE SessionGlobal)
VOID NTAPI MiSessionAddProcess(IN PEPROCESS NewProcess)
PFN_NUMBER MiSessionCreateCharge
PMM_SESSION_SPACE MmSessionSpace
NTSTATUS NTAPI MiSessionCreateInternal(OUT PULONG SessionId)
VOID NTAPI MiDereferenceSessionFinal(VOID)
ULONG NTAPI MmGetSessionIdEx(IN PEPROCESS Process)
PFN_NUMBER MiSessionBigPoolPages
PRTL_BITMAP MiSessionIdBitmap
VOID NTAPI MiInitializeSessionIds(VOID)
KGUARDED_MUTEX MiSessionIdMutex
KSPIN_LOCK MmExpansionLock
VOID NTAPI MmQuitNextSession(_Inout_ PVOID SessionEntry)
VOID NTAPI MiSessionLeader(IN PEPROCESS Process)
NTSTATUS NTAPI MmSessionDelete(IN ULONG SessionId)
PVOID NTAPI MmGetSessionById(_In_ ULONG SessionId)
NTSTATUS NTAPI MiSessionInitializeWorkingSetList(VOID)
VOID NTAPI MiSessionRemoveProcess(VOID)
LCID NTAPI MmGetSessionLocaleId(VOID)
VOID NTAPI MiDereferenceSession(VOID)
volatile LONG MiSessionLeaderExists
PFN_NUMBER MiSessionTagSizePages
LIST_ENTRY MmWorkingSetExpansionHead
LIST_ENTRY MiSessionWsList
PFN_NUMBER MiSessionDataPages
VOID NTAPI MiInitializeSessionWsSupport(VOID)
MMPTE ValidKernelPteLocal
MMPTE ValidKernelPdeLocal
#define STATUS_UNABLE_TO_FREE_VM
#define STATUS_ALREADY_COMMITTED
#define STATUS_PROCESS_IS_TERMINATING
#define STATUS_INVALID_SYSTEM_SERVICE
VOID NTAPI KeStackAttachProcess(IN PKPROCESS Process, OUT PRKAPC_STATE ApcState)
VOID NTAPI KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
#define PspClearProcessFlag(Process, Flag)
#define PspSetProcessFlag(Process, Flag)
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
LIST_ENTRY SessionProcessLinks
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
struct _MMPFN::@1805::@1811 e2
EX_PUSH_LOCK WorkingSetMutex
ULONG MinimumWorkingSetSize
ULONG MaximumWorkingSetSize
LIST_ENTRY WorkingSetExpansionLinks
PFN_NUMBER SessionPageDirectoryIndex
LONG ResidentProcessCount
struct _MM_SESSION_SPACE * GlobalVirtualAddress
MM_SESSION_SPACE_FLAGS Flags
union _MM_SESSION_SPACE::@1842 u
LONG ProcessReferenceToSession
PDRIVER_UNLOAD Win32KDriverUnload
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING _In_ PCUNICODE_STRING _In_ LCID LocaleId
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define ROUND_TO_PAGES(Size)
#define ObDereferenceObject
#define ObReferenceObject
#define PsGetCurrentProcess
#define RtlInterlockedClearBits(Flags, Flag)