Jérôme Gardou [Thu, 28 Jan 2021 14:42:12 +0000 (15:42 +0100)]
[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.
Jérôme Gardou [Thu, 28 Jan 2021 14:41:28 +0000 (15:41 +0100)]
[NTOS:CC] Fix a bug
Jérôme Gardou [Wed, 27 Jan 2021 16:02:43 +0000 (17:02 +0100)]
[NTOS:MM] Unconditionally purge cache on image section creation.
Jérôme Gardou [Wed, 27 Jan 2021 15:59:37 +0000 (16:59 +0100)]
[NTOS:MM] Keep a ref on the segment when mapping a page & keep trace of what is the highest offset mapped.
Jérôme Gardou [Wed, 27 Jan 2021 15:28:45 +0000 (16:28 +0100)]
[NTOS:MM] Improve MmCanFileBeTruncated
Jérôme Gardou [Wed, 27 Jan 2021 15:20:08 +0000 (16:20 +0100)]
[NTOS:MM] Use 64-bit integer to count references on segments
Jérôme Gardou [Wed, 27 Jan 2021 15:19:07 +0000 (16:19 +0100)]
[NTOS:CC] Make sure to purge the Mm side in CcPurgeCacheSection
Jérôme Gardou [Wed, 27 Jan 2021 14:29:57 +0000 (15:29 +0100)]
[NTOS:CC] Be sure to flush the whole file in CcFlushCache
Jérôme Gardou [Wed, 27 Jan 2021 12:03:06 +0000 (13:03 +0100)]
[NTOS:MM] Introduce MmPurgeSegment & MmFlushSegment
Those will back CcFlushCache and CcPurgeCache.
Jérôme Gardou [Wed, 27 Jan 2021 09:29:07 +0000 (10:29 +0100)]
[NTOS:MM] Make the page LRU list a real LRU list.
Also, implement flushing mapped sections to disk on shutdown.
Jérôme Gardou [Wed, 27 Jan 2021 08:22:32 +0000 (09:22 +0100)]
[NTOS:FSRTL] Properly leave FsRtl when returning STATUS_CANT_WAIT
Jérôme Gardou [Tue, 26 Jan 2021 10:21:08 +0000 (11:21 +0100)]
[NTOS:MM] Fix unlocking on failure path
Jérôme Gardou [Mon, 25 Jan 2021 08:43:50 +0000 (09:43 +0100)]
[NTOS:MM] Remove unused field
Jérôme Gardou [Mon, 25 Jan 2021 08:24:54 +0000 (09:24 +0100)]
[NTOS:MM] Do not acquire Pfn lock in MmGetRmapListHead
All callers already hold it
Jérôme Gardou [Mon, 25 Jan 2021 08:23:46 +0000 (09:23 +0100)]
|NTOS:MM] Simplify some code
Jérôme Gardou [Thu, 21 Jan 2021 15:39:27 +0000 (16:39 +0100)]
[NTOS:PO] Flush dirty pages after flushing volumes
Jérôme Gardou [Tue, 5 Jan 2021 17:39:55 +0000 (18:39 +0100)]
[NTOS:CC][NTOS:MM] Try respecting ValidDataLength
Jérôme Gardou [Tue, 5 Jan 2021 11:32:26 +0000 (12:32 +0100)]
[NTOS:CC] Flush the whole VACB
Let Mm know what it has to do.
Jérôme Gardou [Tue, 5 Jan 2021 11:32:09 +0000 (12:32 +0100)]
[NTOS:CC] Improve trace messages
Jérôme Gardou [Tue, 5 Jan 2021 09:45:39 +0000 (10:45 +0100)]
[NTOS:CC] Simplify CcFlushCache implementation
Jérôme Gardou [Tue, 5 Jan 2021 09:41:41 +0000 (10:41 +0100)]
[NTOS:CC] Get rid of ROS_VACB:Valid
Jérôme Gardou [Mon, 4 Jan 2021 17:26:18 +0000 (18:26 +0100)]
[NTOS:MM] Disable APC while performing Paged Read
Jérôme Gardou [Wed, 30 Dec 2020 17:25:02 +0000 (18:25 +0100)]
[NTOS:CC] Properly return the public BCBs
Jérôme Gardou [Wed, 30 Dec 2020 09:53:31 +0000 (10:53 +0100)]
[NTOS:CC] Simplify CcRosDeleteFileCache
Jérôme Gardou [Wed, 30 Dec 2020 08:45:06 +0000 (09:45 +0100)]
[NTOS:CC] Remove dead code
Jérôme Gardou [Wed, 30 Dec 2020 08:43:55 +0000 (09:43 +0100)]
[NTOS:MM] Fix a race
Jérôme Gardou [Tue, 29 Dec 2020 18:50:59 +0000 (19:50 +0100)]
[NTOS:MM] Check that we don't add rmap for NULL process
Jérôme Gardou [Tue, 29 Dec 2020 18:50:00 +0000 (19:50 +0100)]
[NTOS:MM] Fix a race condition when unmapping sections views
Jérôme Gardou [Tue, 29 Dec 2020 15:55:19 +0000 (16:55 +0100)]
[NTOS:CC] Perform sanity checks before doing anything else
Jérôme Gardou [Tue, 29 Dec 2020 15:43:03 +0000 (16:43 +0100)]
[NTOS:MM] Fix input validation/correction in MmMapViewInSystemSpace
Jérôme Gardou [Tue, 29 Dec 2020 10:26:25 +0000 (11:26 +0100)]
[NTOS:CC] Fix potnetial use-after-free
Jérôme Gardou [Tue, 29 Dec 2020 09:07:57 +0000 (10:07 +0100)]
[NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb
Jérôme Gardou [Tue, 22 Dec 2020 10:31:51 +0000 (11:31 +0100)]
[NTOS:CC] Do not write behind concurrently the same file
Jérôme Gardou [Mon, 21 Dec 2020 17:47:32 +0000 (18:47 +0100)]
[NTOS] Loop again and again until the whole cache is empty when sutting down
Jérôme Gardou [Mon, 21 Dec 2020 12:54:29 +0000 (13:54 +0100)]
[NTOS:MM] Keep image maps & file maps coherent at the time of creating the image map
Jérôme Gardou [Fri, 18 Dec 2020 15:53:39 +0000 (16:53 +0100)]
Fix physical memory section creation
Jérôme Gardou [Fri, 18 Dec 2020 15:19:45 +0000 (16:19 +0100)]
Disable CcScheduleReadAhead call
Jérôme Gardou [Fri, 18 Dec 2020 14:24:09 +0000 (15:24 +0100)]
[NTOS:CC] Fix some tests, complain where the current implementation won't let us do the right thing
Jérôme Gardou [Thu, 17 Dec 2020 17:09:56 +0000 (18:09 +0100)]
[NTOS:MM] Remove a check for now
Jérôme Gardou [Mon, 14 Dec 2020 14:55:08 +0000 (15:55 +0100)]
[NTOS:MM] Do not reference the section when mapping it.
Referencing the segment is enough.
Jérôme Gardou [Mon, 14 Dec 2020 14:48:27 +0000 (15:48 +0100)]
[NTOS:MM] Save the dirty bit when sharing a segment page
Jérôme Gardou [Fri, 11 Dec 2020 17:53:32 +0000 (18:53 +0100)]
[NTOS:MM] Various fixes.
Fix MmFlushImageSection behaviour
Remove an invalid ASSERT
Jérôme Gardou [Fri, 11 Dec 2020 14:29:35 +0000 (15:29 +0100)]
[NTOS] Zero data unconditionally after segment end, unless section is created with SEC_RESERVE
Use a SEC_RESERVE section in Cc
Jérôme Gardou [Fri, 11 Dec 2020 13:31:08 +0000 (14:31 +0100)]
[NTOS:CC] Restore read-ahead behaviour in CcCopyRead
Jérôme Gardou [Tue, 8 Dec 2020 09:28:52 +0000 (10:28 +0100)]
[NTOS:CC] Fix some tests for CcCopyRead and CcCopyWrite
Most importantly: raise the right status when provided an invalid buffer.
Jérôme Gardou [Mon, 7 Dec 2020 10:42:47 +0000 (11:42 +0100)]
[NTOS:MM] Have the legacy Mm be less greedy about the number of pages it wants
Jérôme Gardou [Mon, 7 Dec 2020 08:55:12 +0000 (09:55 +0100)]
[NTOS:MM] Make the situation about dirty pages in image map a bit clearer
Jérôme Gardou [Fri, 4 Dec 2020 14:45:04 +0000 (15:45 +0100)]
[NTOS:CC] Honor FO_WRITE_THROUGH flag in CcCopyWrite and fix it in CcZeroData
Jérôme Gardou [Fri, 4 Dec 2020 09:18:32 +0000 (10:18 +0100)]
[NTOS:CC] Acquire file for flush when flushing if necessary
Jérôme Gardou [Fri, 4 Dec 2020 08:17:21 +0000 (09:17 +0100)]
[NTOS:MM] Fix file object bad referencing
Jérôme Gardou [Fri, 4 Dec 2020 08:13:01 +0000 (09:13 +0100)]
[NTOS:IO] VFAT sucks less now
Jérôme Gardou [Fri, 4 Dec 2020 08:12:18 +0000 (09:12 +0100)]
[NTOS:CC] File size check fix
Jérôme Gardou [Fri, 4 Dec 2020 08:10:59 +0000 (09:10 +0100)]
[NTOS/MM] Set FSRTL_MOD_WRITE_TOP_LEVEL_IRP top-level IRP when paging-out
Jérôme Gardou [Fri, 4 Dec 2020 08:10:13 +0000 (09:10 +0100)]
[NTOS/MM] Do not zero out the tail of the segment if the mapping is not an image
Jérôme Gardou [Thu, 3 Dec 2020 16:18:29 +0000 (17:18 +0100)]
[NTOS:MM] Acquire file lock when creating section
Jérôme Gardou [Thu, 3 Dec 2020 16:13:38 +0000 (17:13 +0100)]
[SETUPLIB] Lock the volume before writing MBR boot code
Jérôme Gardou [Wed, 2 Dec 2020 14:17:28 +0000 (15:17 +0100)]
[NTOSKRNL] Address issues raised in PR 3361 review
Jérôme Gardou [Wed, 2 Dec 2020 11:39:58 +0000 (12:39 +0100)]
[NTOS:CC] Fix Vacb size usage & check
Jérôme Gardou [Wed, 2 Dec 2020 11:30:48 +0000 (12:30 +0100)]
[NTOS/CC] Be more precise when notifying Mm about dirty pages
Jérôme Gardou [Wed, 2 Dec 2020 11:28:38 +0000 (12:28 +0100)]
[NTOS:CC] Fix releasing VACB when an exception is raised in CcZeroData & CcCopyWrite
Jérôme Gardou [Wed, 2 Dec 2020 11:27:32 +0000 (12:27 +0100)]
[NTOS:CC] Rewrite the non-cached path of CcZeroData
Jérôme Gardou [Wed, 2 Dec 2020 11:14:49 +0000 (12:14 +0100)]
[NTOS:CC] Remove unused functions
Jérôme Gardou [Wed, 2 Dec 2020 11:12:11 +0000 (12:12 +0100)]
[NTOS/MM] Force flushing when the page is dirtified in user mode
Jérôme Gardou [Wed, 2 Dec 2020 10:40:25 +0000 (11:40 +0100)]
[NTOS:MM] Do not limit ourselves in reading or writing the file
Jérôme Gardou [Wed, 2 Dec 2020 10:17:59 +0000 (11:17 +0100)]
[FASTFAT_NEW] Enable the driver
Jérôme Gardou [Tue, 24 Nov 2020 13:07:06 +0000 (14:07 +0100)]
[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.
Jérôme Gardou [Wed, 18 Nov 2020 16:45:47 +0000 (17:45 +0100)]
[NTOS/MM] Do not dirtify section pages for system-space maps
Cc does it for itself.
Jérôme Gardou [Wed, 18 Nov 2020 11:14:41 +0000 (12:14 +0100)]
[NTOS/MM] Do not error when FS returns STATUS_END_OF_FILE for paged read.
Also remove a seemingly invalid ASSERT
Jérôme Gardou [Wed, 18 Nov 2020 09:29:17 +0000 (10:29 +0100)]
[NTOS/MM] DO not assert when being passed invalid parameters in MmCreateSection
Jérôme Gardou [Tue, 17 Nov 2020 16:38:53 +0000 (17:38 +0100)]
[NTOS/MM] Assert there are no RMAP left before freeing the page
Jérôme Gardou [Fri, 22 Jan 2021 08:30:55 +0000 (09:30 +0100)]
[NTOS:MM] Fix locking when paging out
Jérôme Gardou [Fri, 6 Nov 2020 08:39:31 +0000 (09:39 +0100)]
[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
Jérôme Gardou [Tue, 27 Oct 2020 16:37:38 +0000 (17:37 +0100)]
[NTOS/MM] Introduce MmArePagesResident and MmMakePagesResident
Jérôme Gardou [Tue, 27 Oct 2020 16:36:18 +0000 (17:36 +0100)]
[NTOS/MM] Introduce MmMapViewInSystemSpaceEx
Jérôme Gardou [Mon, 26 Oct 2020 16:49:16 +0000 (17:49 +0100)]
[NTOS/MM] Infer that the Memory Area is an image mapping from its VAD node
Jérôme Gardou [Mon, 26 Oct 2020 11:19:18 +0000 (12:19 +0100)]
[NTOSKRNL/MM] Fix a few wine tests
Jérôme Gardou [Mon, 26 Oct 2020 10:23:42 +0000 (11:23 +0100)]
[NTOSKRNL/MM] Reduce use of MiIsRosSectionObject
Jérôme Gardou [Mon, 26 Oct 2020 09:31:46 +0000 (10:31 +0100)]
[NTOSKRNL] Get rid of MM_ROS_SECTION_OBJECT
Jérôme Gardou [Mon, 26 Oct 2020 08:04:49 +0000 (09:04 +0100)]
[NTOSKRNL] Store File Object in the segment instead of Section object
Jérôme Gardou [Fri, 23 Oct 2020 15:27:47 +0000 (17:27 +0200)]
[NTOSKRNL] Store the MM_IMAGE_SECTION_OBJECT pointer in SECTION::Segment
Jérôme Gardou [Fri, 23 Oct 2020 14:55:00 +0000 (16:55 +0200)]
[NTOSKRNL] Get rid of MEMORY_AREA::Protect
Use the VAD node instead
Jérôme Gardou [Fri, 23 Oct 2020 14:44:24 +0000 (16:44 +0200)]
[NTOSKRNL/MM] Get rid of useless members of MEMORY_AREA struct
Jérôme Gardou [Fri, 23 Oct 2020 14:39:15 +0000 (16:39 +0200)]
[NTOSKRNL] Use PSECTION struct where possible
Jérôme Gardou [Fri, 23 Oct 2020 14:16:51 +0000 (16:16 +0200)]
[NTOSKRNL] Unload the cargo: We only use tiny bits of "NEWCC"
Jérôme Gardou [Fri, 23 Oct 2020 12:42:21 +0000 (14:42 +0200)]
[NTOSKRNL] Embed a SECTION struct inside MM_ROS_SECTION_OBJECT
Jérôme Gardou [Fri, 23 Oct 2020 12:42:02 +0000 (14:42 +0200)]
[NTOSKRNL] Disable more unused code
Jérôme Gardou [Fri, 23 Oct 2020 11:17:45 +0000 (13:17 +0200)]
[NTOSKRNL] Get rid of ROS_SECTION_OBJECT::AllocationAttributes in favor of MM_SECTION_FLAGS
Jérôme Gardou [Fri, 23 Oct 2020 10:56:08 +0000 (12:56 +0200)]
[NTOSKRNL] Get rid of pagefile-backed sections support in legacy Mm
Jérôme Gardou [Fri, 23 Oct 2020 09:46:46 +0000 (11:46 +0200)]
[NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:SectionPageProtection to InitialPageProtection
Jérôme Gardou [Fri, 23 Oct 2020 09:42:09 +0000 (11:42 +0200)]
[NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:MaximumSize to SizeOfSection
For consistency with the SECTION struct
Jérôme Gardou [Fri, 23 Oct 2020 09:38:20 +0000 (11:38 +0200)]
[NTOSKRNL][NDK] Get rid of SECTION_OBJECT typedef
We will use the more recent SECTION (already used in ARM3) and this will avoid confusions
Jérôme Gardou [Fri, 23 Oct 2020 09:30:42 +0000 (11:30 +0200)]
[NTOSKRNL] Do not compile unused code
Václav Zouzalík [Thu, 14 Jan 2021 19:14:40 +0000 (20:14 +0100)]
[THEMES] Update Czech (cs-CZ) translation
Tibor Lajos Füzi [Wed, 13 Jan 2021 16:07:04 +0000 (17:07 +0100)]
[TRANSLATION] update hungarian translation of cpl/timedate, cpl/main, cpl/desk
Jérôme Gardou [Thu, 31 Dec 2020 13:51:17 +0000 (14:51 +0100)]
[KMTESTS:NTOS_CC] Fix a test format
Jérôme Gardou [Mon, 7 Dec 2020 09:22:28 +0000 (10:22 +0100)]
[NTOS:MM] Properly handle the 1-offset of paging files
Jérôme Gardou [Mon, 1 Feb 2021 09:42:37 +0000 (10:42 +0100)]
[KMTEST:NTOS_CC] Fix buffer size calculation
Serge Gautherie [Thu, 26 Nov 2020 05:59:36 +0000 (06:59 +0100)]
[CMIPCI][DOC] Fix 4 DriverVer values
And add entry to '3rd Party Files.txt'.
Addendum to
4b4d95d (r39827) and
ee4368d (r58644).
Serge Gautherie [Thu, 26 Nov 2020 05:59:36 +0000 (06:59 +0100)]
[GREEN][INF] Fix format of 3 DriverVer date values
GetVersionInformationFromInfFile() expects a 10-character date.
George Bișoc [Mon, 1 Feb 2021 22:55:42 +0000 (23:55 +0100)]
[NTOS:SE] Implement SECURITY_TOKEN_PROXY_DATA, SECURITY_TOKEN_AUDIT_D… (#3432)
ProxyData and AuditData are pointers to an arbitrary data, which instead, they should point to their respective data structures. This serves as preparation for SepFreeProxyData and SepCopyProxyData functions implementations in the future (regarding the proxy data stuff specifically).
For further details:
https://www.vergiliusproject.com/kernels/x86/Windows%202003/SP2/_TOKEN
https://www.nirsoft.net/kernel_struct/vista/SECURITY_TOKEN_AUDIT_DATA.html
https://www.nirsoft.net/kernel_struct/vista/SECURITY_TOKEN_PROXY_DATA.html
https://www.nirsoft.net/kernel_struct/vista/PROXY_CLASS.html