Jérôme Gardou
43378411fb
[NTOS:MM] Rewrite arch-specifics of the legacy Mm
...
Properly handle PDE refcounting
Clean-up of the internal API
Enforce attaching to the process when modifying its memory layout, instead of
making circonvoluted mappings which always end up being broken.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
b445005c70
[NTOS:MM] Get rid of MmRosFlushVirtualMemory
...
It's not used anywhere now, and it will eventually be gone
2021-04-08 15:40:37 +02:00
Jérôme Gardou
9e121fb6c2
[NTOS:MM] Get rid of MmSetCleanAllRmaps and MmIsDirtyPageRmap
...
Everything is wrong with them. Bad locking. Bad logic.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
7bffb92099
[NTOS:MM] Let ARM3 handle invalid PDE for itself.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
36a92e6ea5
[NTOS:MM] Fix a bit the page-out/page-in logic
...
- Do not lock the section segment when we are serving a fault for a process private page.
- Do not keep the process address space lock while writing to pagefile.
- Do not wait for an event that might never be set.
2021-04-08 15:40:37 +02:00
Jérôme Gardou
82c908195c
Revert "[NTOS:MM] Allow MiMapPageInHyperSpace to be called from DISPATCH_LEVEL"
...
This reverts commit 8404d1a6ff
.
Not ready for prime time, sorry.
2021-04-07 23:26:44 +02:00
Jérôme Gardou
8404d1a6ff
[NTOS:MM] Allow MiMapPageInHyperSpace to be called from DISPATCH_LEVEL
...
Also annotate it to show its behaviour.
2021-04-07 23:09:26 +02:00
Oleg Dubinskiy
52f4d8019b
[NTOS:MM][NTOS:SE] Mute some noisy stubs
...
Mute debug prints of MmDoesFileHaveUserWritableReferences and SeAuditingFileEventsWithContext stubs.
These stubs are very noisy and create a lot of spam in the log when using Microsoft NTFS driver in ReactOS (with some other improvements applied).
Implementing those functions isn't badly required for the proper work of this driver, so better way for now is just mute these stubs a bit.
After my changes, they will be displayed only once, and the log will be more clear, so it will seem to be enough to understand that the driver calls these routines.
CORE-17409
2021-04-07 13:16:03 +02:00
Jérôme Gardou
0d3825862f
[NTOS:KE] Rewrite KiSystemCallTrampoline in assembly
...
Instead of making assumptions about what the compiler does with forced-inline functions
2021-04-06 17:57:18 +02:00
Eric Kohl
d8c38c4b4c
[NTOS:PNP] PiSetDevNodeText: Do not overwrite existing DeviceDesc values
...
CORE-17513
2021-04-05 14:33:48 +02:00
Mark Jansen
5e928e5c92
[NTOS:MM] Stubplement cookie generation for drivers
2021-04-03 18:08:53 +02:00
Eric Kohl
c449929fef
[NTOS:EX] Use RtlCutoverTimeToSystemTime to determine the current time zone id
...
CORE-14658
2021-04-03 09:38:07 +02:00
Jérôme Gardou
998870c5ea
[NTOS:MM] Properly fail for invalid sizes of data section mappings
2021-03-30 22:20:15 +02:00
Jérôme Gardou
4c731adc04
[NTOS:MM] Fix compilation when PFN tracing is enabled
2021-03-30 17:22:09 +02:00
Jérôme Gardou
80f8beeeee
[NTOS/MM] Remove an outdated check
2021-03-30 17:13:19 +02:00
Jérôme Gardou
0187c1e113
[NTOS:MM] Fix PFN tracing
2021-03-30 16:26:43 +02:00
George Bișoc
eba68ffb9c
[NTOS:SE] Specify the code section of SepCreateSystemProcessToken as INIT
...
This function is used during the Security kernel module phase initialisation to set up the system process token which the phase initialisation procedure in itself is stored in the INIT section. With that being said, do the same for SepCreateSystemProcessToken too and add a header documentation as an addition.
2021-03-25 02:30:46 +03:00
George Bișoc
5b5b814af8
[NTOS:SE] Create the anonymous logon tokens on Security initialisation phase
2021-03-25 02:30:46 +03:00
George Bișoc
fe0f9d8646
[NTOS:SE] Implement SepCreateSystemAnonymousLogonToken and SepCreateSystemAnonymousLogonTokenNoEveryone functions
...
These private functions are needed to set up two different kinds of system's anonymous logon tokens: one that includes everyone in the group and the other that doesn't. These functions are needed as next step closer to the
implementation of NtImpersonateAnonymousToken system call.
2021-03-25 02:30:46 +03:00
George Bișoc
b28530d4ac
[NTOS:SE] Set up an ACL and SD for the anonymous logon
2021-03-25 02:30:46 +03:00
Jérôme Gardou
6e4f83da70
[NTOS:CC] Wake up lazy scan after inserting elements in the list.
2021-03-24 15:28:04 +01:00
Jérôme Gardou
edd4a985d9
[NTOS:CC] Be verbose about why we defer writes
2021-03-24 15:27:36 +01:00
Jérôme Gardou
5c54fb9179
[NTOS:CC] Rewrite CcPostDeferredWrites
...
This allows to post small writes if there are any, and avoid holding the list lock for a long time.
2021-03-24 11:22:28 +01:00
Jérôme Gardou
b13a696513
[NTOS:KE] Explicitly cast -1 to ULONG
2021-03-24 11:13:04 +01:00
Jérôme Gardou
94d175b7f2
[NTOS] Remove a definition which is redundant with ndk
2021-03-24 11:12:12 +01:00
Jérôme Gardou
187ca32175
[NTOS:KE] Use PNT_TIB as argument in KeSetTebBase
2021-03-24 11:09:20 +01:00
Jérôme Gardou
173cdcae8f
[CMAKE] Use the "kernel" module type for ntoskrnl and ntkrnlmp
2021-03-23 11:18:43 +01:00
Jérôme Gardou
d1d1260f5f
[NTOS:MM] Fix integer arithmetics
2021-03-22 10:02:12 +01:00
Victor Perevertkin
0fed07b7e4
[NTOS:PNP] Initialize DeviceDesc and LocationInformation registry fields
...
for manually reported devices, as it is required by the newdev.dll
for installing drivers from INF files
CORE-17212 CORE-17398
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2021-03-19 07:57:41 +03:00
Victor Perevertkin
aec3d9cc8f
[NTOS:IO][NTOS:PNP] Fix incorrect usage of IopGetRegistryValue
...
KEY_VALUE_FULL_INFORMATION was not always freed properly
2021-03-19 01:07:22 +03:00
Jérôme Gardou
42094071ee
[NTOS:MM] Silence noisy DPRINTs
2021-03-18 12:24:21 +01:00
Jérôme Gardou
4ff5d39edb
[NTOS:MM] Use a define for the big pool table occupation rate
2021-03-18 12:24:21 +01:00
Jérôme Gardou
8494688eeb
[NTOS:MM] Do not use atomic operations to set a bit while holding a lock.
...
Saving your fingers from typing it doesn't make it better code.
2021-03-18 12:24:21 +01:00
Jérôme Gardou
f06b58925d
[NTOS:MM] Implement shrinking big pool allocation table
...
Shrink when using 1/8 of its allocated capacity (thus use 25% of it at the end of the process)
Expand when using 3/4 of its allocated capacity (thus use ~40% of it at the end of the process)
2021-03-18 12:24:21 +01:00
Jérôme Gardou
54354712e2
[NTOS:MM] Fail allocating non-paged pool when running out of available pages
2021-03-18 12:24:21 +01:00
Jérôme Gardou
34630a06ca
[NTOS:MM] Do not bugcheck when we are freeing a big allocation for which we didn't manage to insert the tag
2021-03-18 12:24:21 +01:00
Jérôme Gardou
d5fa0788d8
[NTOS:MM] Silence a DPRINT which became noisy
2021-03-16 13:23:21 +01:00
Victor Perevertkin
59a5dba443
[NTOS:PNP] Implement PlugPlayControlStartDevice control class
...
This control class is triggered when a driver is being installed for a
non-critical device. The driver info should already be in the registry
so we just need to push the device through the state graph
Meanwhile, combine the code for similar control classes into
PiControlSyncDeviceAction routine
CORE-17463 CORE-17490
2021-03-16 03:17:57 +03:00
Victor Perevertkin
029accdcf7
[NDK] Change the data structure for PlugPlayControlResetDevice control class
...
PlugPlayControlResetDevice shares the input structure with several other
control classes.
Source: ProcessHacker sources e9c8121f41/ntpnpapi.h
2021-03-16 03:17:42 +03:00
Serge Gautherie
e0400e7810
[NTOS:KE] KiIdleLoop(): Propagate DECLSPEC_NORETURN to callers
2021-03-05 00:43:15 +03:00
Serge Gautherie
5f1d79f0c5
[NTOS:KE] KiIdleLoop(): Add DECLSPEC_NORETURN, Remove FASTCALL
2021-03-05 00:43:15 +03:00
George Bișoc
44b8e5caac
[NTOS:SE] Complete the SepCompareTokens implementation
...
* Implement SepCompareSidAndAttributesFromTokens and SepComparePrivilegeAndAttributesFromTokens functions for array elements comparison
* Implement the token comparison code in SepCompareTokens function
* Add a missing PAGED_CODE() in SepCompareTokens as most of the token comparison code is paged
* Use SAL annotations for SepCompareTokens and NtCompareTokens
2021-03-04 16:22:56 +03:00
George Bișoc
a340ec1767
[NTOS:PS] Guard the quota in a spin lock ( #3419 )
...
Prior to acquiring a quota from the process and do whatever it's needed to do (charge it or return it back), we must guard ourselves with a spinlock so that we may not get into potential race conditions. In Windows Server 2003, PspGivebackQuota and PspExpandQuota do the same thing and they're the equivalent to PspReturnProcessQuotaSpecifiedPool and PspChargeProcessQuotaSpecifiedPool in our codebase.
2021-03-04 04:43:30 +03:00
Serge Gautherie
7851ad8635
[NTOS:KD] KdpDebugLogInit(): Close the thread handle
...
Addendum to 07dc415
(r43331).
2021-03-03 09:01:37 +01:00
Serge Gautherie
802ad6d3ee
[NTOS:KD] KdpLoggerThread(): Assert being in kernel mode
...
to be explicit that using Nt*() is safe.
Follow-up to 9537653
.
2021-03-03 09:01:37 +01:00
George Bișoc
6170b574f0
[NTOS:PS] Implement PS_QUOTA_TYPE and let the quota code use it ( #3389 )
...
This will replace the PoolIndex variable and as such we'll only be using the PS_QUOTA_TYPE enumeration, as Windows does. Both QuotaEntry, QuotaUsage and QuotaPeak depend explicitly or implicitly on this enumeration. Further details about this enum can be found in the following articles.
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ps/psquota/type.htm?tx=68,143
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ps/psquota/block.htm?tx=68,142,143
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/ps/eprocess/index.htm (see QuotaPeak and QuotaUsage)
2021-03-02 20:09:58 +01:00
Jérôme Gardou
4e4c47cccc
[NTOS:KE] Generate proper frame info for trap handler in GCC builds
...
CORE-8531
2021-03-02 14:37:39 +01:00
Jérôme Gardou
7caf9e9d48
[NTOS:KD] Use Zw* syscall variants
...
The log file can be (re-)initialized when previous mode is User-Mode,
thus the calls fail on probing input parameters
2021-02-26 08:46:53 +01:00
Jérôme Gardou
a93e065ebc
[NTOS:MM] Do not chunk-read file when we are the modified-page-writer thread
2021-02-26 08:46:53 +01:00
Jérôme Gardou
35c091adaf
[NTOS:MM] Do not chunk-read files marked with FO_RANDOM_ACCESS
2021-02-26 08:46:53 +01:00
Eric Kohl
9ff015f770
[NTOS:CM] Report key creation to the notify code
2021-02-21 15:49:06 +01:00
Jérôme Gardou
2a962eaf8c
[NTOS:CC] Keep a reference on the shared cache map of the file when we are in lazy write
...
This should fix "Leaking VACB" debug prints
2021-02-19 15:48:31 +01:00
Jérôme Gardou
d18634c026
[NTOS:WMI] Be consistent about potential NULL pointer use
2021-02-18 10:24:53 +01:00
Serge Gautherie
17a9041da1
[NTOS:WMI] IoWMIWriteEvent(): Add WNODE_FLAG_TRACED_GUID case
...
Addendum to d5f8964
(r23040).
CORE-17384
2021-02-17 18:59:09 +01:00
Serge Gautherie
495e22e0d5
[NTOS:WMI] IoWMIWriteEvent(): Fix annotation, Extend DPRINT1()
...
CORE-17384
2021-02-17 18:59:09 +01:00
Timo Kreuzer
4b4bff0642
[NTOS:MM] Handle demand zero PTEs with MM_EXECUTE_READWRITE and MM_READWRITE
2021-02-16 18:02:57 +01:00
Hervé Poussineau
58332b076c
[NTOS:KD] Merge initialization phases 1 and 2, and fix log file debugging
...
Phase 2 and 3 were not done anymore since 777a2d94da
.
Fix that, by merging phases 1 and 2, and by calling phase 3 later
for log file debugging, when ExpInitializationPhase = 3
CORE-17470
2021-02-16 00:12:25 +01:00
Jérôme Gardou
0573de22a0
[NTOS:MM] Do not assert on a case we actually support
2021-02-10 17:48:30 +01:00
Jérôme Gardou
73fd52a164
[NTOS:MM] Flush dirty pages after closing the page files.
...
CORE-17462
2021-02-10 11:14:19 +01:00
Timo Kreuzer
ca74467904
[NTOS:CC] Raise status, when CcMapData fails ( #3348 )
...
Also add a check in fastfat, that asserts, when CcMapData returns FALSE.
2021-02-09 09:29:48 +01:00
George Bișoc
dd4c113594
[NTOS:SE] Do not use a global lock for tokens ( #3445 )
...
In Windows Server 2003 the lock is initialised on a per-token basis, that is, the lock resource is created in SepDuplicateToken() and SepCreateToken() functions. This ensures that the lock initialisation is done locally for the specific token thus avoiding the need of a global lock.
2021-02-05 12:10:19 +03:00
Victor Perevertkin
b705df731e
[NTOS:MM][FASTFAT_NEW] Fix DBG usage, fixes Release build
2021-02-05 11:54:10 +03:00
Jérôme Gardou
6f2b94c023
[NTOS:MM] Wake up the balancer as soon as we are low on page.
...
Fixes installing on a system with 64MB of RAM, if you feel like it.
2021-02-03 13:42:39 +01:00
Jérôme Gardou
cc9607e94e
[NTOS:CC] Fix use of uninitialized variable
2021-02-03 13:35:17 +01:00
Jérôme Gardou
0699dcb50c
[NTOS:EX] Restore sysinfo
2021-02-03 10:29:28 +01:00
Jérôme Gardou
14077e3f4e
[NTOS:MM] Simplify a check
2021-02-03 09:41:24 +01:00
Jérôme Gardou
b7eb0fddf3
Address PR review
2021-02-03 09:41:24 +01:00
Jérôme Gardou
c0bf352069
[NTOS:MM] Fix regression of MmCanFileBeTruncated
2021-02-03 09:41:24 +01:00
Jérôme Gardou
7f7abc9838
[NTOS:MM] Simplify code & fix MSVC x64 build
2021-02-03 09:41:23 +01:00
Jérôme Gardou
2ba1926037
[NTOS:MM][NTOS:CC] Performance improvement again
...
Read files by 64kb chunks instead of page-sized chunks.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
625f273361
[NTOS:MM] More fine-tuning of the memory balancer
2021-02-03 09:41:23 +01:00
Jérôme Gardou
41475dfcd7
[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.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
7fbf90d6fd
[NTOS:CC] Fix a bug
2021-02-03 09:41:23 +01:00
Jérôme Gardou
ea354c4bc7
[NTOS:MM] Unconditionally purge cache on image section creation.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
c1c51e31e4
[NTOS:MM] Keep a ref on the segment when mapping a page & keep trace of what is the highest offset mapped.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
91a4e62376
[NTOS:MM] Improve MmCanFileBeTruncated
2021-02-03 09:41:23 +01:00
Jérôme Gardou
3e43aa1305
[NTOS:MM] Use 64-bit integer to count references on segments
2021-02-03 09:41:23 +01:00
Jérôme Gardou
cc6bc02b91
[NTOS:CC] Make sure to purge the Mm side in CcPurgeCacheSection
2021-02-03 09:41:23 +01:00
Jérôme Gardou
d0bf98663b
[NTOS:CC] Be sure to flush the whole file in CcFlushCache
2021-02-03 09:41:23 +01:00
Jérôme Gardou
90c6a65efe
[NTOS:MM] Introduce MmPurgeSegment & MmFlushSegment
...
Those will back CcFlushCache and CcPurgeCache.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
8a8b4db447
[NTOS:MM] Make the page LRU list a real LRU list.
...
Also, implement flushing mapped sections to disk on shutdown.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
bde2ee571a
[NTOS:FSRTL] Properly leave FsRtl when returning STATUS_CANT_WAIT
2021-02-03 09:41:23 +01:00
Jérôme Gardou
3efc5b1734
[NTOS:MM] Fix unlocking on failure path
2021-02-03 09:41:23 +01:00
Jérôme Gardou
d23dbdda4c
[NTOS:MM] Remove unused field
2021-02-03 09:41:23 +01:00
Jérôme Gardou
f201b8af78
[NTOS:MM] Do not acquire Pfn lock in MmGetRmapListHead
...
All callers already hold it
2021-02-03 09:41:23 +01:00
Jérôme Gardou
727e73f253
|NTOS:MM] Simplify some code
2021-02-03 09:41:23 +01:00
Jérôme Gardou
48e1c8593f
[NTOS:PO] Flush dirty pages after flushing volumes
2021-02-03 09:41:23 +01:00
Jérôme Gardou
5949d5095d
[NTOS:CC][NTOS:MM] Try respecting ValidDataLength
2021-02-03 09:41:23 +01:00
Jérôme Gardou
bdb73edab7
[NTOS:CC] Flush the whole VACB
...
Let Mm know what it has to do.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
804f5a41ed
[NTOS:CC] Improve trace messages
2021-02-03 09:41:23 +01:00
Jérôme Gardou
20fe42c9e9
[NTOS:CC] Simplify CcFlushCache implementation
2021-02-03 09:41:23 +01:00
Jérôme Gardou
9b6240ee03
[NTOS:CC] Get rid of ROS_VACB:Valid
2021-02-03 09:41:23 +01:00
Jérôme Gardou
e46f1a9af3
[NTOS:MM] Disable APC while performing Paged Read
2021-02-03 09:41:23 +01:00
Jérôme Gardou
02167f2fb3
[NTOS:CC] Properly return the public BCBs
2021-02-03 09:41:23 +01:00
Jérôme Gardou
33cde28312
[NTOS:CC] Simplify CcRosDeleteFileCache
2021-02-03 09:41:23 +01:00
Jérôme Gardou
a9193b5cc2
[NTOS:CC] Remove dead code
2021-02-03 09:41:23 +01:00
Jérôme Gardou
8ed15a49a7
[NTOS:MM] Fix a race
2021-02-03 09:41:23 +01:00
Jérôme Gardou
11eee4eeec
[NTOS:MM] Check that we don't add rmap for NULL process
2021-02-03 09:41:23 +01:00
Jérôme Gardou
caf89b9582
[NTOS:MM] Fix a race condition when unmapping sections views
2021-02-03 09:41:23 +01:00
Jérôme Gardou
57ee31ee33
[NTOS:CC] Perform sanity checks before doing anything else
2021-02-03 09:41:23 +01:00
Jérôme Gardou
cff3c399c6
[NTOS:MM] Fix input validation/correction in MmMapViewInSystemSpace
2021-02-03 09:41:23 +01:00
Jérôme Gardou
8287a098b9
[NTOS:CC] Fix potnetial use-after-free
2021-02-03 09:41:23 +01:00
Jérôme Gardou
358d06c47c
[NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb
2021-02-03 09:41:23 +01:00
Jérôme Gardou
1505abbc09
[NTOS:CC] Do not write behind concurrently the same file
2021-02-03 09:41:23 +01:00
Jérôme Gardou
347a4f146b
[NTOS] Loop again and again until the whole cache is empty when sutting down
2021-02-03 09:41:23 +01:00
Jérôme Gardou
addf824d87
[NTOS:MM] Keep image maps & file maps coherent at the time of creating the image map
2021-02-03 09:41:23 +01:00
Jérôme Gardou
543112008a
Fix physical memory section creation
2021-02-03 09:41:22 +01:00
Jérôme Gardou
91f6fa0259
Disable CcScheduleReadAhead call
2021-02-03 09:41:22 +01:00
Jérôme Gardou
6d97d8d2e1
[NTOS:CC] Fix some tests, complain where the current implementation won't let us do the right thing
2021-02-03 09:41:22 +01:00
Jérôme Gardou
674ab3dce3
[NTOS:MM] Remove a check for now
2021-02-03 09:41:22 +01:00
Jérôme Gardou
1f796267bc
[NTOS:MM] Do not reference the section when mapping it.
...
Referencing the segment is enough.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
3c2b1bf59b
[NTOS:MM] Save the dirty bit when sharing a segment page
2021-02-03 09:41:22 +01:00
Jérôme Gardou
3141668724
[NTOS:MM] Various fixes.
...
Fix MmFlushImageSection behaviour
Remove an invalid ASSERT
2021-02-03 09:41:22 +01:00
Jérôme Gardou
30f71c7fc0
[NTOS] Zero data unconditionally after segment end, unless section is created with SEC_RESERVE
...
Use a SEC_RESERVE section in Cc
2021-02-03 09:41:22 +01:00
Jérôme Gardou
a52bc6d179
[NTOS:CC] Restore read-ahead behaviour in CcCopyRead
2021-02-03 09:41:22 +01:00
Jérôme Gardou
4441b1cd44
[NTOS:CC] Fix some tests for CcCopyRead and CcCopyWrite
...
Most importantly: raise the right status when provided an invalid buffer.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
aab24ed1b1
[NTOS:MM] Have the legacy Mm be less greedy about the number of pages it wants
2021-02-03 09:41:22 +01:00
Jérôme Gardou
fb07802956
[NTOS:MM] Make the situation about dirty pages in image map a bit clearer
2021-02-03 09:41:22 +01:00
Jérôme Gardou
cd23d6e19a
[NTOS:CC] Honor FO_WRITE_THROUGH flag in CcCopyWrite and fix it in CcZeroData
2021-02-03 09:41:22 +01:00
Jérôme Gardou
f8aa14ce4e
[NTOS:CC] Acquire file for flush when flushing if necessary
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d9f7459bb1
[NTOS:MM] Fix file object bad referencing
2021-02-03 09:41:22 +01:00
Jérôme Gardou
2d3454a809
[NTOS:IO] VFAT sucks less now
2021-02-03 09:41:22 +01:00
Jérôme Gardou
cbfc04157d
[NTOS:CC] File size check fix
2021-02-03 09:41:22 +01:00
Jérôme Gardou
e39fc52d25
[NTOS/MM] Set FSRTL_MOD_WRITE_TOP_LEVEL_IRP top-level IRP when paging-out
2021-02-03 09:41:22 +01:00
Jérôme Gardou
f114209782
[NTOS/MM] Do not zero out the tail of the segment if the mapping is not an image
2021-02-03 09:41:22 +01:00
Jérôme Gardou
7d70af61e8
[NTOS:MM] Acquire file lock when creating section
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d2fa434cb7
[NTOSKRNL] Address issues raised in PR 3361 review
2021-02-03 09:41:22 +01:00
Jérôme Gardou
70c62aa2c9
[NTOS:CC] Fix Vacb size usage & check
2021-02-03 09:41:22 +01:00
Jérôme Gardou
c74cbf0c0b
[NTOS/CC] Be more precise when notifying Mm about dirty pages
2021-02-03 09:41:22 +01:00
Jérôme Gardou
c295d6b229
[NTOS:CC] Fix releasing VACB when an exception is raised in CcZeroData & CcCopyWrite
2021-02-03 09:41:22 +01:00
Jérôme Gardou
7f47f03296
[NTOS:CC] Rewrite the non-cached path of CcZeroData
2021-02-03 09:41:22 +01:00
Jérôme Gardou
36e18aab35
[NTOS:CC] Remove unused functions
2021-02-03 09:41:22 +01:00
Jérôme Gardou
7dab3583cc
[NTOS/MM] Force flushing when the page is dirtified in user mode
2021-02-03 09:41:22 +01:00
Jérôme Gardou
91edefa11e
[NTOS:MM] Do not limit ourselves in reading or writing the file
2021-02-03 09:41:22 +01:00
Jérôme Gardou
774a4c703f
[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.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
0933337404
[NTOS/MM] Do not dirtify section pages for system-space maps
...
Cc does it for itself.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d440434a8e
[NTOS/MM] Do not error when FS returns STATUS_END_OF_FILE for paged read.
...
Also remove a seemingly invalid ASSERT
2021-02-03 09:41:22 +01:00
Jérôme Gardou
b46173edaf
[NTOS/MM] DO not assert when being passed invalid parameters in MmCreateSection
2021-02-03 09:41:22 +01:00
Jérôme Gardou
ba49c39041
[NTOS/MM] Assert there are no RMAP left before freeing the page
2021-02-03 09:41:22 +01:00
Jérôme Gardou
d932bdb950
[NTOS:MM] Fix locking when paging out
2021-02-03 09:41:22 +01:00
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
e4047d1521
[NTOS/MM] Introduce MmArePagesResident and MmMakePagesResident
2021-02-03 09:41:22 +01:00
Jérôme Gardou
f1631b44e1
[NTOS/MM] Introduce MmMapViewInSystemSpaceEx
2021-02-03 09:41:22 +01:00
Jérôme Gardou
4f6fd6c42b
[NTOS/MM] Infer that the Memory Area is an image mapping from its VAD node
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c3bd70cfd1
[NTOSKRNL/MM] Fix a few wine tests
2021-02-03 09:41:21 +01:00
Jérôme Gardou
4abda863ce
[NTOSKRNL/MM] Reduce use of MiIsRosSectionObject
2021-02-03 09:41:21 +01:00
Jérôme Gardou
b7d988ae5b
[NTOSKRNL] Get rid of MM_ROS_SECTION_OBJECT
2021-02-03 09:41:21 +01:00
Jérôme Gardou
8b98ff66ea
[NTOSKRNL] Store File Object in the segment instead of Section object
2021-02-03 09:41:21 +01:00
Jérôme Gardou
e980efebd4
[NTOSKRNL] Store the MM_IMAGE_SECTION_OBJECT pointer in SECTION::Segment
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c6a87f28bf
[NTOSKRNL] Get rid of MEMORY_AREA::Protect
...
Use the VAD node instead
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c9f924940a
[NTOSKRNL/MM] Get rid of useless members of MEMORY_AREA struct
2021-02-03 09:41:21 +01:00
Jérôme Gardou
defbf63416
[NTOSKRNL] Use PSECTION struct where possible
2021-02-03 09:41:21 +01:00
Jérôme Gardou
462d9a0974
[NTOSKRNL] Unload the cargo: We only use tiny bits of "NEWCC"
2021-02-03 09:41:21 +01:00
Jérôme Gardou
25722e647e
[NTOSKRNL] Embed a SECTION struct inside MM_ROS_SECTION_OBJECT
2021-02-03 09:41:21 +01:00
Jérôme Gardou
c3ec5d801c
[NTOSKRNL] Disable more unused code
2021-02-03 09:41:21 +01:00
Jérôme Gardou
10ac04ff6e
[NTOSKRNL] Get rid of ROS_SECTION_OBJECT::AllocationAttributes in favor of MM_SECTION_FLAGS
2021-02-03 09:41:21 +01:00
Jérôme Gardou
819406ac97
[NTOSKRNL] Get rid of pagefile-backed sections support in legacy Mm
2021-02-03 09:41:21 +01:00
Jérôme Gardou
7afecee5eb
[NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:SectionPageProtection to InitialPageProtection
2021-02-03 09:41:21 +01:00
Jérôme Gardou
54c760574b
[NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:MaximumSize to SizeOfSection
...
For consistency with the SECTION struct
2021-02-03 09:41:21 +01:00
Jérôme Gardou
073ec9b0d4
[NTOSKRNL][NDK] Get rid of SECTION_OBJECT typedef
...
We will use the more recent SECTION (already used in ARM3) and this will avoid confusions
2021-02-03 09:41:21 +01:00
Jérôme Gardou
9b74e5ed4f
[NTOSKRNL] Do not compile unused code
2021-02-03 09:41:21 +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
George Bișoc
1903b568b6
[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
2021-02-02 01:55:42 +03:00
Jérôme Gardou
158235bdd5
[NTOS:KE] Fix EIP only when the breakpoint is a break
...
Fixes ntdll:exception winetest crash
ROSTESTS-80
2021-02-01 16:39:39 +01:00
Hervé Poussineau
794f15e45f
[NTOSKRNL] Fix link with GCC x64
...
KeLowerIrql/KeRaiseIrqlToDpcLevel/KfRaiseIrql are defined as FORCEINLINE in ntoskrnl/ke/amd64/irql.c
Use KxLowerIrql/KxRaiseIrqlToDpcLevel/KxRaiseIrql instead, which call their respective Ke*/Kf* counterparts.
2021-01-28 23:10:01 +01:00
Hervé Poussineau
9d110db433
[NTOS:KDBG] Support KDBG on x64
2021-01-28 20:44:21 +01:00
Hervé Poussineau
ae4ce99e00
[ASM x64] Fix usage of macro .allocstack
...
.allocstack only accepts one 'size' parameter."
2021-01-28 20:31:16 +01:00
Victor Perevertkin
91fceab36e
[NTOS:IO][NTOS:PNP] Add PiActionAddBootDevices device action
...
During the boot process, it makes possible to initalize the driver's
devices right after the driver is loaded. Moreover, this way one can be
sure that all critical devices are initialized before the
IopMarkBootPartition call (because we explicitly call the driver's
AddDevice routine now, after each driver is loaded)
CORE-7826
2021-01-27 05:15:16 +03:00
Victor Perevertkin
798fc13b48
[NTOS:PNP] Implement NT5.2-like DEVICE_NODE state management
...
- Use DeviceNode->State field and its values, instead of
DeviceNode->Flags for tracking current node state
- Change DNF_* flags to the ones compatible with Windows XP+
- Simplify state changes for device nodes and encapsulate all the logic
inside the PiDevNodeStateMachine routine. This makes the ground for
future improvements in the device removal sequence and
resource management
- Now values inside DeviceNode->State and ->Flags are compatible with
the windbg !devnode macro and can be tracked using it
- BUGFIX: fixed cases where IRP_MN_START_DEVICE or
IRP_MN_QUERY_DEVICE_RELATIONS may be sent to a device after a
IRP_MN_REMOVE_DEVICE
CORE-7826
2021-01-27 05:15:15 +03:00
Victor Perevertkin
b704292808
[NTOS:IO] Add more enumeration requests during the boot process
...
This is to ensure that all needed devices are initialized during the
early boot
CORE-7826
2021-01-27 05:15:15 +03:00
Jérôme Gardou
f63401060d
[NTOS:MM] Fix compilation for amd64 port.
...
Addendum to 0919324772
2021-01-22 10:34:20 +01:00
Jérôme Gardou
0919324772
[NTOS:MM] Get rid of "compatibility layer" for hyper space mappings
...
Let's call that a bug layer instead.
2021-01-22 09:33:06 +01:00
Jérôme Gardou
57e8684bc6
[NTOS:MM] Allow "creating" a PDE in legacy Mm for foreign process
2021-01-22 09:32:36 +01:00
Alex Henrie
35f3034879
[NDK] "Reserved" member in SYSTEM_PROCESSOR_INFORMATION is "MaximumProcessors" for Windows 8+ ( #3421 )
...
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2021-01-09 23:15:36 +01:00
Hervé Poussineau
ff7035d940
[ASM x64] Change ; by /* */ for comments
...
Syntax with semi-colon is not supported by gas.
2021-01-07 21:12:11 +01:00
Hervé Poussineau
e581123c35
[NTOSKRNL] Correctly use SEH2 macros (fixes GCC x64 compilation)
2021-01-05 19:24:23 +01:00
Jérôme Gardou
c8d07514c8
[CMAKE] Fix GCC -fstack-protector usage
2021-01-05 13:38:57 +01:00
Victor Perevertkin
e5254974d2
[NTOS:IO] Start loading drivers from the disk only after SystemRoot is initialized
...
Add another PnPBootDriversInitialized variable to indicate a point where
both disk subsystem and SystemRoot symlink are initialized, and use it
in a PiCallDriverAddDevice call.
2021-01-04 16:50:33 +03:00
Victor Perevertkin
c4c0585f96
[NTOS:IO][NTOS:PNP] Implement PiCallDriverAddDevice
...
- Move the driver's name obtaining logic into the IopGetDriverNames
function
- Create a new PiCallDriverAddDevice instead of PipCallDriverAddDevice
and move it to pnpmgr/devaction.c file. Move around all its internal
helpers too
- Support a proper Windows-compatible driver loading order for a PDO
(lower filters, main service, upper filters, etc.)
- Set a correct Problem for the DeviceNode, in case of an error during
driver loading
- Check the Start Type for all drivers before loading
- Do not try to load drivers during the early boot stage when there is
no disk subsystem initialized
2021-01-04 16:50:33 +03:00
Victor Perevertkin
4c95339da0
[NTOS:IO] Refactoring of the driver initialization code (2)
...
- Do not hold the IopDriverLoadResource while trying to reference a
driver object (but still acquire it when we actually need to load a
driver)
- Change IopLoadDriver and IopInitializeDriverModule to use registry
handle instead of a service name string and/or full registry path
- Do not try to reference a driver object inside IopLoadDriver. It's
supposed to be done before the function call
2021-01-04 16:50:33 +03:00
Victor Perevertkin
a6a3aa0f0d
[NTOS:IO] Refactor IopLoadUnloadDriver
...
- Split IopLoadUnloadDriver into IopLoadDriver and calling DriverUnload
- Schedule the worker for (un)loading driver in a separate routine
(IopDoLoadUnloadDriver) this allows IopLoadDriver to be called
separately (if we are sure that we're in the system process)
2021-01-04 16:50:32 +03:00
Victor Perevertkin
e18a32df3a
[NTOS:IO] Refactoring of the driver initialization code
...
- Remove IopCreateDriver and put its code into IoCreateDriver and
IopInitializeDriverModule. It's hard to extract a meaningful common
part from it
- Refactor IopInitializeDriverModule. Extend and put the DriverName
generation logic into it. Now this function frees the ModuleObject in
case of failure and returns STATUS_FAILED_DRIVER_ENTRY in case of
DriverInit failure (will be used later)
2021-01-04 16:50:32 +03:00
Victor Perevertkin
6f0e37b042
[NTOS:PNP][NTOS:IO] Do not create a device object + node on every driver load
...
- Remove the usage of IopCreateDeviceNode and change it to
PipAllocateDeviceNode where required
2021-01-04 16:50:32 +03:00
Hermès Bélusca-Maïto
b570fac18b
Happy New Year 2021 to the ReactOS Community!!
...
⚛️ 🍾 🥳 🎆 ☢️
2021-01-01 00:00:00 +01:00
Stanislav Motylkov
f234cb6e59
[NTOS:CM] Do not create ProcessorNameString value if there is no Brand String
...
If the CPU does support CPUID instruction but does not have the Brand String,
the legacy name detection should be performed either in CIM_Processor (WMI),
in the Processor device driver, or in the application itself.
The deleted Intel CPU name detection code can go to the WMI at some point.
In fact Windows XP and 2003 kernels do not have any strings of that kind.
This effectively reverts the hack committed 6 years ago in 7a985425
(r63798)
that was intended to workaround CORE-7952.
CORE-17413
2020-12-30 19:38:41 +03:00
Victor Perevertkin
8ee88d3bd5
[NTOS:PNP] Send removal IRPs to a file system device object for mounted devices
...
If a DeviceObject has VPB attached, it should be treated in a special way
CORE-16106
2020-12-27 18:40:33 +03:00
Hermès Bélusca-Maïto
a748350fc9
[NTOS:IO] Fail if the driver name passed to NtLoadDriver() is an empty string.
...
Otherwise an assertion on the driver name is hit later on.
Can be reproduced by calling NtLoadDriver with a valid UNICODE_STRING
of Length == 0.
2020-12-27 00:52:00 +01:00
Hermès Bélusca-Maïto
44511f0809
[NTOS:IO] Minor formatting only.
...
Making IopLoadUnloadDriver() looking similar to IopUnloadDriver().
2020-12-27 00:51:59 +01:00
Jérôme Gardou
bd0445dbf2
[NTOS/FSRTL] Implement FsRtlAcquireToCreateMappedSection using filter callbacks
2020-12-22 11:37:53 +01:00
Jérôme Gardou
ef4c7ae978
[NTOS:IO] Validate input parameters in NtQueryDirectoryFile
...
It turns out this is not the job of the FS driver
2020-12-22 11:06:38 +01:00
Jérôme Gardou
1d1dba51db
[NTOS:IO] Do not set Shared property of the file if we are failing in IoCheckShareAccess
2020-12-22 11:05:00 +01:00
Jérôme Gardou
a6c0af2e21
[NTOS:IO] Do not pass bogus file offset to the FS in NtReadFile & NtWriteFile
2020-12-22 11:02:33 +01:00
Jérôme Gardou
96ae15ac4b
[NTOS:MM] Fix more 64 bit arithmetics
2020-12-15 10:08:25 +01:00
Jérôme Gardou
abcbd44641
[NTOS:MM] Fix passing section size to MiCreatePagingFileMap & fix maximum size check
...
Also return the right status instead of stupidly asserting when failing to allocate memory.
2020-12-14 18:22:18 +01:00
Jérôme Gardou
8631e75837
[NTOS:CC] Acquire the master lock after freeing the VACB in CcRosFlushDirtyPages
...
Fixes a random ASSERT
2020-12-09 18:06:42 +01:00
Jérôme Gardou
3d4cf8d2d8
[NTOS/FSRTL] Fix MCB tests
...
- Fix behaviour when adding or removing entries in the middle of an existing run
- Do not touch output parameters when failing, caller might rely on this.
2020-12-08 11:48:00 +01:00
Victor Perevertkin
016dc28793
[NTOS:CONFIG] Release the lock in a failure case in CmLoadKey
...
This is a workaround, the real issue is still not resolved
CORE-17263
2020-12-08 13:44:27 +03:00
Hermès Bélusca-Maïto
3d980c4a2c
[NTOS:FSTUB] Addendum to 29615fee
and 8d2fe541: Further remove useless casts.
...
Also, fix the MBR checksum calculation (missing ~CheckSum + 1), to fix
the calculation in accordance with how MS calculates the MBR checksums
(and what we do as well in
https://github.com/reactos/reactos/blob/master/base/setup/lib/utils/partlist.c#L1581
https://github.com/reactos/reactos/blob/master/boot/freeldr/freeldr/arch/i386/hwdisk.c#L291
).
2020-12-07 22:52:42 +01:00
Hermès Bélusca-Maïto
fd053237cb
[NTOS:FSTUB] Minor formatting; put the PAGED_CODE() macros in evidence (instead of being lost in the declarations).
2020-12-07 22:51:15 +01:00
Victor Perevertkin
29615feeb6
[FSTUB] Fix bugs from 8d2fe54188
...
The buffer is now PUCHAR or PVOID everywhere
2020-12-07 19:50:51 +03:00
Victor Perevertkin
8d2fe54188
[FSTUB] Fix out of bounds access in IoReadDiskSignature
...
- Convert PARTITION_TABLE_OFFSET to the number of bytes instead of
(number of bytes) / 2. This avoids many confusing casts
- Use a cache aligned buffer for MBR
2020-12-07 14:43:34 +03:00
Victor Perevertkin
582ca68696
[NTOS:PNP] Improve and refactor PnP notifications
...
- BUGFIX: do not call IoGetRelatedTargetDevice while guarded mutex is acquired
(the function issues an APC, but they are disabled inside a critical section)
- BUGFIX: only the beginning of a structure for GUID_PNP_CUSTOM_NOTIFICATION was copied and queued.
Just pass it as-is to a subscriber, without copying
- Don't convert event GUID to string, store and compare GUID struct itself
- Split IopNotifyPlugPlayNotification into 3 functions for each type of notification
(less stack usage and for future changes)
- Move initialization code for notifications into a separate routine
- Use separate lists and locks for every type of notification
- Put "TargetDeviceChange" notifications into their place inside DEVICE_NODE
2020-12-05 22:25:40 +03:00
Victor Perevertkin
e3198fb644
[NTOS:PNP] Check if APCs are enabled before waiting inside IopSynchronousCall
2020-12-05 22:25:39 +03:00
Victor Perevertkin
9eafb2971f
[NTOS:CONFIG] Comment out the assertion until fixed
...
CORE-17263
2020-12-05 22:17:08 +03:00
Jérôme Gardou
0db79d4aa9
[NTOSKRNL:FSRTL] Fix memory corruption when pruning tunnel cache
2020-12-04 16:08:14 +01:00
Thomas Faber
828d5fa93e
[NTOS:IO] Reduce stack usage in IopLoadServiceModule. CORE-17215
2020-11-27 12:44:35 +01:00
Thomas Faber
2858ff53ce
[NTOS:KD] Avoid large stack buffer in KdpPrint. CORE-17215
2020-11-27 10:31:45 +01:00
Thomas Faber
ae1d272add
[NTOS:PNP] Avoid recursion in IopTraverseDeviceTree(Node). CORE-17215
2020-11-27 10:31:41 +01:00
Hervé Poussineau
1a3c607f53
[NTOS:KD] Change the way we detect if exception if from KernelMode/UserMode
...
CORE-17381
2020-11-22 18:17:59 +01:00
Hervé Poussineau
44c6df4b27
[NTOS:KD] Correctly define previous mode when entering KDBG (addendum to 0c76bbfe98
)
2020-11-17 14:23:36 +01:00
Jérôme Gardou
9e7071e8fb
[NTOSKRNL] DO not disable optimisations when compiling with CLang
2020-11-16 16:58:10 +01:00
Jérôme Gardou
e00922a0fe
[NTOSKRNL] Link memcmp to the import lib when using CLang
...
CLang performs some optimisations on e.g. strcmp, but memcmp is not exported by ntoskrnl
2020-11-16 16:58:10 +01:00
Hervé Poussineau
d6d5caec7c
[NTOS:KD] Move some KDBG-specific variables to KDBG-specific file
2020-11-16 08:55:04 +01:00
Hervé Poussineau
0c76bbfe98
[NTOS:KD] Merge KdpReportExceptionStateChange() with kd64 version
2020-11-16 08:55:04 +01:00
Hervé Poussineau
baa47fa5e0
[NTOS:KD] Use a PCONTEXT instead of a PKTRAP_FRAME in KDBG
2020-11-16 08:55:03 +01:00
Hervé Poussineau
ba37323a62
[NTOS:KD] Move some declarations where they belong
2020-11-16 08:55:03 +01:00
Hervé Poussineau
67e9cc00b2
[NTOS:KD] Remove useless define
...
KdbEnterDebuggerException() is only called when KDBG is defined.
2020-11-16 08:55:03 +01:00
Hervé Poussineau
95faf65ebf
[NTOS:KD] Remove useless variables/members
...
Those where only set and never read.
2020-11-16 08:55:03 +01:00
Hervé Poussineau
8d3a395101
[NTOS:KD] Remove Bochs port debugging
...
You can use serial port debugging instead.
2020-11-16 08:55:03 +01:00
Hervé Poussineau
8a62f277d8
[NTOS:KD] Remove useless implementation of BREAKPOINT_PRINT in KdSystemDebugControl
...
This is (as expected) handled in KdpTrap(), which also calls KdpPrint().
2020-11-16 08:55:03 +01:00
Hervé Poussineau
1eda7d7e99
[NTOS:KD] Merge KdpReportCommandStringStateChange() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
6f7835d30c
[NTOS:KD] Merge KdpReportLoadSymbolsStateChange() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
e31be4ec25
[NTOS:KD] Merge KdEnableDebuggerWithLock()/KdDisableDebuggerWithLock() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
ebb6f29e69
[NTOS:KD] Merge KdEnterDebugger()/KdExitDebugger() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
81b184741d
[NTOS:KD] Remove useless uses of _WINKD_
2020-11-16 08:55:03 +01:00
Hervé Poussineau
329b9fa2fb
[NTOS:KD] Merge KdpReport() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
a8662c73a5
[NTOS:KD] Merge KdpTrap() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
5730394bd0
[NTOS:KD] Merge KdpPrintString()/KdpPromptString() with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
d5fe15e5e6
[NTOS:KD] Merge KdpStub with kd64 version
2020-11-16 08:55:03 +01:00
Hervé Poussineau
c2946ced92
[NTOS:KD] Remove some now useless tests on _WINKD_
2020-11-16 08:55:03 +01:00
Hervé Poussineau
660948ce6f
[NTOS:KD] Merge some more functions with kd64
...
Functions are KdIsThisAKdTrap, KdUpdateDataBlock, KdEnterDebugger,
KdExitDebugger, KdRefreshDebuggerNotPresent, KdDisableDebugger,
KdEnableDebuggerWithLock, KdEnableDebugger, KdSystemDebugControl
2020-11-16 08:55:03 +01:00
Hervé Poussineau
d0e2fada23
[NTOS:KD] Rename KdpEnterDebuggerException to KdpTrap + add KdpStub forwarder
...
This removes somes uses of _WINKD_ macro.
2020-11-16 08:55:02 +01:00
Hervé Poussineau
4d84c856ad
[NTOS:KD] Merge KdInitDebugger with kd64 version + move variable declarations to kd64/kddata.c
...
Remove now unused file kd/kdinit.c
2020-11-16 08:55:02 +01:00
Hervé Poussineau
777a2d94da
[NTOS:KD] Import KdpCallInitRoutine() into KdDebuggerInitialize1()
2020-11-16 08:55:02 +01:00
Hervé Poussineau
9b43a3a067
[NTOS:KD] Move implementation of banner display from each debug output type to common code
2020-11-16 08:55:02 +01:00
Hervé Poussineau
6025df33a5
[NTOS:KD] Make implementation of KdInitSystem more similar with the kd64 one
...
Move some kd initializations into KdDebuggerInitialize0() function.
2020-11-16 08:55:02 +01:00
Hervé Poussineau
f417a53743
[NTOS:KD] Compile all kd64 files in kdbg mode
2020-11-16 08:55:02 +01:00
Hervé Poussineau
e09554a06c
[NTOS:KD] Merge KdPowerTransition/KdChangeOption with kd64 version
2020-11-16 08:55:02 +01:00
Hervé Poussineau
453edbb5da
[NTOS:KD] Implement empty versions of KdDebuggerInitialize0/KdSendPacket/KdReceivePacket
...
Move KdDebuggerInitialize1 to common code.
Add #defines to local names to prevent clashes with kdcom.dll
2020-11-16 08:55:02 +01:00
Hervé Poussineau
b18529de28
[NTOS:KD] Merge KdPollBreakIn() with kd64 version
2020-11-16 08:55:02 +01:00
Hervé Poussineau
1bee6bb8f3
[NTOS:KD] Remove invalid configuration (not _WINKD_ on amd64)
...
This was not working, as the file ntoskrnl/kd/amd64/kd.c was non-existent.
2020-11-16 08:55:02 +01:00
Hervé Poussineau
458f4edfd5
[NTOS:KD] Remove 'support' for Pice. It was only setting a flag.
2020-11-16 08:55:02 +01:00
Hervé Poussineau
0e391eecd1
[NTOS:KD] Remove GDB stubs
...
drivers/base/kdgdb/ should be used instead.
2020-11-16 08:55:02 +01:00
Hervé Poussineau
083cf05f7b
[NTOS:KDBG] Remove useless file
2020-11-16 08:55:02 +01:00
Hervé Poussineau
129e009a2c
[NTOS:IO] Do not translate resources of type CmResourceTypeDevicePrivate
...
CmResourceTypeDevicePrivate resources are created the the bus driver, for its own later use,
when children devices will receive the IRP_MN_START_DEVICE.
Do not translate them, as they have no meaning outside bus driver.
2020-11-15 18:38:37 +01:00
Thomas Faber
507c442473
[NTOS:CM] Implement support for KeyValuePartialInformationAlign64. CORE-17358
2020-11-14 15:11:00 +01:00
Serge Gautherie
b910409a4a
[NTOS:KDBG] Add some missing OBJ_KERNEL_HANDLE
...
CORE-10207
2020-11-14 12:00:24 +01:00
Victor Perevertkin
d6ef8f97e9
[NTOS:PNP] Enumerate the device tree after loading boot drivers and HAL
2020-11-10 01:59:49 +03:00
Timo Kreuzer
e67b62251f
[NTOS:MM] Handle PXE/PPE gaps in MiDeleteVirtualAddresses
2020-11-07 20:16:41 +01:00
Timo Kreuzer
274bc4de1c
[NTOS:SE] Fix handling of relative security descriptors in SeQuerySecurityDescriptorInfo
2020-11-07 15:54:47 +01:00
Hermès Bélusca-Maïto
ce55fef1e5
[NTOS:EX] Move the C_ASSERT UUID_CACHED_VALUES_STRUCT.GuidInit to a better place, where the structure is defined.
2020-11-06 01:06:12 +01:00
Hermès Bélusca-Maïto
3c722e35b1
[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build.
2020-11-06 01:06:11 +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
Victor Perevertkin
658f742c2d
[NDK][CMAKE] Introduce DATA_SEG and CODE_SEG macro
...
These are for putting code and data to non-default sections
At the same time, move INIT section attributes declaration to cmake files
2020-11-02 21:27:06 +03:00
Timo Kreuzer
17fa04f10b
[NTOS:MM:X64] Fix MM_WAIT_ENTRY on x64
2020-11-01 09:32:27 +01:00
Timo Kreuzer
d4b4cf7448
[NTOS:MM] Make sure PXEs/PPEs and PDEs are always MM_EXECUTE_READWRITE
...
This is required since the NX protection proagates from the highest level, enforcing NX on the entire range, independent of whether lower level P*Es have the bit set or not. It might be useful to add a platform specific constant to allow making page tables NX on architectures that have a different behavior.
2020-11-01 09:32:27 +01:00
Timo Kreuzer
d55811f160
[NTOS:MM:X64] Fix session space initialization on x64
2020-11-01 09:32:27 +01:00
Timo Kreuzer
9095dbf5a5
[NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping
2020-11-01 09:32:27 +01:00
Timo Kreuzer
8980850d56
[NTOS:MM:X64] Simplify and fix x64 mapping code
...
- Use demand-zero-ptes in MiGetPteForProcess
- Handle NoExecute in MiSetPteProtection
- Fix MmIsPageSwapEntry
- Fix MmGetPageFileMapping
- remove obsolete functions.
2020-11-01 09:32:27 +01:00
Timo Kreuzer
0726cfce10
[NTOS:MM:X64] Handle PPEs and PXEs as well in MmInitializeProcessAddressSpace()
...
But don't set up the PFNs for the initial process on x64, as these have already been set up.
2020-11-01 09:32:27 +01:00
Timo Kreuzer
48d1bd2c88
[NTOS:MM:X64] On x64 allocate a VAD for the shared user page
2020-11-01 09:32:27 +01:00
Timo Kreuzer
a5d47ff72b
[NTOS:MM:X64] On x64 reserve the address range between FFFF800000000000 and FFFFF68000000000 in MiInitSystemMemoryAreas()
2020-11-01 09:32:27 +01:00
Timo Kreuzer
a8ba58fbb0
[NTOS:MM:X64] Improve x64 Mm initialization
...
* Move MiBuildPfnDatabaseFromPageTables into MiBuildPfnDatabase
* Make sure to call MmInitializeProcessAddressSpace() from the x64 version of MiInitMachineDependent()
* Handle result of MmInitializeProcessAddressSpace in MiInitMachineDependent (Should do the same for x86)
* Remove obsolete x64 debug print
2020-11-01 09:32:27 +01:00
Serge Gautherie
81be201d98
[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded ( #3303 )
...
CORE-17342
2020-10-31 15:18:02 +01:00
Timo Kreuzer
bdd4d5d8d8
[NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread
2020-10-31 14:23:16 +01:00
Timo Kreuzer
f66a7e2e48
[NTOS:KE:X64] Zero out the context in KiDispatchException
2020-10-31 14:23:16 +01:00
Timo Kreuzer
637183a12c
[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit, too)
2020-10-31 14:23:16 +01:00
Timo Kreuzer
2a8c680dbe
[NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExceptionToUser
2020-10-31 14:23:16 +01:00
Timo Kreuzer
1bfacf06f7
[NTOS:KE:X64] Zero out volatiles when returning from a system call
2020-10-31 14:23:16 +01:00
Timo Kreuzer
a016ccd117
[NTOS:KE:X64][ASM:X64] Fix delivery of APCs
...
- Deliver pending APCs on trap exit
- Pass the trapframe of KiApcInterrupt to KiDeliverApcs, not NULL.
- Fix parameter passing from KiSwapContext to KiSwapContextInternal and KiSwapContextResume, so that the ApcBypass parameter is not uninitialized
- Fix return value of KiSwapContextResume to correctly indicate whether we want to have APCs directly delivered or not (when there are non, or when delivery is suppressed)
2020-10-31 14:23:16 +01:00
Timo Kreuzer
fdc1261fb7
[NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code
2020-10-31 14:23:16 +01:00
Timo Kreuzer
52d1bb5ec9
[NTOS:KE:X64] Simplify KiInitializeUserApc
2020-10-31 14:23:16 +01:00
Timo Kreuzer
aaa86d078e
[NTOS:KE:X64] Move KiInitializeUserApc to usercall.c
2020-10-31 14:23:16 +01:00
Timo Kreuzer
fbdff437fd
[NTOS:KE:X64] Implement flushing the GDI batch
2020-10-31 14:23:16 +01:00
Timo Kreuzer
c86c55ace7
[NTOS:KE:X64] Change the logic of KeSwitchKernelStack and friends to be standards conforming
...
The previous version (like the x86 one) used a combination of C and asm code, called from C code to switch the stack. This is problematic, since there is no guarantee what assumptions C code makes about the stack (i.e. it can place any kind of stack pointers into registers or on the stack itself.) The new algorithm returns back to the systemcall entry point in asm, which then calls KiConvertToGuiThread, which is also asm and calls KeSwitchKernelStack ...
2020-10-31 14:23:16 +01:00
Timo Kreuzer
18b1aafd82
[NTOS:KE:X64] Improve kernel stack switching on GUI system calls
...
To be 100% correct and not rely on assumptions, stack switching can only be done when all previous code - starting with the syscall entry point - is pure asm code, since we can't rely on the C compiler to not use stack addresses in a way that is not transparent. Therefore the new code uses the same mechanism as for normal system calls, returning the address of the asm function KiConvertToGuiThread, which is then called like an Nt* function would be called normally. KiConvertToGuiThread then allocated a new stack, switches to it (which is now fine, since all the code is asm), frees the old stack, calls PsConvertToGuiThread (which now will not try to allocate another stack, since we already have one) and then jumps into the middle of KiSystemCallEntry64, where the system call is handled again.
Also simplify KiSystemCallEntry64 a bit by copying the first parameters into the trap frame, avoiding to allocate additional stack space for the call to KiSystemCallHandler, which now overlaps with the space that is allocated for the Nt* function.
Finally fix the locations where r10 and r11 are stored, which is TrapFrame->Rcx and TrapFrame->EFlags, based on the situation in user mode.
2020-10-31 14:23:16 +01:00
Timo Kreuzer
a6732905b8
[NTOS:KE:X64] Implement KiConvertToGuiThread, KeSwitchKernelStack and support for win32k syscalls in KiSystemCallHandler
2020-10-31 14:23:16 +01:00
Timo Kreuzer
fe6752f852
[NTOS:KE:X64] Fix bugs in KeContextToTrapFrame and KeTrapFrameToContext
...
Set valid EFlags, the non-volatiles need to be taken from the exception frame, because the ones from the trap frame might not be set.
2020-10-31 14:23:16 +01:00
Timo Kreuzer
a662c6f180
[NTOS:KE:X64] Silence KiRundownThread, it has nothing to do
2020-10-31 14:23:16 +01:00
Timo Kreuzer
eda01e5be7
[NTOS:KE:X64] Fix KiWriteSystemTime
2020-10-31 14:23:16 +01:00
Timo Kreuzer
8ec888487a
[ASM:X64] ASSERT that interrupts are enabled, when returning to user mode
2020-10-31 14:23:16 +01:00
Jérôme Gardou
f26754e6dd
[NTOSKRNL] Completely disable optimizations when using GDB
2020-10-21 13:11:20 +02:00
Jérôme Gardou
15dd31377a
Revert "[NTOS/MM] Initialize process Working set and start implementing adding entries to it"
...
This reverts commit 5abc016401
.
Not ready for prime time
2020-10-20 15:56:53 +02:00
Jérôme Gardou
1c528cbf84
Revert "[NTOS/MM]
...
- Fix PFNs tracing
- Add private pages to the process working set"
This reverts commit 4c5351bf55
.
Not ready for prime time
2020-10-20 15:56:21 +02:00
Jérôme Gardou
4c5351bf55
[NTOS/MM]
...
- Fix PFNs tracing
- Add private pages to the process working set
2020-10-20 15:20:59 +02:00
Jérôme Gardou
5abc016401
[NTOS/MM] Initialize process Working set and start implementing adding entries to it
2020-10-20 15:20:59 +02:00
Serge Gautherie
90a6086f17
[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.
2020-10-17 18:09:11 +02:00
Hermès Bélusca-Maïto
bd2a40d57b
[NTOS:IO] Some fixes for IoRaiseHardError(). ( #3302 )
...
CORE-14037
- Fix buggy retrieval of the current calling Irp->Tail.Overlay.Thread.
- The 4th argument (KernelRoutine) to the KeInitializeApc() is **NOT**
optional; however its 5th argument (RundownRoutine) is.
So use the mandatory routine for freeing the allocated APC instead.
We don't use the rundown routine yet.
- Check whether the ExAllocatePoolWithTag() call failed or not before
queueing the allocated APC.
2020-10-17 16:13:05 +02:00
Serge Gautherie
7790670dd8
[NTOS:EX] ExUuidCreate(): Correctly fill Uuid->Data4
...
ROSTESTS-359
Co-authored-by: Nguyen Trung Khanh <nguyentrungkhanh97@gmail.com>
2020-10-17 15:00:19 +02:00
Thomas Faber
6b3f309a08
[NTOS] Consistently use MUTANT_INCREMENT.
...
Spotted by Hermès.
2020-10-16 16:09:54 +02:00
Thomas Faber
ba9bf73d48
[NTOS:MM] Acquire PsLoadedModuleResource when walking PsLoadedModuleList. CORE-16449
2020-10-15 14:49:20 +02:00
Thomas Faber
a30edc324e
[NTOS:MM] Acquire MmSystemLoadLock in MiFindInitializationCode. CORE-16449
...
We might otherwise free the INIT section for an image that's in the
process of being loaded by Mm.
2020-10-15 14:49:11 +02:00
Dmitry Borisov
c464b02c90
[NTOS:PNP] Install mouse driver on NEC PC-98 series ( #3173 )
...
The current implementation of device tree enumeration does not distinguish
between possible identifier strings. This change is not a hack,
NT 5.2 still creates a new device node for this hardware ID.
The entire function should be rewritten to match Windows implementation.
2020-10-10 16:24:17 +03:00
Thomas Faber
ef1c726621
[NTOS:MM] Print debugging information in case CORE-16449 happens.
2020-10-08 08:59:46 +02:00
Thomas Faber
e57a59a60a
[NTOS:MM] Fail on SizeOfRawData overflow. CORE-17284
...
Fixes the corresponding tests in ntdll_apitest:NtMapViewOfSection.
Also add a TODO for the remaining test failures.
2020-10-03 13:20:25 +02:00
Thomas Faber
b957af4b6b
[NTOS:MM] VirtualSize overrides SizeOfRawData when mapping PE files. CORE-17284
...
This fixes the related failures in ntdll_apitest:NtMapViewOfSection
as well as loading of OrgPlayer's DragDrop.ocx.
2020-10-03 13:13:35 +02:00
Timo Kreuzer
3d17a7590d
[NTOS:MM] Fix paged pool initialization on x64
2020-10-01 11:24:42 +02:00
Timo Kreuzer
f2e3e8a1eb
[NTOS] Remove an old hack
2020-09-28 00:27:30 +02:00
Timo Kreuzer
d74037b666
[NTOS:PS] Fix size handling in ProcessDeviceMap
...
If you want to know the details, browse history or use git blame.
2020-09-28 00:24:53 +02:00
Victor Perevertkin
d01518da7c
[XDK] Add definitions required for newer storage class drivers (cdrom)
...
That introduced some warnings in the current code which were corrected as well
CORE-17129
2020-09-24 22:30:52 +03:00
Victor Perevertkin
f7c58468f1
[XDK] Move UNREACHABLE macro definition to ntbasedef.h
2020-09-24 05:35:43 +03:00
Timo Kreuzer
cb22d5f697
[NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything.
...
For NT6+ appcompat setting return STATUS_NOT_IMPLEMENTED
2020-09-20 23:08:17 +02:00
Timo Kreuzer
26484eea9f
[NTOS:MM] Fix MiSubsectionPteToSubsection
2020-09-20 23:08:17 +02:00
Timo Kreuzer
896d090ee6
[NTOS:MM] Call MiSessionAddProcess() from MmCreateProcess() like on x86
2020-09-20 23:08:17 +02:00
Timo Kreuzer
bebcda0b0b
[NTOS:MM] In the x64 version of MmCreateProcessAddressSpace() zero out all page table PFNs
2020-09-20 23:08:17 +02:00
Timo Kreuzer
04f0c7d0d7
[NTOS:KE] Zero out ExceptionFrame member in Syscall handler
2020-09-20 23:08:17 +02:00
Timo Kreuzer
366e8a840c
[NTOS:KE] Disable interrupts before lowering IRQL in KiDpcInterruptHandler to avoid stacking up DPC interrupts
2020-09-20 23:08:17 +02:00
Timo Kreuzer
3aaee35629
[NTOS:KE] Save and restore previous mode in KiZwSystemService and fix restoring the trap frame
2020-09-20 23:08:17 +02:00
Timo Kreuzer
b2a483b9ea
[NTOS:KE] Don't use FrLdrDbgPrint anymore. It served us well, but now it's time to go away.
2020-09-20 23:08:17 +02:00
Serge Gautherie
889b077b23
[REACTOS] *.spec: Fix some function/parameter types ( #3154 )
2020-09-20 19:21:11 +02:00
Michael Stamper
b43e4c981e
[KDBG] Fixed handle leak in KdbpSymLoadModuleSymbols() when RosSymCreateFromFile() fails ( #3184 )
2020-09-14 21:48:06 +02:00
Timo Kreuzer
2aca4b2795
[ASM] Fix boot with VS 16.7.3 / MSVC 19.27
...
See https://developercommunity.visualstudio.com/content/problem/1180800/ml-x86-assume-directive-causes-invalid-code-genera.html
2020-09-12 15:01:04 +02:00
Victor Perevertkin
32c7c1157d
[NTOS:IO] Fix a reference leak in IopSynchronousCall on failure case
...
Co-authored-by: Vadim Galyant <vgal@rambler.ru>
2020-09-08 14:51:20 +03:00
Victor Perevertkin
f562f9c5c6
[NTOS:IO] Fix IRP stack location check in IoForwardIrpSynchronously
...
We are doing IoCallDriver here, so the valid stack location should be
CurrentLocation <= Irp->StackCount (just a check for a completly incorrect value)
&& CurrentLocation > 1 (ensure that we have a place for another call)
CORE-17189
Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
2020-09-07 04:57:17 +03:00
George Bișoc
f87fb4e3df
[NTOS:RTL] Implement the kernel-mode version of RtlGetNtProductType ( #3029 )
...
RtlGetNtProductType comes into two variants: one in user-mode that is exported for use from NTDLL layer and the kernel-mode that is used exclusively by the NT kernel. The kernel-mode variant of the function is not exported.
2020-08-26 17:40:45 +03:00
Hermès Bélusca-Maïto
e69f845dab
[NTOS:FSTUB] Minor fixes.
...
- Some "PartitionInfo->PartitionNumber = 0;" are ROS-specific hacks for
xHalIoAssignDriveLetters(), that should be fixed... Mark them as such.
- Un-hardcode some "magic" values (partition IDs, max number of
partition table entries, etc.).
- Use NULL instead of '0' for null-pointers.
- Fix some typos in comments.
2020-08-25 14:44:24 +02:00
Hermès Bélusca-Maïto
e3c35c2227
[NTOS:FSTUB] Whitespace fixes only.
2020-08-25 14:40:34 +02:00
Victor Perevertkin
162d614cc1
[NTOS:IO] Queue device tree enumeration inside IoReportDetectedDevice
...
Without that, a DeviceNode is not created for a reported device and thus
it is not being attached to the device tree
CORE-17132
2020-08-21 08:53:33 +03:00
Victor Perevertkin
dc1d717b22
[NTOS:IO] Do not raise an unknown bugcheck inside the PiQueueDeviceAction
2020-08-21 08:50:12 +03:00
Victor Perevertkin
acd07e725e
[NTOS:IO] Do device reset inside the PipDeviceActionWorker
...
This make the operation synchonized with the other device tree actions
CORE-10456 CORE-17150
2020-08-21 08:20:59 +03:00
Victor Perevertkin
2839c85092
[NTOS:IO] Enumerate devices only inside the PipDeviceActionWorker
...
Introduce the PiPerformSyncDeviceAction routine for queuing
synchronous device actions
Change all kernel code to use PiPerformSyncDeviceAction and
PiQueueDeviceAction for device enumeration
CORE-10456
2020-08-21 08:02:26 +03:00
Victor Perevertkin
2ed132e90e
[NTOS:IO] change DEVICE_ACTION values and rename functions
2020-08-21 07:48:56 +03:00
Nguyen Trung Khanh
bc584bdf99
[NTOS:PS] Fix stack memory disclosure in PsGetContextThread #3024
...
Fix stack memory disclosure in PsGetContextThread.
2020-08-15 19:18:35 +09:00
Nguyen Trung Khanh
9d2ecd3a13
[NTOS:KE] Fix stack memory disclosure in KiInitializeUserApc ( #2988 )
2020-07-27 03:39:48 +03:00
Serge Gautherie
a3669fdef7
[NTOS:KD64] Fix 'MAX_KD_COMPONENT_TABLE_ENTRIES' value ( #2992 )
...
Addendum to ceb58c8
.
2020-07-18 19:42:30 +02:00
Hermès Bélusca-Maïto
46416a6238
[NTOS:KDBG] Adapt the formatting of the debug filter table display output to suit longer component names.
2020-07-18 18:16:21 +02:00
Hermès Bélusca-Maïto
7d3dac324e
[NTOS][KDBG] Use macros to simplify initializing the debug filter tables.
2020-07-18 17:45:40 +02:00
Hermès Bélusca-Maïto
ceb58c821a
[NTOS][SDK] Add new kernel debug filters that have been added in Win8 and Win10; they can be useful for us.
2020-07-18 17:45:40 +02:00
Hermès Bélusca-Maïto
b2eaf90557
[NTOS:KDBG] Minor code style fix.
2020-07-18 17:45:40 +02:00
Victor Perevertkin
5201472be7
[NTOS:FSTUB] Simplify xHalIoReadPartitionTable function
...
Use single IOCTL (IOCTL_DISK_GET_DRIVE_GEOMETRY_EX) for retrieving
disk basic geometry information along with disk size.
Previous implementation used to issue two requests for that.
2020-07-15 03:20:13 +03:00
Nguyen Trung Khanh
37c63770d7
[NTOS:IO] Fix pool memory disclosure in IopQueueTargetDeviceEvent ( #2966 )
2020-07-04 15:41:18 +02:00
Serge Gautherie
a72b78558d
[NTOS:MM] MiGetPageTableForProcess(): #if out unreachable code
...
No impact.
Detected by Cppcheck: unreachableCode.
Addendum to ddaf47dec3
(r34976).
2020-06-25 21:59:02 +02:00
Victor Perevertkin
21e9e2baa5
[NTOS:IO] Move device manipulation functions from pnpmgr/pnpmgr.c to pnpmgr/devaction.c
...
And rearrange them in more logical order.
This effectively splits the file, leaving public "Io" functions in
pnpmgr.c along with some things not related do device object management.
Functions which manipulate the device tree are left in devaction.c.
In future all these functions will only be accessed from
DeviceActionWorker.
While being public API, IoRequestDeviceEject and IoInvalidateDeviceState
have been moved to devaction.c as well. In next commits they will be
converted to DeviceActionWorker routines and their callers will be put
in pnpmgr.c
2020-06-24 04:03:35 +03:00
Victor Perevertkin
b5815efe83
[NTOS:IO] Move device node functions from pnpmgr/pnpmgr.c to pnpmgr/devnode.c
...
Add SAL2 annotations to functions while moving
Convert IopCreateDeviceNode description to a Doxygen format
2020-06-21 09:39:13 +03:00
Thomas Faber
add677e45b
[CMAKE] Bump minimum to 3.17, no longer require -ReactOS build. CORE-17109
2020-06-20 15:25:28 +02:00
Amine Khaldi
139a3d6661
[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
2020-06-06 21:58:41 +03:00
Serge Gautherie
3051eb0e48
[NTOSKRNL] Add 'DECLSPEC_NORETURN' to a few 'KeBugCheck*()' ( #2896 )
2020-06-06 17:50:14 +02:00
Thomas Faber
4f49a9c792
[NTOS:KE] Save ExceptionList in the assembly version of KiEnterTrap. CORE-15723
...
If SEH is used in a C trap handler, the exception frame will be
registered before the call to KiEnterTrap, which means we save
the wrong trap handler. We'll therefore also restore this wrong
frame for the excepting code, resulting in a stale SEH chain.
We avoid this problem by saving the handler in the assembly
trap entry code instead of from C. While SEH in a C trap handler
should now theoretically be safe, we still forbid it through
asserts in the C KiEnterTrap variants to make any potential
future problems more obvious. Should this functionality be
needed at some point and deemed safe, these asserts can then be
removed.
2020-06-06 08:44:30 +02:00
Thomas Faber
d40ff3ca98
[NTOS:KE] Split KiCheckForSListFault into its own function. CORE-15723
...
This avoids SEH in a trap handler.
See the following commit for more details.
2020-06-06 08:42:22 +02:00
Serge Gautherie
ceccaae311
[NTOS:MM] MmDeleteProcessAddressSpace(): Move 'Address' to where it belongs ( #2865 )
...
No impact.
Detected by Cppcheck: unusedVariable.
Addendum to 2dade10d54
.
2020-06-01 12:10:11 +03:00
Mark Jansen
2d9b385715
[NTOSKRNL] Group files in the project file based on directory layout
2020-05-29 21:10:10 +02:00
Stanislav Motylkov
4c78b2c38d
[NTOS:PO] Report correct CPU frequency in CurrentMhz
...
Also add some relevant FIXME comments. CORE-13206
2020-05-25 01:24:52 +03:00
Yaroslav Kibysh
93aa5801dc
[NTOS:INBV] Fix hardcoded values ( #2840 )
2020-05-24 19:37:47 +02:00
Serge Gautherie
de0ce9dd02
[NTOS:EX] ExpInitializeExecutive(): Fix 'PerfMem' copypasta ( #2841 )
...
Detected by Cppcheck: identicalInnerCondition.
Addendum to commit c307d73c
(r25621).
2020-05-24 19:37:16 +02:00
Serge Gautherie
cf510c3e64
[NTOSKRNL] Sync some INIT_FUNCTION ( #2824 )
...
- Sync some INIT_FUNCTION with how they are used and what is already
specified in the headers.
Addendum to commit 85e5b5be
(r49445).
- KdbpGetCommandLineSettings(): Remove INIT_FUNCTION.
Fix MSVC 2015 x86 custom build:
"...\ntoskrnl\kdbg\kdb.c(1699): error C2983: 'KdbpGetCommandLineSettings': all declarations must have an identical __declspec(code_seg(...))"
And may also fix obscure bugs when entering into the KDBG debugger.
2020-05-23 16:05:58 +02: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
Yaroslav Kibysh
319374eb71
[NTOS:INBV] Fix screen flash and more ( #2821 )
...
- Fix screen flash (CORE-16786);
- Don't process rotating bar if not used.
2020-05-21 00:23:17 +02:00
Thomas Faber
8c8c03e9a8
[NTOS:OB] Fix incorrect variable name in ObfDereferenceObject.
2020-05-17 21:43:58 +02:00
Thomas Faber
60346a5732
[NTOS] Prohibit use of MAX_PATH in the kernel. Use MAX_WIN32_PATH if you really mean it. CORE-15882
2020-05-17 21:30:08 +02:00
Thomas Faber
c60d25fb26
[NTOS:PNP] Directly accept a UNICODE_STRING in LocateChildDevice. CORE-15882
2020-05-17 20:56:16 +02:00
Thomas Faber
2242ca6920
[NTOS:PNP] Avoid an unnecessary stack buffer in PnpRootCreateDevice. CORE-15882
2020-05-17 20:56:16 +02:00
Thomas Faber
1b0fe76d0d
[NTOS:PNP] Avoid an unnecessary stack buffer in EnumerateDevices. CORE-15882
2020-05-17 20:56:16 +02:00
Thomas Faber
ac52401d74
[NTOS:PNP] Move child device creation into its own function
...
Also fix some leaks and a DPRINT format string.
2020-05-17 20:56:11 +02:00
Thomas Faber
db180c29c7
[NTOS:SE] Implement job case in PsImpersonateClient. CORE-8787
2020-05-17 16:05:00 +02:00
Joachim Henze
d28677795e
[NTOSKRNL] Restore section layout for NTOSKRNL to fix BSOD regression CORE-14683
...
This version (after .rsrc) works different than the
proper version I used for 0.4.12 (after .reloc).
Inserting after .rsrc is actually not correct, but Thomas believes it can
be used as a temporary trick to avoid random memory corruption upon
relocations of the kernel, caused by ROSBE-154.
I follow his advice, although when judging from practical tests only:
as long as we limit this script to NTOSKRNL like I do for releases
there have no negative consequences been observed in real life yet
even with the proper version of 0.4.12.
Up to now those problems have only been observed when used for drivers
MODULE TYPE sdk/cmake/gcc.cmake as well, like
it was tried for a moment in master 0.4.13-dev-609-g
c4d8e2a6e9
Using for drivers immediately did lead to BSODs like CORE-16183 and therefore was
mitigated in master by total disabling of the scripts for both,
kernel and drivers in
0.4.13-dev-621-g
36e9a6f8dd
To allow installing DVDWritenow without BSOD,
we need the script at least for ntoskrnl!
I committed this patch (after .rsrc) already into 0.4.13RC and 0.4.14RC.
2020-05-13 17:09:15 +02:00
Stanislav Motylkov
cd91271796
[NTOSKRNL][HAL][BOOTVID] Some more code refactoring
...
- Add boot video color constants
- Refactor palette initialization
- Move some common stuff in right place
- Get rid of some magic constants and hardcoded values
- Get rid of TopDelta variable (calculated at compile time)
- Update SAL annotations
Addendum to 5f2ca473
. CORE-16216 CORE-16219
2020-05-12 15:56:37 +03:00
Serge Gautherie
37d5522dfb
[NTOS:KE] KiTrap0DHandler(): Fix a copypasta
...
Addendum to r45038.
2020-04-26 17:32:40 +02:00
Timo Kreuzer
b82bf8ce16
[NTOS:IO] Fix parsing of resource lists
...
Also add a hack to avoid failing on now occurring resource conflict detection and try to fix at least one resource in ACPI hal.
CORE-10146
CORE-12892
2020-04-24 13:58:09 +03:00
Dmitry Borisov
4501bbac8f
[KDCOM][NTOS:INBV][FREELDR] Decrease default baud rate for PC-98 target ( #2601 )
...
According to PC-9801 Bible p. 50, divisor for PIT will become unsupported in some cases after having removed the fractional part. Replace 19200 value with 9600 which is supported by both 10 MHz and 8 MHz machines.
2020-04-21 23:22:42 +03:00
Victor Perevertkin
7e069ccdb2
[CMAKE] Replace custom functions to built-in ones
...
add_target_compile_definitions -> target_compile_definitions
add_target_compile_flags -> target_compile_options
add_target_include_directories -> target_include_directories
2020-04-16 15:59:38 +03:00
Victor Perevertkin
92dfec219d
[CMAKE][CONFIGURE] Enable runtime checks on MSVC by default.
...
Remove RTC switch from configure.cmd, now MSVC runtime checks are
supposed to be enabled/disabled via CMake define (-DRUNTIME_CHECKS=1)
Prepare for adding more dynamic analysis options
2020-04-11 02:48:12 +03:00
Hervé Poussineau
033102fdb1
[NTOS] Add a #define __ROS_ROSSYM__ when using rossym
...
Use it where needed.
2020-04-09 23:00:57 +02:00
Vadim Galyant
374f2b4d98
[NTOS][SDK:LIB] Add a Resources Arbiter library, to be used by bus drivers (acpi, pci), kernel and legacy hal (PIC HAL). ( #2471 )
2020-04-09 19:41:11 +02:00
Dmitry Borisov
1610367fe2
[BOOTVID][NTOSKRNL][HALX86] Move hardcoded coordinates of bootvid into one place. ( #2504 )
...
Co-Authored-By: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2020-04-09 15:17:48 +02:00
Vadim Galyant
3c585d0e38
[NTOS:MM] Since the _MMPTE_SUBSECTION structure for x86 (without PAE) uses the SubsectionAddressLow truncated by the least significant three bits, the _CONTROL_AREA, _LARGE_CONTROL_AREA, _SUBSECTION, _MSUBSECTION structures must be 8-byte aligned.
...
Corresponding checks in MmArmInitSystem() have been removed.
2020-04-06 11:16:34 +02:00
Thomas Faber
5032a40d33
[NTOS:MM] In MmArmInitSystem, perform self-tests after per-arch initialization.
...
Mm(Non)PagedPoolStart won't be initialized otherwise, making the tests
pretty pointless.
2020-04-06 11:16:34 +02:00
Thomas Faber
74a2c6ba42
[NTOS:MM] Initialize MmSubsectionBase on x86 builds. CORE-16731
...
Spotted by Vadim Galyant.
2020-04-06 11:16:34 +02:00
Thomas Faber
25a5aee86f
[NTOS:MM] Get rid of unnecessary MmZeroingPageThreadActive.
2020-04-06 11:13:55 +02:00
Thomas Faber
5280deecfa
[NTOS:MM] Fix MmZeroingPageThreadActive race condition.
...
If a thread calls MiInsertPageInFreeList after the zero page thread has
woken up from its wait but before it acquired the PFN lock,
MmZeroingPageEvent might get set again even though there is no additional
work to be done.
By setting MmZeroingPageThreadActive together with the event, the variable
correctly indicates for future callers that the zero thread will process
newly added free pages.
This partially reverts r72990.
2020-04-06 11:13:55 +02:00
Thomas Faber
34f4b218de
[NTOS:PO] Call power IRP handlers at PASSIVE_LEVEL when needed. CORE-11648 CORE-16704
...
This means we now correctly handle the DO_POWER_PAGABLE flag.
In particular, Windows's usbhub.sys calls KeDelayExecutionThread from a
power IRP dispatch routine. We now handle this correctly.
2020-04-06 11:12:47 +02:00
Vadim Galyant
7db342f8a1
[NTOS:PNP] Add set functions for debugging PNP and IO managers. ( #2457 )
...
Useful functions for debugging IO and PNP managers:
PipDumpDeviceNodes() - displays information about a node(s) in the device tree;
PipDumpResourceRequirementsList() - displays information about a Io List;
PipDumpCmResourceList() - displays information about a Cm List
The tree list of devices (DEVICE_NODE structures) is perhaps the main one in the PnP manager. They also store information about the hardware resources required and assigned to devices.
These functions can help with debugging. For example, you can call PipDumpDeviceNodes() before and after device enumeration and compare the resulting information.
For PipDumpDeviceNodes() it is possible to optionally output:
- allocated resources and boot configuration resources
- resources required
- translated resources
It is possible to displays both a single node and the entire tree.
Optionally, you can display child nodes.
The information output format for resource lists is maximally compressed, since often the only debugging port is a monitor.
The DebugLevel parameter allows dumping in two modes:
0 - unconditional;
1 - if NDEBUG is not defined in "debug.c".
2020-04-04 14:30:40 +02:00
Vadim Galyant
ac843d7b82
[NTOS:MM] Make the definitions and macros for x86 more human-readable. ( #2487 )
...
- Move also PDE_MAPPED_VA definition from common miarm.h to ..arch/mm.h.
- Add assert "PAE not yet implemented".
2020-04-04 14:26:15 +02:00
Vadim Galyant
b78cb36d91
[NTOS:MM] Using the macro MiIsPteOnPdeBoundary(). ( #2496 )
...
The SYSTEM_PD_SIZE constant should not be used to determine the page boundary for page tables. It is better to use the portable MiIsPteOnPdeBoundary() macro for this.
2020-04-02 12:15:33 +02:00
Hervé Poussineau
76a41370d0
[NTOS:KD] Move dump of stack trace on crash to debugger
...
Release builds now show again the bugcheck screen, instead of freezing.
2020-03-30 15:23:34 +02:00
Hervé Poussineau
fd8cacae4c
[NTOS:KE] Remove dead code
2020-03-30 15:23:25 +02:00
Hervé Poussineau
8b6e441a6e
[NTOS:KD] Fix compilation with CMAKE_BUILD_TYPE=Release
...
This was broken by commit a890fc64d1
2020-03-30 15:23:25 +02:00
Hervé Poussineau
38e53eea4f
[NTOS:KD] Fix compilation with CMAKE_BUILD_TYPE=Release
...
This was broken by commit f7ec84eea0
2020-03-30 15:23:25 +02:00
Jérôme Gardou
0b5033e2ff
[NTOSKRNL] Fix build
2020-03-30 07:36:30 +00:00
Mark Jansen
177ae91bf6
[RTL] Introduce RtlpImageNtHeader,
...
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857
2020-03-29 21:27:38 +02:00
Victor Perevertkin
99f9c1666d
[NTOS:MM] Make _X86PAE_ the only define for PAE-enabled kernel
2020-03-28 18:11:42 +03:00
Eric Kohl
93e72ed3d6
[NTOS:IO] Fix indentation. No code changes!
2020-03-21 14:32:18 +01:00
Eric Kohl
52d22630f5
[NTOS:PNP] Fix indentation. No code changes!
2020-03-21 13:23:23 +01:00
Eric Kohl
a8846037e1
[NTOS:PNP] Map device capabilities to capability flags
...
This fixes a devices Capabilities value in the registry.
2020-03-21 13:23:22 +01:00
Thomas Faber
72c51aabba
[NTOS:IO][GDI32][CMD] Fix some under-sized variables. CORE-14922
...
Fixes x64 boot with RTC.
2020-03-13 20:45:06 +01:00
Dmitry Borisov
222e79232c
[CPORTLIB][NTOS:INBV][KDCOM][FREELDR] Add ComPort library for NEC PC-98 series ( #2407 )
...
There are 2 known serial ports:
COM1 - based on Intel 8251A
COM2 - National Semiconductor 16550
2020-03-06 19:50:31 +01:00
Thomas Faber
6831468ccf
[NTOS:MM] Assert PFN lock ownership in MiInsertPageInFreeList.
...
AMD64 initialization previously only raised the IRQL.
It now acquires the lock where needed, as i386 does.
2020-03-02 20:50:54 +01:00
Eric Kohl
7a7212f984
[NTOS:IO] Fix indentation. No code changes!
2020-03-01 23:34:30 +01:00
Eric Kohl
9a07cde37f
[NTOS:IO] Improve the device action worker
...
- Improve the device action worker to support more than just a single action
- Move the action queue code from IoInvalidateDeviceRelations to a new function IopQueueDeviceAction.
2020-03-01 23:32:25 +01:00
Eric Kohl
a05051f554
[NTOS:IO] Move IopRemovePlugPlayEvent around and add the ResponseData parameter (not used yet)
2020-02-29 14:26:16 +01:00
Eric Kohl
482eb909fe
[NTOS:CONFIG] Fix NtSetValueKey data probing
...
Probe the data before allocating a copy buffer. Otherwise NtSetValueKey returns an unexpected status code in case of too large data size.
This fixes the NtSetValueKey ntdll api tests.
2020-02-23 21:35:57 +01:00
Serge Gautherie
1a83762ccc
[REACTOS] Fix '\n.' typos
2020-02-23 12:35:50 +01:00
Thomas Faber
754e175d12
[NTOS:MM] Use MI_ZERO_PTES as the number of usable zeroing PTEs, not the total allocated. CORE-11856
...
We'll now have 32 usable zeroing PTEs instead of 31.
MP kernels will (some day) zero up to 32 pages at a time.
2020-02-22 12:33:54 +01:00
Thomas Faber
5e891f727f
[NTOS:WMI] WMIP_GUID_OBJECT must start with an event object, as it is waitable.
...
The initializer for WmipGuidObjectType does not set UseDefaultObject,
and it's possible for user mode to obtain a handle to a GUID object
with SYNCHRONIZE access. Therefore that handle can be passed to
NtWaitForSingleObject, which means it must start with a DISPATCHER_HEADER.
2020-02-15 20:43:26 +01:00
Thomas Faber
feb7275bc8
[NTOS:MM] Use POOL_BILLED_PROCESS_INVALID constant.
2020-02-08 13:00:32 +01:00
Serge Gautherie
2c6747aff0
[NTOS:MM] Stop using PD_COUNT, PDE_COUNT and PTE_COUNT ( #2294 )
...
Directly use PPE_PER_PAGE, PDE_PER_PAGE, PTE_PER_PAGE constants from hardware-specific MM headers instead
2020-02-05 23:48:26 +01:00
Hervé Poussineau
8314c8eeba
[NTOS] Move FORCEINLINE specifier where appropriate
2020-01-22 20:57:01 +01:00
Thomas Faber
07de9d1da3
[NTOS:KE] In KiExitV86Mode, restore KTSS::Esp0 to its standard value. CORE-16531
...
The trap frame is in a random location on the stack, and setting Esp0 there
wastes significant amounts of space and may lead to unexpected stack overflows.
Also use a more descriptive expression for the V86 members of the KTRAP_FRAME.
2020-01-03 11:28:09 +01:00
Eric Kohl
9538c3ccd7
[NTOS:IO] Fix indentation. No code changes!
2020-01-02 23:25:26 +01:00
Hermès Bélusca-Maïto
9ba5594599
Happy New Year 2020 to everyone!!
...
🎊 🎆 🍾 🥳
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
__, ,__) __, ,__) __, ,__) ░░▄████▄░▄███▄░▄████▄░▄███▄░░
(--|__| _ ,_ ,_ (--|\ | _ (--\ | _ _ ,_ ░░▀▀░▄██░██░██░▀▀░▄██░██░██░░
_| |(_||_)|_)(_| _| \|(/_(_|_) \|(/_(_|| ░░░▄██▀░░██░██░░▄██▀░░██░██░░
( | | ,_| ( (__| ░░██████░▀███▀░██████░▀███▀░░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
███████████████████████████████████████████████████████████████████████████████
██████████████████▓▒▒▒▒▒▒▓▓█████████████████████████▓▓▒▒▒▒▒▒▓██████████████████
███████████████▒▒▒▒▓▓███▓▓▓▒▒░▒▓▓█████████████▓▒▒░▒▒▓▓████▓▓▒▒▒▓███████████████
█████████████▓░░░░░░░░░▒▒▓██████▓▒▒▒▓█████▓▒▒▒▓██████▓▒▒░░░░░░░░░▓█████████████
███████████▒▓░▒█████████▓▓▒░▒▓███▓▓▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▓▓████████▓▒░▓▓███████████
██████████▒▒▓░▓██████████████▓▓▓▓▓█████▓▓▓▓▓▓▓▓▒▒███████████████▓░▓░▒██████████
█████████▓░▓█░▓██████████▓▒▒▒▒▓▓▓▓███████▓▓▓▓▓▓▓▓▓▒▒▓███████████▓░█▒░▓█████████
█████████▓▒██▒▒████████▒▒░░░░▒▒▓▓▓███████▓▓▓▓▓▓▓▓▓▓▓▒▒░█████████▒▒█▓▒▒█████████
█████████▓░██▓░▓█████▓▓▒▒░░░░▒▒▓▓▓▓████▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▒░░▓█████▓░▓█▓░▓█████████
██████████░▓██▒▒▓██▓▓▓▓▓▒▒▒▒▒▒▓▓▓▓██████▓▓▓▓▓▓▒▒▒▒▒▓▓▓▓▒▒░░███▓░▒██▒░██████████
██████████▒▒▓██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████▓▓▓▒▒▒▒▒▒▒▒▒▓▒▒▒▒░░▓█▒▒██▓░▓██████████
███████████▒▒███▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▒▒░▒▒▒▒▒▒▒▒▒░░░▒███▒▓███████████
████████████▒▒█▓▓▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░░▒▒░░░▒▒▒░░░▓██▒▒████████████
█████████████▒▒▒▒▒▒░▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▒▒░░░░░░░░░░░░░▒▒▒▓▒▒█████████████
██████████████░░▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒░░░░░░░░░▒░░▒░▒██████████████
██████████████▓▒░▒▒▒▒▒░░▒▒░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░▓███████████████
██████████████▓▒▓░░▒▒▒▒░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░░░░░░░░░░▒░░░░░▓▒▓▓█████████████
███████████▓▒▓▓▓▒▒░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░▒▒▒█▒▒▓███████████
██████████▓▒▒█▓▓▒▒░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░▓▒▒▒▒██▒▒▓██████████
█████████▓▒▓██▓▒▒▒▒░░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░▒▒▒▒▒▒▓███▓▒▓█████████
████████▓▒▓███▓▒▒▒▒░░░▒░░░░░░▒░░░░░░░░░░░░░░░░░░░▓▒▒▒▒░▒▓▒▒▓▓▒▒▓▒▓██▓▒▓████████
███████▓▒▓███▒▓▓▒▒▒░░░░░▒░░░░░░▒░░░░░░░░░░░░░░░▓▒▒▒▒░▒▓▒▓▓▓▓▒▒██▓▒▓██▓▒████████
███████▒▒██▓▒▓█▓▓▒▒░░░░░░░▒░░░░░░▒░░░░░░░░░░░▓▒▒▒▒░▒▓▒▒▒▓▓▓▒▒▓███▓▒███▒▓███████
██████▓▒▓██▒▒███▓▒▒▒░░░░░░░░▒▒░░░░░▒▒░░░░░░░░▒▒░░▒▓▓▓▓▒▒▒▒▒▒▓█████▒▒██▓░▓██████
██████▒▒██▒▒█████▓▒▒▒░░░░░░░░░▒░░░░░░░▒░░░░▒▒░░▒▓▒▒▒▒▒▒▒▒▒▒████████▒▒██▒▒██████
██████▒▓██░▓██████▓▓▒▒▒░░░░░░░░░░▒░░░░░░░▒░░░░▒▒▒▒▒▒▒▓▓▒▒██████████▒░██▒▒██████
██████▒▒▓▓▒█████████▓▓▒▒▒░░░░░░░░░░▒▒░░░░▒▒▒▓░░░▒▒▒▒▒▓▓████████████▓▒▓▓░▒██████
██████▓░▒▒▒███████████▓▓▒▒░░░░▒▒▒░▒░▒▒▒▒░░▒▒▒▒▒▓▒░░▒▒██████████████▓░▒▒▒███████
███████▓▒░░▒█████████▓▒▒░░▒▓▓▒▒▒░░░░▒▒▒▓▒▓▒░░▒▒▓▓██▓▓▒░▒▒▓█████████▒░░▒████████
██████████▒░░░░░░░▒▒▓▓█████▓▓▒░░▒▓██▓▓████████▒░▒▒▓██████▓▓▒▒░░░░░░░▒██████████
███████████▓▒▒▒▓▓████▓▓▒▒▒░▒▒█████████████████████▒▒░▒▒▓▓▓███▓▓▒▒▒▒████████████
████████████████▓▓▓▓▓▓███████████████████████████████████▓▓▓▓▓▓████████████████
███████████████████████████████████████████████████████████████████████████████
███████████████████████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████▓░░▓████████░░░▓█████
███▒░░░░▒▓███████████████████████████████████████▒█████▓▒▒▓██▓▒▒▓████▓░█▓░▓████
███▒█████░▒███▓▒▒▒▒▒▓████▓▒▒▒▒▒▓█▓███▓▒▒▒▒▒▒▓██▓▒░▒▒▓▒▓█████████▓▒██▓▒█████████
███▒█████░▒█▓▒▒█████▒▒██▒▒▓████▓░▒██▒▒▓████▓▒▓██▓░▓██▓███████████▓▓██▓░░░▒█████
███▒█▓░░▒▓█▓▒▒▓▒░░▒▓▒░▒▓▒███████▒▒██▒████████████░███▓███████████▓▓██████░▒████
███▒██░▓███▓▒▓█████████▓▒███████▒▒██▒████████████░███▒▓██████████▓████████░▓███
███▒███░▒▓██▓▒▒████▓▒▓██▓▒▒▓██▓▒░▒██▓▒▒▓███▓▒▓███░████▓▒▒█████▒▒▓███▓▒▓██░▓████
███▒████▓░▓████▒▒▒▒▒██████▓▒▒▒▒▓█▓████▓▒▒▒▒▓█████▒███████▓▒▒▒▒▓███████▒▒▒▓█████
███████████████████████████████████████████████████████████████████████████████
2020-01-01 00:00:00 +01:00
Timo Kreuzer
7523a7b138
[NTOS:KE] Rename some locking functions to reflect the IRQL level changes
...
* KiAcquireApcLock -> KiAcquireApcLockRaiseToSynch
* KiAcquireApcLockAtDpcLevel -> KiAcquireApcLockAtSynchLevel
* KiReleaseApcLockFromDpcLevel -> KiReleaseApcLockFromSynchLevel
* KiAcquireApcLockAtApcLevel -> KiAcquireApcLockRaiseToDpc
* KiAcquireProcessLock -> KiAcquireProcessLockRaiseToSynch
* KiReleaseProcessLockFromDpcLevel -> KiReleaseProcessLockFromSynchLevel
* KiAcquireDispatcherLockAtDpcLevel -> KiAcquireDispatcherLockAtSynchLevel
* KiReleaseDispatcherLockFromDpcLevel -> KiReleaseDispatcherLockFromSynchLevel
* Add some ASSERTs
2019-12-31 15:30:27 +01:00