HHermès Bélusca-Maïto[NTOS:CONFIG] Fix CmpRemoveFromHiveFileList() management (#9564)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[NTOS:CONFIG] Fix CmpRemoveFromHiveFileList() management (#9564) Supplement to commit f09f448d95 (r57263), CORE-6491 ## Problem description: The support for unloading registry hives using the `NtUnloadKey2()` and `CmUnloadKey()` functions has been introduced in commit 3507ef2ac6 (r68295), CORE-3094. It also brought the first usage of the `CmpRemoveFromHiveFileList()` routine, previously implemented in commit f09f448d95 (r57263), in order to remove the registry value associated to a registry hive, listed under the registry key `HKLM\SYSTEM\CurrentControlSet\Control\hivelist`, added by a previous `CmpAddToHiveFileList()` invocation when the hive was initially mounted. The problem was that in `CmUnloadKey()`, the `CmpRemoveFromHiveFileList()` routine was invoked *AFTER* a successful call to `CmpUnlinkFromMasterHive()`. Because of this, the routine was looking at an alread invalidated `LinkData` hive node. In doing so, the `LinkName` it deduced, and the hive path it constructed to lookup into the `hivelist` registry key, could become invalid: either from the name data being read, or, because the `KeyNode.Flags` value became invalid, invalidating the `KEY_COMP_NAME` flag for example, thus affecting the readability of the key name. In ReactOS, the problem almost never showed up, except during its 1st-stage installation, where the target `SOFTWARE` hive, mounted as: `\Registry\Machine\USetup_Software`, remained listed in the `hivelist` registry key, while the hive itself was already perfectly unloaded. As it turned out, the `SOFTWARE` mount link key was already invalidated, and the `USetup_Software` name was read incorrectly, and the code was generating an invalid hive path string to be looked up. Note that invoking `CmpRemoveFromHiveFileList()` *AFTER* a successful `CmpUnlinkFromMasterHive()`, is an action similar to what is done in Windows 2003 SP1 and later; however, this would have required reconstructing the hive's path just before unlinking it. (On Windows 2003 RTM and before, `CmpRemoveFromHiveFileList()` is invoked *BEFORE* `CmpUnlinkFromMasterHive()` in symmetry to what is done in the hive linking process. This has been changed on SP1+ so as to keep the hive linking information in the registry up until the hive unlinking has been successfully done.) ## Problem resolution: To resolve this issue, instead of reconstructing the hive path just before unlinking the hive, as done in Windows 2003 SP1 and SP2 (and removing it from the hive list later), we adopt an approach _similar_ to that of Vista+, by caching the hive path string initially constructed by `CmpAddToHiveFileList()` in the `CMHIVE` structure into a new `HiveRootPath` member. The `CMHIVE::HiveRootPath` member is absent in Windows 2003, https://www.vergiliusproject.com/kernels/x86/server-2003/sp2/_CMHIVE and is introduced with Windows Vista RTM, https://www.vergiliusproject.com/kernels/x86/windows-vista/rtm/_CMHIVE | 2 天前 | |
[NTOSKRNL] include/config.h: Sync it to current code (#3263) * SERIALIZE_DBGPRINT: Removed on c15e04c (r18078). * ENABLE_VALIDATE_POOL: Removed on 5899e14 (r42249). * TAG_STATISTICS_TRACKING: Removed on 5899e14 (r42249). * POOL_DEBUG_APIS: Removed on 5899e14 (r42249). * R_RZ: Removed on 7d21cf7 (r48999). * R_STACK: Removed on 7d21cf7 (r48999). * WHOLE_PAGE_ALLOCATIONS: Removed on b431563 (r17306). + * _GLOBAL_PAGES_ARE_AWESOME_: Move it here. | 5 年前 | |
[NTOS:KD:KDBG] Integration into KD framework (Part 2/3) Add redirections for KdSave/KdRestore and KdD0Transition/KdD3Transition. Both KDBG and KD(TERM) need those since they will become external transport DLLs later. | 3 年前 | |
[NTOS:INBV:PO] Consolidate shutdown logo routines where all the boot theming is implemented. And it's late now, but... Merry Christmas 2023 as well! 🎄 Logo design by contributor 'TheCustomFHD' "From ReactOS with Love" ;^) | 2 年前 | |
[NTOS:KE][NTDLL][NTDLL_VISTA] Implement NtGetCurrentProcessorNumberEx | 2 个月前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 |