ReactOS 0.4.16-dev-106-g10b08aa
|
#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 988 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 2590 of file section.c.
Referenced by ExeFmtpCreateImageSection().
NTSTATUS ExeFmtpCreateImageSection | ( | PFILE_OBJECT | FileObject, |
PMM_IMAGE_SECTION_OBJECT | ImageSectionObject | ||
) |
Definition at line 3024 of file section.c.
Referenced by MmCreateImageSection().
|
static |
Definition at line 2610 of file section.c.
Referenced by ExeFmtpCreateImageSection().
|
static |
Definition at line 960 of file section.c.
Referenced by _When_().
if | ( | !IS_DIRTY_SSE(Entry) &&(SHARE_COUNT_FROM_SSE(Entry)==0) && | PageOut | ) |
Definition at line 5174 of file section.c.
if | ( | Entry | = = 0 | ) |
Definition at line 5038 of file section.c.
PMM_IMAGE_SECTION_OBJECT ImageSectionObjectFromSegment | ( | PMM_SECTION_SEGMENT | Segment | ) |
|
static |
Definition at line 1170 of file section.c.
Referenced by MmAccessFaultSectionView().
|
static |
Definition at line 90 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 4310 of file section.c.
Referenced by MmFlushImageSection().
Definition at line 4557 of file section.c.
Referenced by MmUnmapViewInSystemSpace().
NTSTATUS NTAPI MiRosUnmapViewOfSection | ( | IN PEPROCESS | Process, |
IN PVOID | BaseAddress, | ||
IN BOOLEAN | SkipDebuggerNotify | ||
) |
Definition at line 3589 of file section.c.
Referenced by MiRosCleanupMemoryArea(), and MiUnmapViewOfSection().
NTSTATUS NTAPI MiWritePage | ( | PMM_SECTION_SEGMENT | Segment, |
LONGLONG | SegOffset, | ||
PFN_NUMBER | Page | ||
) |
Definition at line 238 of file section.c.
Referenced by FreeSegmentPage().
NTSTATUS NTAPI MmAccessFaultSectionView | ( | PMMSUPPORT | AddressSpace, |
MEMORY_AREA * | MemoryArea, | ||
PVOID | Address, | ||
BOOLEAN | Locked | ||
) |
Definition at line 1910 of file section.c.
Referenced by MmpAccessFault().
|
static |
Definition at line 1446 of file section.c.
Referenced by MmAccessFaultSectionView(), MmNotPresentFaultSectionView(), and MmProtectSectionView().
Definition at line 4775 of file section.c.
Referenced by CcRosEnsureVacbResident().
BOOLEAN NTAPI MmCanFileBeTruncated | ( | _In_ PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
_In_opt_ PLARGE_INTEGER | NewFileSize | ||
) |
Definition at line 4255 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 2100 of file section.c.
Referenced by MmCreateSection().
|
static |
Definition at line 2327 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 3177 of file section.c.
Referenced by MmCreateSection().
Definition at line 2203 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 4620 of file section.c.
Referenced by CcpAllocateSection(), CcRosInitializeFileCache(), EngCreateSection(), EngCreateSectionHack(), EngLoadModuleEx(), InitGdiHandleTable(), IntGdiAddFontResourceEx(), NtCreateSection(), TestCreateSection(), TestPhysicalMemorySection(), and UserCreateHeap().
Definition at line 5268 of file section.c.
Referenced by CcSetFileSizes(), and NtExtendSection().
BOOLEAN NTAPI MmFlushImageSection | ( | IN PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
IN MMFLUSH_TYPE | FlushType | ||
) |
Definition at line 4356 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 4940 of file section.c.
Referenced by CcFlushCache(), CcRosDeleteFileCache(), CcRosFlushVacb(), and MiRosUnmapViewOfSection().
|
static |
Definition at line 3441 of file section.c.
Referenced by MmUnmapViewOfSegment().
Definition at line 2294 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 4920 of file section.c.
Referenced by CcRosEnsureVacbResident().
Definition at line 5197 of file section.c.
Referenced by CcCopyWrite(), CcSetDirtyPinnedData(), and CcZeroData().
|
static |
Definition at line 1192 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 4447 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 4460 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 2529 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 3996 of file section.c.