ReactOS 0.4.15-dev-6054-gbddd8b0
|
#include <ntoskrnl.h>
#include <cache/newcc.h>
#include <cache/section/newmm.h>
#include <debug.h>
#include <reactos/exeformat.h>
#include "ARM3/miarm.h"
Go to the source code of this file.
Classes | |
struct | MM_SECTION_PAGEOUT_CONTEXT |
Macros | |
#define | NDEBUG |
#define | MmSetPageEntrySectionSegment(S, O, E) |
#define | DIE(ARGS_) { DPRINT ARGS_; goto l_Return; } |
Variables | |
MMSESSION | MmSession |
static LARGE_INTEGER | TinyTime = {{-1L, -1L}} |
KEVENT | MmWaitPageEvent |
POBJECT_TYPE | MmSectionObjectType = NULL |
ULONG_PTR | MmSubsectionBase |
static ULONG | SectionCharacteristicsToProtect [16] |
ACCESS_MASK | MmMakeFileAccess [8] |
static GENERIC_MAPPING | MmpSectionMapping |
static PEXEFMT_LOADER | ExeFmtpLoaders [] |
PLARGE_INTEGER | Offset |
PLARGE_INTEGER BOOLEAN | ForceDirty |
PLARGE_INTEGER BOOLEAN BOOLEAN | PageOut |
NTSTATUS | Status |
PFN_NUMBER | Page |
Entry = MmGetPageEntrySectionSegment(Segment, Offset) | |
return | FALSE |
_Requires_exclusive_lock_held_ | ( | Segment-> | Lock | ) |
_When_ | ( | OldIrql | = = MM_NOIRQL , |
_IRQL_requires_max_(DISPATCH_LEVEL) | |||
) |
Definition at line 989 of file section.c.
ASSERT | ( | Segment-> | Locked | ) |
C_ASSERT | ( | EXEFMT_LOAD_HEADER_SIZE >= | sizeofIMAGE_DOS_HEADER | ) |
C_ASSERT | ( | FIELD_OFFSET(IMAGE_NT_HEADERS32, OptionalHeader) | = =FIELD_OFFSET(IMAGE_NT_HEADERS64, OptionalHeader) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, FileAlignment) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, Magic) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, SectionAlignment) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, SizeOfCode) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, SizeOfHeaders) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, Subsystem) | ) |
C_ASSERT | ( | RTL_SIZEOF_THROUGH_FIELD(IMAGE_NT_HEADERS32, FileHeader) | = =RTL_SIZEOF_THROUGH_FIELD(IMAGE_NT_HEADERS64, FileHeader) | ) |
C_ASSERT | ( | sizeof(IMAGE_NT_HEADERS32)<=sizeof(IMAGE_NT_HEADERS64) | ) |
C_ASSERT | ( | TYPE_ALIGNMENT(IMAGE_NT_HEADERS32) | = =TYPE_ALIGNMENT(IMAGE_NT_HEADERS64) | ) |
DPRINT | ( | "Checking segment for file %wZ at offset 0x%I64X.\n" | , |
&Segment->FileObject-> | FileName, | ||
Offset-> | QuadPart | ||
) |
NTSTATUS NTAPI ElfFmtCreateSection | ( | IN CONST VOID * | FileHeader, |
IN SIZE_T | FileHeaderSize, | ||
IN PVOID | File, | ||
OUT PMM_IMAGE_SECTION_OBJECT | ImageSectionObject, | ||
OUT PULONG | Flags, | ||
IN PEXEFMT_CB_READ_FILE | ReadFileCb, | ||
IN PEXEFMT_CB_ALLOCATE_SEGMENTS | AllocateSegmentsCb | ||
) |
|
static |
Definition at line 2568 of file section.c.
Referenced by ExeFmtpCreateImageSection().
NTSTATUS ExeFmtpCreateImageSection | ( | PFILE_OBJECT | FileObject, |
PMM_IMAGE_SECTION_OBJECT | ImageSectionObject | ||
) |
Definition at line 3002 of file section.c.
Referenced by MmCreateImageSection().
|
static |
Definition at line 2588 of file section.c.
Referenced by ExeFmtpCreateImageSection().
|
static |
Definition at line 961 of file section.c.
Referenced by _When_().
if | ( | !IS_DIRTY_SSE(Entry) &&(SHARE_COUNT_FROM_SSE(Entry)==0) && | PageOut | ) |
Definition at line 5138 of file section.c.
if | ( | Entry | = = 0 | ) |
Definition at line 5002 of file section.c.
PMM_IMAGE_SECTION_OBJECT ImageSectionObjectFromSegment | ( | PMM_SECTION_SEGMENT | Segment | ) |
|
static |
Definition at line 1171 of file section.c.
Referenced by MmAccessFaultSectionView().
|
static |
Definition at line 91 of file section.c.
Referenced by MmCanFileBeTruncated(), MmFlushSegment(), MmMakeDataSectionResident(), and MmPurgeSegment().
NTSTATUS MiMapViewInSystemSpace | ( | IN PVOID | Section, |
IN PVOID | Session, | ||
OUT PVOID * | MappedBase, | ||
IN OUT PSIZE_T | ViewSize, | ||
IN PLARGE_INTEGER | SectionOffset | ||
) |
|
static |
Definition at line 4269 of file section.c.
Referenced by MmFlushImageSection().
Definition at line 4516 of file section.c.
Referenced by MmUnmapViewInSystemSpace().
NTSTATUS NTAPI MiRosUnmapViewOfSection | ( | IN PEPROCESS | Process, |
IN PVOID | BaseAddress, | ||
IN BOOLEAN | SkipDebuggerNotify | ||
) |
Definition at line 3567 of file section.c.
Referenced by MiRosCleanupMemoryArea(), and MiUnmapViewOfSection().
NTSTATUS NTAPI MiWritePage | ( | PMM_SECTION_SEGMENT | Segment, |
LONGLONG | SegOffset, | ||
PFN_NUMBER | Page | ||
) |
Definition at line 239 of file section.c.
Referenced by FreeSegmentPage().
NTSTATUS NTAPI MmAccessFaultSectionView | ( | PMMSUPPORT | AddressSpace, |
MEMORY_AREA * | MemoryArea, | ||
PVOID | Address, | ||
BOOLEAN | Locked | ||
) |
Definition at line 1891 of file section.c.
Referenced by MmpAccessFault().
|
static |
Definition at line 1439 of file section.c.
Referenced by MmAccessFaultSectionView(), MmNotPresentFaultSectionView(), and MmProtectSectionView().
Definition at line 4734 of file section.c.
Referenced by CcRosEnsureVacbResident().
BOOLEAN NTAPI MmCanFileBeTruncated | ( | _In_ PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
_In_opt_ PLARGE_INTEGER | NewFileSize | ||
) |
Definition at line 4214 of file section.c.
Referenced by Ext2SetFileInformation(), Ext2SupersedeOrOverWriteFile(), NtfsSetEndOfFile(), open_file2(), RxCommonSetInformation(), set_end_of_file_information(), SetAttributeDataLength(), UDFCommonCreate(), UDFSetAllocationInformation(), UDFSetEOF(), VfatSetAllocationSizeInformation(), and VfatSetInformation().
NTSTATUS NTAPI MmCreateArm3Section | ( | OUT PVOID * | SectionObject, |
IN ACCESS_MASK | DesiredAccess, | ||
IN POBJECT_ATTRIBUTES ObjectAttributes | OPTIONAL, | ||
IN PLARGE_INTEGER | InputMaximumSize, | ||
IN ULONG | SectionPageProtection, | ||
IN ULONG | AllocationAttributes, | ||
IN HANDLE FileHandle | OPTIONAL, | ||
IN PFILE_OBJECT FileObject | OPTIONAL | ||
) |
Definition at line 2468 of file section.c.
Referenced by MmCreateSection().
|
static |
Definition at line 2305 of file section.c.
Referenced by MmCreateSection().
NTSTATUS MmCreateImageSection | ( | PSECTION * | SectionObject, |
ACCESS_MASK | DesiredAccess, | ||
POBJECT_ATTRIBUTES | ObjectAttributes, | ||
PLARGE_INTEGER | UMaximumSize, | ||
ULONG | SectionPageProtection, | ||
ULONG | AllocationAttributes, | ||
PFILE_OBJECT | FileObject | ||
) |
Definition at line 3155 of file section.c.
Referenced by MmCreateSection().
Definition at line 2181 of file section.c.
Referenced by MmInitSectionImplementation().
NTSTATUS NTAPI MmCreateSection | ( | OUT PVOID * | Section, |
IN ACCESS_MASK | DesiredAccess, | ||
IN POBJECT_ATTRIBUTES ObjectAttributes | OPTIONAL, | ||
IN PLARGE_INTEGER | MaximumSize, | ||
IN ULONG | SectionPageProtection, | ||
IN ULONG | AllocationAttributes, | ||
IN HANDLE FileHandle | OPTIONAL, | ||
IN PFILE_OBJECT FileObject | OPTIONAL | ||
) |
Definition at line 4579 of file section.c.
Referenced by CcpAllocateSection(), CcRosInitializeFileCache(), EngCreateSection(), EngCreateSectionHack(), EngLoadModuleEx(), InitGdiHandleTable(), IntGdiAddFontResourceEx(), NtCreateSection(), TestCreateSection(), TestPhysicalMemorySection(), and UserCreateHeap().
Definition at line 5232 of file section.c.
Referenced by CcSetFileSizes(), and NtExtendSection().
BOOLEAN NTAPI MmFlushImageSection | ( | IN PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
IN MMFLUSH_TYPE | FlushType | ||
) |
Definition at line 4315 of file section.c.
Referenced by _Requires_lock_held_(), Ext2CreateFile(), Ext2IsFileRemovable(), Ext2PurgeFile(), Ext2PurgeVolume(), FatSetRenameInfo(), open_file3(), RxCommonSetInformation(), RxPurgeFcbInSystemCache(), RxPurgeFobx(), RxPurgeNetFcb(), set_disposition_information(), UDFCloseAllXXXDelayedInDir(), UDFCommonCreate(), UDFMarkStreamsForDeletion(), UDFSetDispositionInformation(), VfatCreateFile(), vfatPrepareTargetForRename(), and VfatSetDispositionInformation().
NTSTATUS NTAPI MmFlushSegment | ( | _In_ PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
_In_opt_ PLARGE_INTEGER | Offset, | ||
_In_ ULONG | Length, | ||
_Out_opt_ PIO_STATUS_BLOCK | Iosb | ||
) |
Definition at line 4899 of file section.c.
Referenced by CcFlushCache(), CcRosDeleteFileCache(), CcRosFlushVacb(), and MiRosUnmapViewOfSection().
|
static |
Definition at line 3419 of file section.c.
Referenced by MmUnmapViewOfSegment().
Definition at line 2272 of file section.c.
Referenced by MmInitSystem().
NTSTATUS NTAPI MmMakeDataSectionResident | ( | _In_ PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
_In_ LONGLONG | Offset, | ||
_In_ ULONG | Length, | ||
_In_ PLARGE_INTEGER | ValidDataLength | ||
) |
Definition at line 4879 of file section.c.
Referenced by CcRosEnsureVacbResident().
Definition at line 5161 of file section.c.
Referenced by CcCopyWrite(), CcSetDirtyPinnedData(), and CcZeroData().
|
static |
Definition at line 1193 of file section.c.
Referenced by MmMakeDataSectionResident(), and MmNotPresentFaultSectionView().
NTSTATUS NTAPI MmMapViewInSystemSpace | ( | IN PVOID | SectionObject, |
OUT PVOID * | MappedBase, | ||
IN OUT PSIZE_T | ViewSize | ||
) |
Definition at line 4406 of file section.c.
Referenced by ExpInitNls(), IntGdiAddFontResourceEx(), and MmMapViewInSessionSpace().
NTSTATUS NTAPI MmMapViewInSystemSpaceEx | ( | _In_ PVOID | SectionObject, |
_Outptr_result_bytebuffer_ *ViewSize PVOID * | MappedBase, | ||
_Inout_ PSIZE_T | ViewSize, | ||
_Inout_ PLARGE_INTEGER | SectionOffset, | ||
_In_ ULONG_PTR | Flags | ||
) |
Definition at line 4419 of file section.c.
Referenced by CcRosCreateVacb(), and MmMapViewInSystemSpace().
NTSTATUS NTAPI MmMapViewOfArm3Section | ( | IN PVOID | SectionObject, |
IN PEPROCESS | Process, | ||
IN OUT PVOID * | BaseAddress, | ||
IN ULONG_PTR | ZeroBits, | ||
IN SIZE_T | CommitSize, | ||
IN OUT PLARGE_INTEGER SectionOffset | OPTIONAL, | ||
IN OUT PSIZE_T | ViewSize, | ||
IN SECTION_INHERIT | InheritDisposition, | ||
IN ULONG | AllocationType, | ||
IN ULONG | Protect | ||
) |
Definition at line 2896 of file section.c.
Referenced by MmMapViewOfSection().
NTSTATUS NTAPI MmMapViewOfSection | ( | IN PVOID | SectionObject, |
IN PEPROCESS | Process, | ||
IN OUT PVOID * | BaseAddress, | ||
IN ULONG_PTR | ZeroBits, | ||
IN SIZE_T | CommitSize, | ||
IN OUT PLARGE_INTEGER SectionOffset | OPTIONAL, | ||
IN OUT PSIZE_T | ViewSize, | ||
IN SECTION_INHERIT | InheritDisposition, | ||
IN ULONG | AllocationType, | ||
IN ULONG | Protect | ||
) |
Definition at line 3968 of file section.c.