Jérôme Gardou
59cddd15e2
[NTOS:MM] Implement MmFlushImageSection(MmFlushForDelete)
...
CORE-17544
2021-06-25 10:28:51 +02:00
Jérôme Gardou
bec42b6530
[NTOS:MM] Do not call ExAllocatePool* with PFN lock acquired
...
Unsurprisingly, it actually might acquire it
2021-06-25 10:28:51 +02:00
Serge Gautherie
eab2bb4b20
[NTOS:MM] MmFlushSegment(): Fix Iosb annotation
...
Addendum to 90c6a65
.
2021-06-22 10:33:45 +02:00
Jérôme Gardou
a5ea259b28
[NTOS:MM] Fix remnants of CORE-17587
2021-06-07 17:04:18 +02:00
Jérôme Gardou
3adf450867
[REACTOS] Addendum to 5c7ce4475e
- Fix MSVC 2015 build
...
Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes
CORE-17540
2021-05-12 11:04:29 +02:00
Jérôme Gardou
c48580135d
[NTOS:MM] Fix a bit page fault handler with regard to COW sections
2021-04-08 15:40:37 +02:00
Jérôme Gardou
43378411fb
[NTOS:MM] Rewrite arch-specifics of the legacy Mm
...
Properly handle PDE refcounting
Clean-up of the internal API
Enforce attaching to the process when modifying its memory layout, instead of
making circonvoluted mappings which always end up being broken.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
b445005c70
[NTOS:MM] Get rid of MmRosFlushVirtualMemory
...
It's not used anywhere now, and it will eventually be gone
2021-04-08 15:40:37 +02:00
Jérôme Gardou
9e121fb6c2
[NTOS:MM] Get rid of MmSetCleanAllRmaps and MmIsDirtyPageRmap
...
Everything is wrong with them. Bad locking. Bad logic.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
36a92e6ea5
[NTOS:MM] Fix a bit the page-out/page-in logic
...
- Do not lock the section segment when we are serving a fault for a process private page.
- Do not keep the process address space lock while writing to pagefile.
- Do not wait for an event that might never be set.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
0187c1e113
[NTOS:MM] Fix PFN tracing
2021-03-30 16:26:43 +02:00
Jérôme Gardou
a93e065ebc
[NTOS:MM] Do not chunk-read file when we are the modified-page-writer thread
2021-02-26 08:46:53 +01:00
Jérôme Gardou
35c091adaf
[NTOS:MM] Do not chunk-read files marked with FO_RANDOM_ACCESS
2021-02-26 08:46:53 +01:00
Jérôme Gardou
b7eb0fddf3
Address PR review
2021-02-03 09:41:24 +01:00
Jérôme Gardou
c0bf352069
[NTOS:MM] Fix regression of MmCanFileBeTruncated
2021-02-03 09:41:24 +01:00
Jérôme Gardou
2ba1926037
[NTOS:MM][NTOS:CC] Performance improvement again
...
Read files by 64kb chunks instead of page-sized chunks.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
41475dfcd7
[NTOS:CC] Performance improvements
...
Do not ditch the pages as soon as the section are unmapped
Improve MmBalancer "algorithm" (or whatever you call that)
Various needed fixes to get this going.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
ea354c4bc7
[NTOS:MM] Unconditionally purge cache on image section creation.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
c1c51e31e4
[NTOS:MM] Keep a ref on the segment when mapping a page & keep trace of what is the highest offset mapped.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
91a4e62376
[NTOS:MM] Improve MmCanFileBeTruncated
2021-02-03 09:41:23 +01:00
Jérôme Gardou
3e43aa1305
[NTOS:MM] Use 64-bit integer to count references on segments
2021-02-03 09:41:23 +01:00
Jérôme Gardou
90c6a65efe
[NTOS:MM] Introduce MmPurgeSegment & MmFlushSegment
...
Those will back CcFlushCache and CcPurgeCache.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
5949d5095d
[NTOS:CC][NTOS:MM] Try respecting ValidDataLength
2021-02-03 09:41:23 +01:00
Jérôme Gardou
e46f1a9af3
[NTOS:MM] Disable APC while performing Paged Read
2021-02-03 09:41:23 +01:00
Jérôme Gardou
caf89b9582
[NTOS:MM] Fix a race condition when unmapping sections views
2021-02-03 09:41:23 +01:00
Jérôme Gardou
cff3c399c6
[NTOS:MM] Fix input validation/correction in MmMapViewInSystemSpace
2021-02-03 09:41:23 +01:00
Jérôme Gardou
addf824d87
[NTOS:MM] Keep image maps & file maps coherent at the time of creating the image map
2021-02-03 09:41:23 +01:00
Jérôme Gardou
543112008a
Fix physical memory section creation
2021-02-03 09:41:22 +01:00
Jérôme Gardou
674ab3dce3
[NTOS:MM] Remove a check for now
2021-02-03 09:41:22 +01:00
Jérôme Gardou
1f796267bc
[NTOS:MM] Do not reference the section when mapping it.
...
Referencing the segment is enough.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
3c2b1bf59b
[NTOS:MM] Save the dirty bit when sharing a segment page
2021-02-03 09:41:22 +01:00
Jérôme Gardou
3141668724
[NTOS:MM] Various fixes.
...
Fix MmFlushImageSection behaviour
Remove an invalid ASSERT
2021-02-03 09:41:22 +01:00
Jérôme Gardou
30f71c7fc0
[NTOS] Zero data unconditionally after segment end, unless section is created with SEC_RESERVE
...
Use a SEC_RESERVE section in Cc
2021-02-03 09:41:22 +01:00
Jérôme Gardou
fb07802956
[NTOS:MM] Make the situation about dirty pages in image map a bit clearer
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d9f7459bb1
[NTOS:MM] Fix file object bad referencing
2021-02-03 09:41:22 +01:00
Jérôme Gardou
e39fc52d25
[NTOS/MM] Set FSRTL_MOD_WRITE_TOP_LEVEL_IRP top-level IRP when paging-out
2021-02-03 09:41:22 +01:00
Jérôme Gardou
f114209782
[NTOS/MM] Do not zero out the tail of the segment if the mapping is not an image
2021-02-03 09:41:22 +01:00
Jérôme Gardou
7d70af61e8
[NTOS:MM] Acquire file lock when creating section
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d2fa434cb7
[NTOSKRNL] Address issues raised in PR 3361 review
2021-02-03 09:41:22 +01:00
Jérôme Gardou
7dab3583cc
[NTOS/MM] Force flushing when the page is dirtified in user mode
2021-02-03 09:41:22 +01:00
Jérôme Gardou
91edefa11e
[NTOS:MM] Do not limit ourselves in reading or writing the file
2021-02-03 09:41:22 +01:00
Jérôme Gardou
774a4c703f
[NTOS/MM] Misc fixes
...
Purge data section object before creating an image mapping
Zero-out the tail of the page after reading from file
Properly map page as read-only when paging-in a COW memory map.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
0933337404
[NTOS/MM] Do not dirtify section pages for system-space maps
...
Cc does it for itself.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d440434a8e
[NTOS/MM] Do not error when FS returns STATUS_END_OF_FILE for paged read.
...
Also remove a seemingly invalid ASSERT
2021-02-03 09:41:22 +01:00
Jérôme Gardou
b46173edaf
[NTOS/MM] DO not assert when being passed invalid parameters in MmCreateSection
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d8cdb89fb0
[NTOSKRNL] Overhaul Cc and Mm relationship
...
Previously, when creating a file section, Mm requested Cc to cache the file, then Cc would request pages from Mm, then Mm would request them back to serve its file-mapping role
Now, Mm does it all by itself. If file cahcing is requested by the FS driver, then Cc creates a file mapping and uses that to serve its purpose.
This is a rewrite of Cc
2021-02-03 09:41:22 +01:00
Jérôme Gardou
e4047d1521
[NTOS/MM] Introduce MmArePagesResident and MmMakePagesResident
2021-02-03 09:41:22 +01:00
Jérôme Gardou
f1631b44e1
[NTOS/MM] Introduce MmMapViewInSystemSpaceEx
2021-02-03 09:41:22 +01:00
Jérôme Gardou
4f6fd6c42b
[NTOS/MM] Infer that the Memory Area is an image mapping from its VAD node
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c3bd70cfd1
[NTOSKRNL/MM] Fix a few wine tests
2021-02-03 09:41:21 +01:00