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
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
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
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
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
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
b7eb0fddf3
Address PR review
2021-02-03 09:41:24 +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
caf89b9582
[NTOS:MM] Fix a race condition when unmapping sections views
2021-02-03 09:41:23 +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
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
f1631b44e1
[NTOS/MM] Introduce MmMapViewInSystemSpaceEx
2021-02-03 09:41:22 +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
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
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
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
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
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
Jérôme Gardou
15dd31377a
Revert "[NTOS/MM] Initialize process Working set and start implementing adding entries to it"
...
This reverts commit 5abc016401
.
Not ready for prime time
2020-10-20 15:56:53 +02:00
Jérôme Gardou
1c528cbf84
Revert "[NTOS/MM]
...
- Fix PFNs tracing
- Add private pages to the process working set"
This reverts commit 4c5351bf55
.
Not ready for prime time
2020-10-20 15:56:21 +02:00
Jérôme Gardou
4c5351bf55
[NTOS/MM]
...
- Fix PFNs tracing
- Add private pages to the process working set
2020-10-20 15:20:59 +02:00
Jérôme Gardou
5abc016401
[NTOS/MM] Initialize process Working set and start implementing adding entries to it
2020-10-20 15:20:59 +02:00