Commit graph

32 commits

Author SHA1 Message Date
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 857dd4ae36 [NTOS:MM] Properly handle the 1-offset of paging files 2021-02-02 10:17:28 +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
Serge Gautherie b20f815126
[NTOSKRNL] Place INIT_FUNCTION before the return type (#2823)
(but after 'static' or SAL 2 annotation.)
Follow-up to 71fefa32, which mentions that it's actually required by the compiler in some circumstances.
2020-05-23 15:56:10 +02:00
Timo Kreuzer 7611cc2b12 [REACTOS] Fix SIZE_T related warnings 2019-08-15 14:20:00 +02:00
Hermès Bélusca-Maïto 06d4fce5ee
[NTOS:MM] Some fixes for NtCreatePagingFile().
- Correctly probe the FileName user pointer before capturing its contents.
- A paging file name with zero length is invalid too.
- Remember (TODO!) in the code that the lower bounds of the Safe*Size values
  need to be checked too!
2019-01-28 22:22:56 +01:00
Pierre Schweitzer 108991a6fb
[NTOSKRNL] Stub IoInitializeCrashDump()
Also call it from NtCreatePagingFile() when we have successfully created
a paging file on the system boot partition.
2018-09-18 21:59:59 +02:00
Pierre Schweitzer 12e8d7fe0e
[NTOSKRNL] Only allow page file on a few specific device types 2018-08-16 19:00:22 +02:00
Pierre Schweitzer cc59c97308
[NTOSKRNL] Don't need all access for file object 2018-08-16 18:54:23 +02:00
Pierre Schweitzer 8281f4baa6
[NTOSKRNL] Add a check commented out for now.
It's to be enabled once page file handling is moved to ARM3
2018-08-16 18:49:55 +02:00
Pierre Schweitzer 19318dcc1d
[NTOSKRNL] Start making our MMPAGING_FILE struct look like the real one 2018-08-16 14:04:27 +02:00
Pierre Schweitzer e392bdf962
[NTOSKRNL] Store page file sizes in pages, not in bytes 2018-08-16 13:50:16 +02:00
Pierre Schweitzer 2fe4e71383
[NTOSKRNL] Store page file minimum size and use it to prevent page file shrinking 2018-08-16 13:41:16 +02:00
Pierre Schweitzer bfc6a7957c
[NTOSKRNL] Page files don't have an init size, but a minimum size
NFC
2018-08-16 12:42:34 +02:00
Pierre Schweitzer 315867d4ff
[NTOSKRNL] Drop the MmPagingFile spin lock in favor of a guarded mutex 2018-08-16 12:39:24 +02:00
Pierre Schweitzer 891a6eeeb9
[NTOSKRNL] Drop the alloc map from page file
It was making no sense, and implemented in a broken way
that couldn't have worked if code path was used.
2018-08-16 12:16:39 +02:00
Pierre Schweitzer 5bd938bd24
[NTOSKRNL] Stub page file extension support 2018-08-16 11:58:58 +02:00
Pierre Schweitzer 1ea68d0510
[NTOSKRNL] Don't use anonymus allocations for MM objects 2018-08-13 08:30:17 +02:00
Pierre Schweitzer 34e8f45122
[NTOSKRNL] Keep page file name along the page file and free it on shutdown 2018-08-13 08:30:17 +02:00
Pierre Schweitzer 3814a822f1
[NTOSKRNL] Close page files (and delete them!) on shutdown 2018-08-13 08:30:17 +02:00
Pierre Schweitzer 02b0ca08e4
[NTOSKRNL] Misc fixes:
- Rename page file struct to MMPAGING_FILE
- Increment page files count after current page file was put in the list
2018-08-11 23:34:08 +02:00
Pierre Schweitzer f106c297de
[NTOSKRNL] Rename PagingFileList to MmPagingFile and make insertion simpler 2018-08-11 23:19:58 +02:00
Pierre Schweitzer 47cd447cfa
[NTOSKRNL] Remove useless define 2018-08-11 23:07:53 +02:00
Pierre Schweitzer f080ee1305
[NTOSKRNL] Replace the alloc map by a bitmap 2018-08-11 23:01:12 +02:00
Pierre Schweitzer fb07332450
[NTOSKRNL] Drop unused field 2018-08-11 23:01:11 +02:00
Pierre Schweitzer 814a6fc098
[NTOSKRNL] Revert r4668 (yeah, that was 15y ago)
It's hardly understandable and doesn't really makes sense.
Furthermore, it breaks compatibility with 3rd party FSD that
don't implement such FSCTL.
Obviously, Windows doesn't do this.
2018-08-11 23:01:11 +02:00
Pierre Schweitzer 28b4b419c2
[NTOSKRNL] Restrict rights on the page file 2018-08-11 23:01:11 +02:00
Pierre Schweitzer 36c20dc56b
[NTOSKRNL] Deny page file creation on floppy disk 2018-08-11 23:01:11 +02:00
Pierre Schweitzer 2969c28a27
[NTOSKRNL] Properly open a page file and set appropriate attributes 2018-08-11 23:01:11 +02:00
Pierre Schweitzer 0ad4ef6002
[NTOSKRNL] Check that caller has appropriate right before creating page file 2018-08-11 23:01:05 +02:00
Amine Khaldi 840320cbd1 [NTOS] Add missing brackets. Comment out some unused statements. CORE-11799 (#94) 2017-10-28 15:19:17 +01:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/ntoskrnl/mm/pagefile.c (Browse further)