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