ReactOS
0.4.15-dev-4603-gb922b6d
|
#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] |
ULONG | MmMakeFileAccess [] |
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 990 of file section.c.
ASSERT | ( | Segment-> | Locked | ) |
Referenced by _MmUnlockSectionSegment(), _When_(), ExeFmtpCreateImageSection(), ExeFmtpReadFile(), FreeSegmentPage(), ImageSectionObjectFromSegment(), MiAddMappedPtes(), MiCheckControlArea(), MiCheckPurgeAndUpMapCount(), MiCopyFromUserPage(), MiCreateDataFileMap(), MiCreatePagingFileMap(), MiDeleteARM3Section(), MiFillSystemPageDirectory(), MiFlushTbAndCapture(), MiGetFileObjectForSectionAddress(), MiGetFileObjectForVad(), MiGrabDataSection(), MiInitializeSystemSpaceMap(), MiInsertInSystemSpace(), MiLocateSubsection(), MiMakeProtectionMask(), MiMapViewInSystemSpace(), MiMapViewOfDataSection(), MiPurgeImageSegment(), MiRemoveMappedPtes(), MiRemoveMappedView(), MiRosUnmapViewOfSection(), MiSegmentDelete(), MiSessionCommitPageTables(), MiSetControlAreaSymbolsLoaded(), MiSetProtectionOnSection(), MiSubsectionConsistent(), MiUnmapViewOfSection(), MmAccessFaultSectionView(), MmAlterViewAttributes(), MmArePagesResident(), MmCommitSessionMappedView(), MmCreateArm3Section(), MmCreateDataFileSection(), MmCreateImageSection(), MmFlushImageSection(), MmFlushSegment(), MmFreeSectionPage(), MmGetFileObjectForSection(), MmGetImageInformation(), MmInitSectionImplementation(), MmMakeDataSectionResident(), MmMakePagesDirty(), MmMakeSegmentResident(), MmMapViewInSessionSpace(), MmMapViewInSystemSpaceEx(), MmMapViewOfArm3Section(), MmMapViewOfSection(), MmMapViewOfSegment(), MmNotPresentFaultSectionView(), MmpDeleteSection(), MmProtectSectionView(), MmPurgeSegment(), MmspAssertSegmentsNoOverlap(), MmspAssertSegmentsPageAligned(), MmspAssertSegmentsSorted(), MmspCheckSegmentBounds(), MmspPageAlignSegments(), MmUnmapViewInSessionSpace(), MmUnsharePageEntrySectionSegment(), NtQuerySection(), and PeFmtCreateSection().
C_ASSERT | ( | EXEFMT_LOAD_HEADER_SIZE >= | sizeofIMAGE_DOS_HEADER | ) |
C_ASSERT | ( | sizeof(IMAGE_NT_HEADERS32)<=sizeof(IMAGE_NT_HEADERS64) | ) |
C_ASSERT | ( | TYPE_ALIGNMENT(IMAGE_NT_HEADERS32) | = =TYPE_ALIGNMENT(IMAGE_NT_HEADERS64) | ) |
C_ASSERT | ( | RTL_SIZEOF_THROUGH_FIELD(IMAGE_NT_HEADERS32, FileHeader) | = =RTL_SIZEOF_THROUGH_FIELD(IMAGE_NT_HEADERS64, FileHeader) | ) |
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, Magic) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, SectionAlignment) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, FileAlignment) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, Subsystem) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, MinorSubsystemVersion) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, MajorSubsystemVersion) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, AddressOfEntryPoint) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, SizeOfCode) | ) |
C_ASSERT | ( | PEFMT_FIELDS_EQUAL(IMAGE_OPTIONAL_HEADER32, IMAGE_OPTIONAL_HEADER64, SizeOfHeaders) | ) |
DPRINT | ( | "Checking segment for file %wZ at offset 0x%I64X.\n" | , |
&Segment->FileObject-> | FileName, | ||
Offset-> | QuadPart | ||
) |
Referenced by MiMapViewOfDataSection(), MiQueryMemorySectionName(), MiRemoveMappedPtes(), MiRosUnmapViewInSystemSpace(), MiRosUnmapViewOfSection(), MiSegmentDelete(), MmAccessFaultSectionView(), MmCanFileBeTruncated(), MmFlushImageSection(), MmGetFileNameForAddress(), MmInitSectionImplementation(), MmMakePagesDirty(), MmMapViewInSystemSpaceEx(), MmMapViewOfSection(), MmNotPresentFaultSectionView(), MmpCloseSection(), MmpDeleteSection(), and NtMapViewOfSection().
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 2557 of file section.c.
Referenced by ExeFmtpCreateImageSection().
NTSTATUS ExeFmtpCreateImageSection | ( | PFILE_OBJECT | FileObject, |
PMM_IMAGE_SECTION_OBJECT | ImageSectionObject | ||
) |
Definition at line 2991 of file section.c.
Referenced by MmCreateImageSection().
|
static |
Definition at line 2577 of file section.c.
Referenced by ExeFmtpCreateImageSection().
|
static |
Definition at line 962 of file section.c.
Referenced by _When_().
if | ( | Entry | = = 0 | ) |
Definition at line 4933 of file section.c.
Referenced by MmExtendSection(), MmMapViewInSystemSpaceEx(), MmpDeleteSection(), NtQuerySection(), and PeFmtCreateSection().
if | ( | !IS_DIRTY_SSE(Entry) &&(SHARE_COUNT_FROM_SSE(Entry)==0) && | PageOut | ) |
Definition at line 5030 of file section.c.
PMM_IMAGE_SECTION_OBJECT ImageSectionObjectFromSegment | ( | PMM_SECTION_SEGMENT | Segment | ) |
Definition at line 121 of file section.c.
Referenced by MiRosUnmapViewOfSection().
ACCESS_MASK NTAPI MiArm3GetCorrectFileAccessMask | ( | IN ACCESS_MASK | SectionPageProtection | ) |
Definition at line 140 of file section.c.
|
static |
Definition at line 1172 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 4200 of file section.c.
Referenced by MmFlushImageSection().
Definition at line 4447 of file section.c.
Referenced by MmUnmapViewInSystemSpace().
NTSTATUS NTAPI MiRosUnmapViewOfSection | ( | IN PEPROCESS | Process, |
IN PVOID | BaseAddress, | ||
IN BOOLEAN | SkipDebuggerNotify | ||
) |
Definition at line 3556 of file section.c.
Referenced by MiRosCleanupMemoryArea(), and MiUnmapViewOfSection().
NTSTATUS NTAPI MiWritePage | ( | PMM_SECTION_SEGMENT | Segment, |
LONGLONG | SegOffset, | ||
PFN_NUMBER | Page | ||
) |
Definition at line 240 of file section.c.
Referenced by FreeSegmentPage().
NTSTATUS NTAPI MmAccessFaultSectionView | ( | PMMSUPPORT | AddressSpace, |
MEMORY_AREA * | MemoryArea, | ||
PVOID | Address, | ||
BOOLEAN | Locked | ||
) |
Definition at line 1892 of file section.c.
Referenced by MmpAccessFault().
|
static |
Definition at line 1440 of file section.c.
Referenced by MmAccessFaultSectionView(), MmNotPresentFaultSectionView(), and MmProtectSectionView().
Definition at line 4665 of file section.c.
Referenced by CcRosEnsureVacbResident().
BOOLEAN NTAPI MmCanFileBeTruncated | ( | IN PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
IN PLARGE_INTEGER | NewFileSize | ||
) |
Definition at line 4152 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 2486 of file section.c.
Referenced by MmCreateSection().
|
static |
Definition at line 2294 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 3144 of file section.c.
Referenced by MmCreateSection().
Definition at line 2170 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 4510 of file section.c.
Referenced by CcpAllocateSection(), CcRosInitializeFileCache(), EngCreateSection(), EngCreateSectionHack(), EngLoadModuleEx(), InitGdiHandleTable(), IntGdiAddFontResourceEx(), NtCreateSection(), TestCreateSection(), TestPhysicalMemorySection(), and UserCreateHeap().
Definition at line 5124 of file section.c.
Referenced by CcSetFileSizes(), and NtExtendSection().
BOOLEAN NTAPI MmFlushImageSection | ( | IN PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
IN MMFLUSH_TYPE | FlushType | ||
) |
Definition at line 4246 of file section.c.
Referenced by _Requires_lock_held_(), Ext2CreateFile(),