ReactOS
0.4.15-dev-1623-g66cf1d2
|
#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 |
POBJECT_TYPE | MmSectionObjectType = NULL |
ULONG_PTR | MmSubsectionBase |
static ULONG | SectionCharacteristicsToProtect [16] |
ULONG | MmMakeFileAccess [] |
static GENERIC_MAPPING | MmpSectionMapping |
static PEXEFMT_LOADER | ExeFmtpLoaders [] |
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) | ) |
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 3136 of file section.c.
Referenced by ExeFmtpCreateImageSection().
NTSTATUS ExeFmtpCreateImageSection | ( | PFILE_OBJECT | FileObject, |
PMM_IMAGE_SECTION_OBJECT | ImageSectionObject | ||
) |
Definition at line 3581 of file section.c.
Referenced by MmCreateImageSection().
|
static |
Definition at line 3157 of file section.c.
Referenced by ExeFmtpCreateImageSection().
ACCESS_MASK NTAPI MiArm3GetCorrectFileAccessMask | ( | IN ACCESS_MASK | SectionPageProtection | ) |
Definition at line 140 of file section.c.
NTSTATUS NTAPI MiCopyFromUserPage | ( | PFN_NUMBER | DestPage, |
const VOID * | SrcAddress | ||
) |
Definition at line 1044 of file section.c.
Referenced by MmAccessFaultSectionView().
BOOLEAN MiIsPageFromCache | ( | PMEMORY_AREA | MemoryArea, |
LONGLONG | SegOffset | ||
) |
Definition at line 1022 of file section.c.
Referenced by MmPageOutSectionView().
NTSTATUS NTAPI MiMapViewInSystemSpace | ( | IN PVOID | Section, |
IN PVOID | Session, | ||
OUT PVOID * | MappedBase, | ||
IN OUT PSIZE_T | ViewSize | ||
) |
NTSTATUS NTAPI MiReadPage | ( | PMEMORY_AREA | MemoryArea, |
LONGLONG | SegOffset, | ||
PPFN_NUMBER | Page | ||
) |
Definition at line 1066 of file section.c.
Referenced by MmNotPresentFaultSectionView().
Definition at line 4899 of file section.c.
Referenced by MmUnmapViewInSystemSpace().
NTSTATUS NTAPI MiRosUnmapViewOfSection | ( | IN PEPROCESS | Process, |
IN PVOID | BaseAddress, | ||
IN BOOLEAN | SkipDebuggerNotify | ||
) |
Definition at line 4135 of file section.c.
Referenced by MiRosCleanupMemoryArea(), and MiUnmapViewOfSection().
NTSTATUS NTAPI MmAccessFaultSectionView | ( | PMMSUPPORT | AddressSpace, |
MEMORY_AREA * | MemoryArea, | ||
PVOID | Address | ||
) |
Definition at line 1795 of file section.c.
Referenced by MmpAccessFault().
|
static |
Definition at line 1280 of file section.c.
Referenced by MmNotPresentFaultSectionView(), and MmProtectSectionView().
BOOLEAN NTAPI MmCanFileBeTruncated | ( | IN PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
IN PLARGE_INTEGER | NewFileSize | ||
) |
Definition at line 4722 of file section.c.
Referenced by Ext2SetFileInformation(), Ext2SupersedeOrOverWriteFile(), FFSSetInformation(), FFSSupersedeOrOverWriteFile(), NtfsSetEndOfFile(), open_file2(), RfsdSetInformation(), RfsdSupersedeOrOverWriteFile(), 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 2432 of file section.c.
Referenced by MmCreateSection().
NTSTATUS NTAPI MmCreateDataFileSection | ( | PROS_SECTION_OBJECT * | SectionObject, |
ACCESS_MASK | DesiredAccess, | ||
POBJECT_ATTRIBUTES | ObjectAttributes, | ||
PLARGE_INTEGER | UMaximumSize, | ||
ULONG | SectionPageProtection, | ||
ULONG | AllocationAttributes, | ||
PFILE_OBJECT | FileObject | ||
) |
Definition at line 2911 of file section.c.
Referenced by MmCreateSection().
NTSTATUS MmCreateImageSection | ( | PROS_SECTION_OBJECT * | SectionObject, |
ACCESS_MASK | DesiredAccess, | ||
POBJECT_ATTRIBUTES | ObjectAttributes, | ||
PLARGE_INTEGER | UMaximumSize, | ||
ULONG | SectionPageProtection, | ||
ULONG | AllocationAttributes, | ||
PFILE_OBJECT | FileObject | ||
) |
Definition at line 3728 of file section.c.
Referenced by MmCreateSection().
NTSTATUS NTAPI MmCreatePageFileSection | ( | PROS_SECTION_OBJECT * | SectionObject, |
ACCESS_MASK | DesiredAccess, | ||
POBJECT_ATTRIBUTES | ObjectAttributes, | ||
PLARGE_INTEGER | UMaximumSize, | ||
ULONG | SectionPageProtection, | ||
ULONG | AllocationAttributes | ||
) |
Definition at line 2836 of file section.c.
Referenced by MmCreateSection().
Definition at line 2753 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 4973 of file section.c.
Referenced by CcpAllocateSection(), EngCreateSection(), EngCreateSectionHack(), EngLoadModuleEx(), InitGdiHandleTable(), IntGdiAddFontResourceEx(), MmCreatePhysicalMemorySection(), NtCreateSection(), TestCreateSection(), TestPhysicalMemorySection(), and UserCreateHeap().
BOOLEAN NTAPI MmFlushImageSection | ( | IN PSECTION_OBJECT_POINTERS | SectionObjectPointer, |
IN MMFLUSH_TYPE | FlushType | ||
) |
Definition at line 4796 of file section.c.
Referenced by _Requires_lock_held_(), Ext2CreateFile(), Ext2IsFileRemovable(), Ext2PurgeFile(), Ext2PurgeVolume(), FatSetRenameInfo(), FFSCreateFile(), FFSPurgeFile(), FFSPurgeVolume(), FFSSetDispositionInfo(), open_file2(), RfsdCreateFile(), RfsdPurgeFile(), RfsdPurgeVolume(), RfsdSetDispositionInfo(), RxCommonSetInformation(), RxPurgeFcbInSystemCache(), RxPurgeFobx(), RxPurgeNetFcb(), set_disposition_information(), UDFCloseAllXXXDelayedInDir(), UDFCommonCreate(), UDFMarkStreamsForDeletion(), UDFSetDispositionInformation(), VfatCreateFile(), vfatPrepareTargetForRename(), and VfatSetDispositionInformation().
|
static |
Definition at line 3968 of file section.c.
Referenced by MmUnmapViewOfSegment().
VOID NTAPI MmFreeSectionSegments | ( | PFILE_OBJECT | FileObject | ) |
Definition at line 805 of file section.c.
Referenced by CcRosDereferenceCache(), and CcRosReleaseFileCache().
Definition at line 2804 of file section.c.
Referenced by MmInitSystem().
NTSTATUS NTAPI MmMapViewInSystemSpace | ( | IN PVOID | SectionObject, |
OUT PVOID * | MappedBase, | ||
IN OUT PSIZE_T | ViewSize | ||
) |
Definition at line 4845 of file section.c.
Referenced by ExpInitNls(), IntGdiAddFontResourceEx(), and MmMapViewInSessionSpace().
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 2855 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 | ||
) |