reactos/ntoskrnl/mm/ARM3
Timo Kreuzer d5181e44dd
[NTOS] Fix MiFindInitializationCode (#751)
Short: The code was suffering from an off-by-one bug (inconsistency between inclusive end exclusive end address), which could lead to freeing one page above the initialization code. This led to freeing part of the kernel import section on x64. Now it is consistently using the aligned/exclusive end address.

Long:
* Initialization sections are freed both for the boot loaded images as well as for drivers that are loaded later. Obviously the second mechanism needs to be able to run at any time, so it is not initialization code itself. For some reason someone decided though, it would be a smart idea to implement the code twice, once for the boot loaded images, once for drivers and concluding that the former was initialization code itself and had to be freed.
* Since freeing the code that frees the initialization sections, while it is doing that is not possible, it uses a "smart trick", initially skipping that range, returning its start and end to the caller and have the caller free it afterwards.
* The code was using the end address in an inconsistent way, partly aligning it to the start of the following section, sometimes pointing to the last byte that should be freed. The function that freed each chunk was assuming the latter (i.e. that the end was included in the range) and thus freed the page that contained the end address. The end address for the range that was returned to the caller was aligned to the start of the next section, and the caller used it to free the range including the following page. On x64 this was the start of the import section of ntoskrnl. How that worked on x86 I don't even want to know.
2018-08-21 10:35:57 +02:00
..
arm Remove unwanted .gitignore files. 2017-10-04 10:28:36 +02:00
i386 [NTOS:MM] Use inline functions to acquire/release the PFN lock. 2017-12-08 10:32:08 +01:00
contmem.c [NTOS] Fix 64 bit warnings 2018-01-14 13:54:14 +01:00
drvmgmt.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
dynamic.c [NTOS:MM] Use inline functions to acquire/release the PFN lock. 2017-12-08 10:32:08 +01:00
expool.c [NTOSKRNL] Don't call OOM dumper in case we were trying to allocate more than 100 pages. 2018-02-17 15:09:38 +01:00
hypermap.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
iosup.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
largepag.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
mdlsup.c [NTOS] Fix 64 bit warnings 2018-01-14 13:54:14 +01:00
miarm.h [NTOS:MM] Pass The FaultCode to MmArmAcceessFault as well and translate it there to what was declared as "StoreInstruction" 2018-01-06 18:20:24 +01:00
miavl.h [NTOS] Add some header guards. 2017-12-12 12:42:13 +01:00
mmdbg.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
mminit.c [NTOSKRNL] MmTotalCommitLimit and MmTotalCommitLimitMaximum are in pages, not bytes 2018-08-16 18:40:23 +02:00
mmsup.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
ncache.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
pagfault.c [NTOS:MM] Pass FaultCode to MiDispatchFault 2018-01-06 18:20:24 +01:00
pfnlist.c [NTOS:MM] Use inline functions to acquire/release the PFN lock. 2017-12-08 10:32:08 +01:00
pool.c [NTOS:MM] Fix ASSERT when expanding paged pool 2018-08-20 23:52:42 +02:00
procsup.c [NTOS:MM] Make SLIST handling for kernel stacks portable 2018-08-16 16:52:02 +02:00
section.c [NTOS] Fix 64 bit warnings 2018-01-14 13:54:14 +01:00
session.c [NTOS:MM] Use inline functions to acquire/release the PFN lock. 2017-12-08 10:32:08 +01:00
special.c [NTOS:MM] Use inline functions to acquire/release the PFN lock. 2017-12-08 10:32:08 +01:00
sysldr.c [NTOS] Fix MiFindInitializationCode (#751) 2018-08-21 10:35:57 +02:00
syspte.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
vadnode.c [NTOS] Fix 64 bit warnings 2018-01-14 13:54:14 +01:00
virtual.c [NTOS:MM] Assert MmLocateMemoryAreaByAddress return value to satisfy Coverity. CID 701289 2018-01-28 10:48:27 +01:00
zeropage.c [NTOS:MM] Use inline functions to acquire/release the PFN lock. 2017-12-08 10:32:08 +01:00