Jérôme Gardou
b3e9c89725
[NTOS:MM] Simplify refcounting when adding/deleting a page in a shared segment
...
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
Jérôme Gardou
c6e9fea844
[NTOSKRNL] Deduplicate some symbols
2021-06-24 18:48:31 +02:00
Jérôme Gardou
1c5ce8d11c
[NTOS:MM] Fix-up call site of traced PFNs when serving a page fault
2021-06-24 18:48:31 +02:00
Jérôme Gardou
146337cc50
[NTOS:MM] Save caller address when tracing PFNs
2021-06-24 18:48:31 +02:00
Jérôme Gardou
c8ce0cc434
[NTOS:MM] Fix one occurrence of MiDeletePte instead of MiDeletePde
2021-06-22 12:05:20 +02:00
Serge Gautherie
eab2bb4b20
[NTOS:MM] MmFlushSegment(): Fix Iosb annotation
...
Addendum to 90c6a65
.
2021-06-22 10:33:45 +02:00
Timo Kreuzer
396167bc7e
[NTOS:MM] Improve an ASSERT
2021-06-19 12:17:18 +02:00
Timo Kreuzer
33949028fb
[NTOS:MM] Fix PFN lock usage
2021-06-19 12:17:18 +02:00
Victor Perevertkin
3f601122bc
[NTOS:MM] Fix placing entries into MmNonPagedPoolFreeListHead
...
When freeing pages, free page entries with pages num == 3 were
incorrectly treated as entries with pages num >= 4 and thus
their re-insertion was not triggered. That lead to non paged pool
fragmentation (can be triggered by kmtest:ExPools, for example)
Also, altered the index acquisition code for MmNonPagedPoolFreeList
entries so it looks more clear
2021-06-16 12:14:27 +02:00
Victor Perevertkin
34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces
2021-06-11 15:33:08 +03:00
Jérôme Gardou
afc27ab1aa
[NTOS:MM] Handle PT references for page table faults in MmAccessFault
...
Idea from Timo Kreuzer
2021-06-09 11:27:18 +02:00
Jérôme Gardou
c7e09061ca
[NTOS:MM] Get rid of MiQueryPageTableReferences
2021-06-09 11:27:18 +02:00
Timo Kreuzer
6a2eeaa5ae
[NTOS] Implement MiIsPageTablePresent as a replacement for the abused MiQueryPageTableReferences
2021-06-09 11:27:18 +02:00
Jérôme Gardou
678923bf4b
[NTOS:MM] In MiMakePdeExistAndValid, do not overly check PDE validity
...
It's "okay" to not #ifdef, but it's useless and confusing.
2021-06-09 11:27:18 +02:00
Jérôme Gardou
c8fb3f7514
[NTOS:MM] Implement proper refcounting of page tables on amd64
...
CORE-17552
2021-06-09 11:27:18 +02:00
Jérôme Gardou
3aa346c21f
[NTOS:MM] Make MiIsEntireRangeCommitted 64-bits aware
2021-06-09 11:27:18 +02:00
Jérôme Gardou
8bfba59b3e
[NTOS:MM] Add some DPRINTs when incrementing or decrementing PFN share count
2021-06-09 11:27:18 +02:00
Jérôme Gardou
a80ae8f2ea
[NTOS:MM] Make MiCalculatePageCommitment 64-bits aware
2021-06-09 11:27:18 +02:00
Jérôme Gardou
ed1038ff9c
[NTOS:MM] Properly initialize initial process address space on amd64
...
By applying the same kludge on the relevant MMPFNs than on x86
2021-06-09 11:27:18 +02:00
Jérôme Gardou
f9ea58dc97
[NTOS:MM] Unconditionally delete the PFN in MiDeletePte when PTE is in transition
...
When we will have a modified page writer, it will have to know if the written
page is stale when being done, and act accordingly.
CORE-8552
2021-06-09 11:27:18 +02:00
Jérôme Gardou
82dd1afe33
[NTOS:MM] Remove some dead code from legacy Mm
2021-06-09 11:27:18 +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
4ddc66f224
[NTOS:MM] Make MI_MAKE_HARDWARE_PTE_KERNEL actually respect the protection it is given
...
This one would set a page as writable & dirty even if MM_READONLY was passed
CORE-17587
2021-06-07 17:04:18 +02:00
Hervé Poussineau
831cad3410
[NTOS:MM] Remove wrong cleaning of PDEs at session cleanup
2021-05-25 21:13:32 +02:00
Hervé Poussineau
98882fb089
[NTOS:MM] Finish implementation of MmSessionDelete
2021-05-25 18:48:16 +02:00
Hervé Poussineau
eac0afc6fe
[NTOS:MM] MiDereferenceSession: return as soon as session is destroyed
...
This leads to some simplifications in the following code.
2021-05-25 18:48:16 +02:00
Jérôme Gardou
7eff8a36d5
Revert "[NTOS:MM] Add private pages to process working sets"
...
This is so full of bugs, I don't know what to say.
This reverts commit 374fef2d59
.
2021-05-20 00:19:43 +02:00
Jérôme Gardou
969e60a06d
[NTOS:MM] Move software PTE specific check after it's been tested for being one
...
Caught by The_DarkFire, only soul on earth actually *running* our SMP kernel
2021-05-19 23:56:21 +02:00
Jérôme Gardou
7d0d14965e
[NTOS:MM] Do not map Process Working Set List in kernel space
...
This is not needed anymore and causes havoc on amd64
2021-05-19 23:17:27 +02:00
Jérôme Gardou
826aec48de
[NTOS:MM] Fix build on whatever MSVC version triggered this
...
There is no real need to put static or extern "C" function in a special namespace anyway
2021-05-19 00:12:05 +02:00
Jérôme Gardou
374fef2d59
[NTOS:MM] Add private pages to process working sets
2021-05-18 23:42:19 +02:00
Jérôme Gardou
6a5fd8f487
[NTOS:MM] Relax requirements with regards to PFN lock when adding & removing entries in Working Sets
...
Once a page is used, holding the WS lock is enough until you want to free it.
2021-05-18 23:42:19 +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
f421bccbcc
[NTOS:MM] First shot for Working Set list support
...
- Initialize
- Add private page (no shared page support yet)
- Remove pages
- Trim
Yes, this is C++ in the kernel.
2021-05-04 12:02:41 +02:00
Jérôme Gardou
31afbf1054
[NTOS] Make some internal headers C++ aware
2021-05-04 12:02:41 +02:00
Jérôme Gardou
8df48f9876
[NTOS:MM] Introduce MI_IS_PROCESS_WORKING_SET helper function
2021-05-04 12:02:41 +02:00
Jérôme Gardou
6b2f05f9dd
[NTOS:MM] Implement turning working set shared lock to exclusive
2021-05-04 12:02:41 +02:00
Jérôme Gardou
cd085ac12f
[NTOS/MM] Implement Mi(Un)lockWorkingSetShared
...
Also fix checks when exclusively locking
2021-05-04 12:02:41 +02:00
Serge Gautherie
710acab83d
[NTOS:MM] MiSetPagingOfDriver(): Add an explicit #if around unreachable code
2021-04-26 10:27:20 +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
a34d9bcfb6
[NTOS:MM] Share "page.c" between i386 & amd64 builds
2021-04-08 15:40:37 +02:00
Jérôme Gardou
7ea8312617
[NTOS:MM] Split MmCreateProcessAddressSpace in two parts
...
Generic one and arch-specific one.
Properly fail if we are out of resources.
Restore a lost assert.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
6c027d28f9
[NTOS:MM] Properly track system process hyper space PDE page
2021-04-08 15:40:37 +02:00
Jérôme Gardou
370982aa1d
[NTOS:MM] Make i386/page.c usable for all x86 variants
...
This includes PAE & amd64
2021-04-08 15:40:37 +02:00
Jérôme Gardou
b10d92a16c
[NTOS:MM] Use MI_MAKE_HARDWARE_PTE & friends in legacy Mm
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
7bffb92099
[NTOS:MM] Let ARM3 handle invalid PDE for itself.
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
82c908195c
Revert "[NTOS:MM] Allow MiMapPageInHyperSpace to be called from DISPATCH_LEVEL"
...
This reverts commit 8404d1a6ff
.
Not ready for prime time, sorry.
2021-04-07 23:26:44 +02:00
Jérôme Gardou
8404d1a6ff
[NTOS:MM] Allow MiMapPageInHyperSpace to be called from DISPATCH_LEVEL
...
Also annotate it to show its behaviour.
2021-04-07 23:09:26 +02:00
Oleg Dubinskiy
52f4d8019b
[NTOS:MM][NTOS:SE] Mute some noisy stubs
...
Mute debug prints of MmDoesFileHaveUserWritableReferences and SeAuditingFileEventsWithContext stubs.
These stubs are very noisy and create a lot of spam in the log when using Microsoft NTFS driver in ReactOS (with some other improvements applied).
Implementing those functions isn't badly required for the proper work of this driver, so better way for now is just mute these stubs a bit.
After my changes, they will be displayed only once, and the log will be more clear, so it will seem to be enough to understand that the driver calls these routines.
CORE-17409
2021-04-07 13:16:03 +02:00
Mark Jansen
5e928e5c92
[NTOS:MM] Stubplement cookie generation for drivers
2021-04-03 18:08:53 +02:00
Jérôme Gardou
998870c5ea
[NTOS:MM] Properly fail for invalid sizes of data section mappings
2021-03-30 22:20:15 +02:00
Jérôme Gardou
4c731adc04
[NTOS:MM] Fix compilation when PFN tracing is enabled
2021-03-30 17:22:09 +02:00
Jérôme Gardou
80f8beeeee
[NTOS/MM] Remove an outdated check
2021-03-30 17:13:19 +02:00
Jérôme Gardou
0187c1e113
[NTOS:MM] Fix PFN tracing
2021-03-30 16:26:43 +02:00
Jérôme Gardou
d1d1260f5f
[NTOS:MM] Fix integer arithmetics
2021-03-22 10:02:12 +01:00
Jérôme Gardou
42094071ee
[NTOS:MM] Silence noisy DPRINTs
2021-03-18 12:24:21 +01:00
Jérôme Gardou
4ff5d39edb
[NTOS:MM] Use a define for the big pool table occupation rate
2021-03-18 12:24:21 +01:00
Jérôme Gardou
8494688eeb
[NTOS:MM] Do not use atomic operations to set a bit while holding a lock.
...
Saving your fingers from typing it doesn't make it better code.
2021-03-18 12:24:21 +01:00
Jérôme Gardou
f06b58925d
[NTOS:MM] Implement shrinking big pool allocation table
...
Shrink when using 1/8 of its allocated capacity (thus use 25% of it at the end of the process)
Expand when using 3/4 of its allocated capacity (thus use ~40% of it at the end of the process)
2021-03-18 12:24:21 +01:00
Jérôme Gardou
54354712e2
[NTOS:MM] Fail allocating non-paged pool when running out of available pages
2021-03-18 12:24:21 +01:00
Jérôme Gardou
34630a06ca
[NTOS:MM] Do not bugcheck when we are freeing a big allocation for which we didn't manage to insert the tag
2021-03-18 12:24:21 +01:00
Jérôme Gardou
d5fa0788d8
[NTOS:MM] Silence a DPRINT which became noisy
2021-03-16 13:23:21 +01: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
Timo Kreuzer
4b4bff0642
[NTOS:MM] Handle demand zero PTEs with MM_EXECUTE_READWRITE and MM_READWRITE
2021-02-16 18:02:57 +01:00
Jérôme Gardou
0573de22a0
[NTOS:MM] Do not assert on a case we actually support
2021-02-10 17:48:30 +01:00
Jérôme Gardou
73fd52a164
[NTOS:MM] Flush dirty pages after closing the page files.
...
CORE-17462
2021-02-10 11:14:19 +01:00
Victor Perevertkin
b705df731e
[NTOS:MM][FASTFAT_NEW] Fix DBG usage, fixes Release build
2021-02-05 11:54:10 +03:00
Jérôme Gardou
6f2b94c023
[NTOS:MM] Wake up the balancer as soon as we are low on page.
...
Fixes installing on a system with 64MB of RAM, if you feel like it.
2021-02-03 13:42:39 +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
7f7abc9838
[NTOS:MM] Simplify code & fix MSVC x64 build
2021-02-03 09:41:23 +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
625f273361
[NTOS:MM] More fine-tuning of the memory balancer
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
8a8b4db447
[NTOS:MM] Make the page LRU list a real LRU list.
...
Also, implement flushing mapped sections to disk on shutdown.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
3efc5b1734
[NTOS:MM] Fix unlocking on failure path
2021-02-03 09:41:23 +01:00
Jérôme Gardou
f201b8af78
[NTOS:MM] Do not acquire Pfn lock in MmGetRmapListHead
...
All callers already hold it
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
8ed15a49a7
[NTOS:MM] Fix a race
2021-02-03 09:41:23 +01:00
Jérôme Gardou
11eee4eeec
[NTOS:MM] Check that we don't add rmap for NULL process
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
aab24ed1b1
[NTOS:MM] Have the legacy Mm be less greedy about the number of pages it wants
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
ba49c39041
[NTOS/MM] Assert there are no RMAP left before freeing the page
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d932bdb950
[NTOS:MM] Fix locking when paging out
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
Jérôme Gardou
4abda863ce
[NTOSKRNL/MM] Reduce use of MiIsRosSectionObject
2021-02-03 09:41:21 +01:00
Jérôme Gardou
b7d988ae5b
[NTOSKRNL] Get rid of MM_ROS_SECTION_OBJECT
2021-02-03 09:41:21 +01:00
Jérôme Gardou
8b98ff66ea
[NTOSKRNL] Store File Object in the segment instead of Section object
2021-02-03 09:41:21 +01:00
Jérôme Gardou
e980efebd4
[NTOSKRNL] Store the MM_IMAGE_SECTION_OBJECT pointer in SECTION::Segment
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c6a87f28bf
[NTOSKRNL] Get rid of MEMORY_AREA::Protect
...
Use the VAD node instead
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c9f924940a
[NTOSKRNL/MM] Get rid of useless members of MEMORY_AREA struct
2021-02-03 09:41:21 +01:00
Jérôme Gardou
defbf63416
[NTOSKRNL] Use PSECTION struct where possible
2021-02-03 09:41:21 +01:00
Jérôme Gardou
462d9a0974
[NTOSKRNL] Unload the cargo: We only use tiny bits of "NEWCC"
2021-02-03 09:41:21 +01:00
Jérôme Gardou
25722e647e
[NTOSKRNL] Embed a SECTION struct inside MM_ROS_SECTION_OBJECT
2021-02-03 09:41:21 +01:00
Jérôme Gardou
10ac04ff6e
[NTOSKRNL] Get rid of ROS_SECTION_OBJECT::AllocationAttributes in favor of MM_SECTION_FLAGS
2021-02-03 09:41:21 +01:00
Jérôme Gardou
819406ac97
[NTOSKRNL] Get rid of pagefile-backed sections support in legacy Mm
2021-02-03 09:41:21 +01:00
Jérôme Gardou
7afecee5eb
[NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:SectionPageProtection to InitialPageProtection
2021-02-03 09:41:21 +01:00
Jérôme Gardou
54c760574b
[NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:MaximumSize to SizeOfSection
...
For consistency with the SECTION struct
2021-02-03 09:41:21 +01:00
Jérôme Gardou
073ec9b0d4
[NTOSKRNL][NDK] Get rid of SECTION_OBJECT typedef
...
We will use the more recent SECTION (already used in ARM3) and this will avoid confusions
2021-02-03 09:41:21 +01:00
Jérôme Gardou
857dd4ae36
[NTOS:MM] Properly handle the 1-offset of paging files
2021-02-02 10:17:28 +01:00
Jérôme Gardou
f63401060d
[NTOS:MM] Fix compilation for amd64 port.
...
Addendum to 0919324772
2021-01-22 10:34:20 +01:00
Jérôme Gardou
0919324772
[NTOS:MM] Get rid of "compatibility layer" for hyper space mappings
...
Let's call that a bug layer instead.
2021-01-22 09:33:06 +01:00
Jérôme Gardou
57e8684bc6
[NTOS:MM] Allow "creating" a PDE in legacy Mm for foreign process
2021-01-22 09:32:36 +01:00
Jérôme Gardou
96ae15ac4b
[NTOS:MM] Fix more 64 bit arithmetics
2020-12-15 10:08:25 +01:00
Jérôme Gardou
abcbd44641
[NTOS:MM] Fix passing section size to MiCreatePagingFileMap & fix maximum size check
...
Also return the right status instead of stupidly asserting when failing to allocate memory.
2020-12-14 18:22:18 +01:00
Hervé Poussineau
c2946ced92
[NTOS:KD] Remove some now useless tests on _WINKD_
2020-11-16 08:55:03 +01:00
Timo Kreuzer
e67b62251f
[NTOS:MM] Handle PXE/PPE gaps in MiDeleteVirtualAddresses
2020-11-07 20:16:41 +01:00
Victor Perevertkin
5c7ce4475e
[REACTOS] Cleanup INIT and some PAGE section allocations
...
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
2020-11-02 21:45:31 +03:00
Timo Kreuzer
d4b4cf7448
[NTOS:MM] Make sure PXEs/PPEs and PDEs are always MM_EXECUTE_READWRITE
...
This is required since the NX protection proagates from the highest level, enforcing NX on the entire range, independent of whether lower level P*Es have the bit set or not. It might be useful to add a platform specific constant to allow making page tables NX on architectures that have a different behavior.
2020-11-01 09:32:27 +01:00
Timo Kreuzer
d55811f160
[NTOS:MM:X64] Fix session space initialization on x64
2020-11-01 09:32:27 +01:00
Timo Kreuzer
9095dbf5a5
[NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping
2020-11-01 09:32:27 +01:00
Timo Kreuzer
8980850d56
[NTOS:MM:X64] Simplify and fix x64 mapping code
...
- Use demand-zero-ptes in MiGetPteForProcess
- Handle NoExecute in MiSetPteProtection
- Fix MmIsPageSwapEntry
- Fix MmGetPageFileMapping
- remove obsolete functions.
2020-11-01 09:32:27 +01:00
Timo Kreuzer
0726cfce10
[NTOS:MM:X64] Handle PPEs and PXEs as well in MmInitializeProcessAddressSpace()
...
But don't set up the PFNs for the initial process on x64, as these have already been set up.
2020-11-01 09:32:27 +01:00
Timo Kreuzer
48d1bd2c88
[NTOS:MM:X64] On x64 allocate a VAD for the shared user page
2020-11-01 09:32:27 +01:00