- Validate MEM_LARGE_PAGES, MEM_PHYSICAL flags. Check for permission to use MEM_LARGE_PAGES.
- Validate protection mask.
- Validate MEM_RELEASE and MEM_DECOMMIT.
- Perform correct SEH in NtFreeVirtualMemory.
- Protect against overflows past VAD/User address ranegs.
- Only reference the process by handle if this isn't already the current process.
- If this isn't the current process, attach to it during the duration of the VM operation.
svn path=/trunk/; revision=49004
- Fix heap code to actually use the new lock instead of using RTL_CRITICAL_SECTION.
- Fix a ROUND_UP and ROUND_DOWN macros: it is a *rule* to wrap every argument in braces in a macro, otherwise shit happens. A couple of days were lost fighting a strange bug in the new heap manager code where it was doing ROUND_UP(Heap + 1, PAGE_SIZE)...
svn path=/trunk/; revision=49003
- Don't place new windows with default position at the top left corner of the screen
See issue #5484 for more details.
svn path=/trunk/; revision=49001
[NTOS]: The modified page writer should run at a high priority such as 27, not in idle mode at priority 1 -- otherwise dirty pages never get flushed out.
[NTOS]: Reimplement MmGetFileNameForAddress, MmGetFileNameForSection, MmGetFileObjectForSection to also support ARM3 sections. Shouldn't affect anything other than the user-mode debugging support.
svn path=/trunk/; revision=48999
[NTOS]: Don't assume that CcFlushDirtyPages will run with APCs disabled. Go ahead and actually enter/leave a critical region (Acquire/ReleaseForLazyWrite depend on this). The guarded mutex does disable APCs, but it's released when the actual flush happens.
svn path=/trunk/; revision=48998
[NTOS]: Make every VAD insert also create a MEMORY_AREA. Now the two address space views should be completely synchronized and we can try removing the hack that was done for PEB/TEB support (which will remove the 200 thread regression).
[NTOS]: Implement MiGetNextNode and MiFindEmptyAddressRangeInTree.
svn path=/trunk/; revision=48997
- Move on to using a real HEAP_LOCK structure for a heap lock.
- Implement kernel-mode counterparts of this lock too. Right now these don't introduce much of a difference, but they are going to be properly used by the new heap manager code.
svn path=/trunk/; revision=48994
[NTOS]: Delete WriteCopyView flag from MEMORY_AREA (unused, and was taking up 4 bytes due to alignment), and add a Vad pointer (takes up 4 bytes -- no actual size change).
[NTOS]: For VM and Section MEMORY_AREAs mapped in user-mode, build a "fake" VAD and insert it into the VAD Root of the Process. This means there is now a consistent view between ARM3 and RosMm in terms of user-mode address space layout, which will come in handy later.
[NTOS]: Destroy the MEMORY_AREA's VAD when the MEMORY_AREA itself is deleted. Watch out for the scenario explained in a previous check-in, where the VAD was caught by the MmCleanProcessAddressSpace vad-cleanup-loop.
[NTOS]: Implement MiInsertVad to restore the old functionality of MiInsertNode when the current parent and insertion result is not yet known. It obtains the information and calls MiInsertNode.
svn path=/trunk/; revision=48992
[NTOS]: Added a bogus allocation flag that can be used with Nt/MmCreateSection and MmMapViewInSystemSpace to take the ARM3 path instead. Only for internal testing at the moment.
Now we need to look at how to allow mapping these into user-space as well...
svn path=/trunk/; revision=48981
[NTOS]: Define MI_PTE_LOOKUP_NEEDED instead of using 0xFFFF. The name was found in checked build assertion strings.
[NTOS]: Add MM_VIEW (used for System-mapped Section Views) and MM_SESSSION (used to define the system/session view mappings) structure definitions.
svn path=/trunk/; revision=48977
- Fixed ValidateTimerCallback, always returning true and just spinning in the loop.
- Add one more process information flag with a point type and capturing the hit test in desktop structure.
svn path=/trunk/; revision=48970
[KERNEL32]: NtCreateSection should not be called with merely SEC_FILE: this says nothing about what kind of operation should be done (a commit, a reserve, etc?). Use SEC_COMMIT instead to specify correct operation. This works in ReactOS as of now, but would've failed after the NtSection* API rewrite.
[KERNEL32]: CreateFileMappingW should also accept/allow SEC_LARGE_PAGES, even if we don't suppport it yet.
svn path=/trunk/; revision=48958
Enable ARM3 Paged Pool and remove all related deprecated code. Install tested on several VMs, it might cause new regressions. Let's fix them before 0.3.13 instead of reverting.
svn path=/trunk/; revision=48940
[NTOS]: Remove some magic numbers in the pool code, using PTE_COUNT, MiAddressToPde, when needed. Also, the expansion code uses PDEs, not PTEs, so differentiate this, because on some systems (ARM), there are different structures for both.
[NTOS]: Use MI_WRITE_INVALID_PTE.
ARM3 paged pool now works, the expansion bug has been fixed (and the code is more portable). Expect to see it gradually enabled soon.
svn path=/trunk/; revision=48939
- Katayama Hirofumi: Don't leak open handles to keys.
- Katayama Hirofumi: Misc code changes/ cleanup.
See issue #5547 for more details.
svn path=/trunk/; revision=48934
Added a small testcase for FsRtlIsNameInExpression(). It's quite relevant for daily and simple use of the function. It shouldn't fail on ReactOS given our current implementation.
svn path=/trunk/; revision=48932
[NTOS]: Add concept of process color and system color. Compute correct color to use whenever requesting a page.
[NTOS]: Uncondtionally enable the color code when inserting/removing pages.
For now, when requesting a page, colors are still ignored, and the global PFN lists are scanned instead. If there are no regressions, we are one patch away from that.
svn path=/trunk/; revision=48927