Commit graph

8623 commits

Author SHA1 Message Date
Thomas Faber 83400d8fc7 [NTOS]
- Addendum to r69022

svn path=/trunk/; revision=69023
2015-09-05 11:53:04 +00:00
Thomas Faber 2565dcba26 [NTOS:PS]
- Implement NtApphelpCacheControl. Patch by Mark Jansen
CORE-9914 #resolve

svn path=/trunk/; revision=69022
2015-09-05 11:49:54 +00:00
Thomas Faber f0988cafd6 [NTOS]
- Fix build
CORE-9914

svn path=/trunk/; revision=69021
2015-09-05 11:32:02 +00:00
Thomas Faber cba5662485 [NTOS:WMI]
- Actually fix WmipShutdown. Spotted by Hermès
CORE-10105

svn path=/trunk/; revision=69014
2015-09-04 22:11:51 +00:00
Thomas Faber 8701931bfa [NTOS:KE]
- Fix KiGetCacheInformation for Intel processors according to the latest Intel Instruction Set Reference

svn path=/trunk/; revision=69012
2015-09-04 20:33:37 +00:00
Thomas Faber 3d95d5dd14 [NTOS]
- Fix TAG_IRP

svn path=/trunk/; revision=69004
2015-09-04 16:16:48 +00:00
Thomas Faber 2758598c82 [NTKRNLMP]
- Apply link flags to the right module

svn path=/trunk/; revision=68976
2015-09-04 06:37:05 +00:00
Hermès Bélusca-Maïto da4344a24c Forgot those three ones.
svn path=/trunk/; revision=68972
2015-09-03 23:59:27 +00:00
Hermès Bélusca-Maïto 26b7393e00 [NTDLL][HAL][INFLIB][RTL][NTOS] VOIDify function paramater lists when they indeed don't take any arguments.
svn path=/trunk/; revision=68971
2015-09-03 23:57:39 +00:00
Pierre Schweitzer 9f74cf45b1 [NTOSKRNL]
Mark more functions as INIT

svn path=/trunk/; revision=68970
2015-09-03 22:19:16 +00:00
Stefan Ginsberg 7c209f0f0f - Now that we actually take the trouble to set up MmLargeStackSize properly, use it! Also make it possible to set via the registry by adding it to the control vector table.
svn path=/trunk/; revision=68964
2015-09-03 20:04:28 +00:00
Stefan Ginsberg da0a374ef0 - Don't put VdmpInitialize in .INIT either as it is not called during kernel initialization, but from videoport driver during its initialization. CORE-10097
svn path=/trunk/; revision=68938
2015-09-03 16:52:28 +00:00
Stefan Ginsberg 72a849ff44 - Enable placing kernel functions in the .INIT section (GCC only, MSVC is TBD). This allows them to be freed from memory after initialization is finished.
- PspMapSystemDll and IopDisplayLoadingMessage are called from non-initialization code, so don't put them in .INIT. CmpHiveRootSecurityDescriptor is called from initialization code, but too late in boot, so don't discard it either.
- Trying to enable this for HAL as well leads to a weird crash very early in boot. Investigation is ongoing. Until then we will just have to keep the huge PCI Class/Vendor tables in memory...
- Enable it for Win32k though as it seems to work fine there.
- Remove INIT_FUNCTION from function prototypes, it serves no purpose there.
See issue 10097 for more details.

svn path=/trunk/; revision=68937
2015-09-03 15:31:09 +00:00
Stefan Ginsberg 349dd3bfe4 - Explicitly make the kernel .rsrc/Resource Directory non-discardable and non-pageable on MSVC builds, as it is accessed from bugcheck code. Previously this data was marked as discardable and the bugcheck routine would bugcheck (after a certain stage in boot) when trying to access the bugcheck code data because the data was discarded and the memory invalidated. Thanks to Thomas for the help and the fix.
svn path=/trunk/; revision=68930
2015-09-03 09:29:26 +00:00
Christoph von Wittich 075ba93d0c [NTOS:SE] fix uninitialized variable usage CID 1322236
svn path=/trunk/; revision=68925
2015-09-03 07:15:52 +00:00
Thomas Faber f14431ec16 [NTOS:SE]
- Correctly check ACE type in SeFastTraverseCheck. CID 1102005

svn path=/trunk/; revision=68911
2015-09-02 09:19:52 +00:00
Stefan Ginsberg e4007ae73a - Implement super-simple KeSweepICache that always flushes the entire instruction cache. Use it in KD64 after modifying memory to make sure CPU gets the correct code to execute, and in NtFlushInstructionCache. May improve breakpoints somewhat.
- Move NtFlushInstructionCache from sysinfo.c to virtual.c where it fits better. Likewise, move it from kefuncs to mmfuncs in NDK, and fix function arguments (ULONG -> SIZE_T).
- Re-enable TRAP_DEBUG, adding back critical checks in the trap code. Checks can be improved but it is better than potentially silently messing up system state.
- Move remaining RtlPrefetchMemoryNonTemporal code into kernel. Stubbed for non-x86.
- By Hermes suggestion, override ASSERT to NT_ASSERT only for MSVC builds as that is where the main benefit is.

svn path=/trunk/; revision=68907
2015-09-01 23:45:48 +00:00
Pierre Schweitzer 9bd7b06448 [NTOSKRNL]
Fix KdpPrompt():
- Don't attempt to return in the middle of the loop. It leads to keep the mouse disabled instead of reenabling it.
- Also, return a string length that actually matches what was written to the output buffer.

This fixes invalid behavior on RtlAssert when used with #if 0 moved to #if 1, or when Windows NTDLL is used in ReactOS.

CORE-10082 #resolve #comment Fixed with r68905
CORE-10083 #resolve #comment Fixed with r68905

svn path=/trunk/; revision=68905
2015-09-01 22:32:55 +00:00
Stefan Ginsberg eebbf23330 - Move misplaced RtlPrefetchMemoryNonTemporal from rtl into kernel where it belongs (it only exists as an export for use by drivers to safely try to use prefetchnta even if it may not be available). Use existing global KePrefetchNTAGranularity that is set to the correct value via cpuid instead of hardcoded "Ke386CacheAlignment".
svn path=/trunk/; revision=68903
2015-09-01 19:51:52 +00:00
Thomas Faber fb17ced703 [NTOS:KE]
- Enable DPC timeout check on debug builds. Suggested by Stefan

svn path=/trunk/; revision=68902
2015-09-01 18:26:29 +00:00
Thomas Faber 62945a0c1c [NTOS:EX]
- Remove the timer's list entry instead of the list head in NtSetTimer and NtCancelTimer. Fixes list entry corruption on VMware Hybrid builder
CORE-10081 #resolve

svn path=/trunk/; revision=68901
2015-09-01 17:52:09 +00:00
Pierre Schweitzer aafd9216cf [NTOSKRNL]
Fix MSVC build?

svn path=/trunk/; revision=68900
2015-09-01 17:32:34 +00:00
Pierre Schweitzer 82cc4faad5 [NTOSKRNL]
Probe buffers in case they come from user-mode in KdpPrint() and KdpPrompt().
This fixes two fixme.

svn path=/trunk/; revision=68899
2015-09-01 17:23:56 +00:00
Stefan Ginsberg cb58261a0c - Fix what should hopefully be the last bug in the floating point state save/load code -- in KiNpxHandler check if the state is loaded before unloading it instead of checking if it is *unloaded* before... unloading it. Also clear up some comments.
- Thomas is da man.

svn path=/trunk/; revision=68894
2015-09-01 13:20:50 +00:00
Stefan Ginsberg e441f06d17 - You know what, NT_ASSERT is awesome.
svn path=/trunk/; revision=68891
2015-09-01 09:25:18 +00:00
Stefan Ginsberg 33f24ed20a - Missed these. Goodbye NT_ASSERT.
svn path=/trunk/; revision=68890
2015-09-01 08:41:39 +00:00
Stefan Ginsberg e4fd9b81bc - Remove all NT_ASSERT from the kernel and replace with good old ASSERT, for ease of debugging, especially for tests run on the build servers. There is no need to use NT_ASSERT in the kernel.
- The fish is long gone.

svn path=/trunk/; revision=68888
2015-09-01 01:45:59 +00:00
Stefan Ginsberg a4f0ae9e87 - Fix link fix build.
svn path=/trunk/; revision=68887
2015-09-01 00:38:40 +00:00
Stefan Ginsberg fdeca1b2b2 - Small patch to fix (delayed) loading of floating point state. Enables the special handling of fpu exceptions caused by frstor when used by the kernel, by implementing its use in assembly so the trap handler gets the instruction address it needs (for ALl compilers!). May or may not fix the fact that floating point state is not properly saved between threads.
See CORE-10005.

svn path=/trunk/; revision=68886
2015-09-01 00:20:57 +00:00
Thomas Faber ac0593b71d [NTOS:EX]
- Don't leak process reference in NtFlushInstructionCache. Spotted by Stefan

svn path=/trunk/; revision=68881
2015-08-31 13:53:14 +00:00
Hermès Bélusca-Maïto 90143b555c [NTOS:KD]: Disable to dprints.
svn path=/trunk/; revision=68864
2015-08-29 16:56:09 +00:00
Thomas Faber a7236633f6 [NDK][NTOS]
- Move KeProfileInterrupt[WithSource] declarations to NDK since they're exported
- NtCreateProfile's fourth parameter is SIZE_T
- Add NtCreateProfileEx prototype
CORE-10066

svn path=/trunk/; revision=68861
2015-08-29 15:04:01 +00:00
Thomas Faber 6d331859f3 [NTOS]
- Fix GCC build

svn path=/trunk/; revision=68860
2015-08-29 14:35:02 +00:00
Thomas Faber e693a9b767 [NTOS:KE]
- Fix swapped parameters of KeSetIntervalProfile
- Calculate the correct bucket pointer in KiParseProfileList, and actually increment the counter
CORE-10066

svn path=/trunk/; revision=68859
2015-08-29 14:30:29 +00:00
Thomas Faber a2833fad4b [NTOS:EX]
- Fix MDL leak in NtStopProfile
CORE-10066

svn path=/trunk/; revision=68858
2015-08-29 14:14:43 +00:00
Hermès Bélusca-Maïto d328dc16b4 [NTOS]
Addendum to r68851:
- Reset the state of the worker thread *after* having captured the data, not before.
- Fix the explanations given in comments.

svn path=/trunk/; revision=68854
2015-08-29 12:53:08 +00:00
Thomas Faber f917e6193e [NTOS:EX]
- Remove superfluous dereference in NtCreateProfile
- Allocate the right size for KPROFILE object
- Don't leak the KPROFILE when deleting an EPROFILE
- Avoid some casts
CORE-10066

svn path=/trunk/; revision=68852
2015-08-29 07:35:59 +00:00
Hermès Bélusca-Maïto dd088b28fc [NTOS]
Implement the WinDBG Debugger Worker Thread, which is created inside a target process whenever one uses the ".process /i <addr>" (invasive debugging) command using WinDBG in kernel-mode debugging.
See https://www.microsoftpressstore.com/articles/article.aspx?p=2201303&seqNum=2 section "Switching the Current Process Context" (from the book "Inside Windows Debugging" by Tarik Soulami, pp.101-102) for more details.
The names of the variables must be kept as they are, because WinDBG (more exactly, dbgeng.dll) searches for them within the kernel symbols and retrieves their addresses (since those variables are not publicly exported).

svn path=/trunk/; revision=68851
2015-08-29 02:03:56 +00:00
Hermès Bélusca-Maïto a39b4f51b9 [NTOS]
Fix x64 compilation:
- Some KDBG symbols for win32k debugging are defined only in x86 platform when _WINKD_ is disabled.
- KdSetOwedBreakpoints is defined only if _WINKD_ is enabled, addendum for x64 to r68842.

svn path=/trunk/; revision=68848
2015-08-28 14:01:58 +00:00
Pierre Schweitzer 5777e8100c [NTOSKRNL]
Fix build

svn path=/trunk/; revision=68842
2015-08-28 06:19:31 +00:00
Hermès Bélusca-Maïto a7d4979a10 [NTOS:KD]
- Fix the condition check when setting twice (or more) the same breakpoint.
- Implement support for deferred breakpoints. For more information, see: http://www.osronline.com/article.cfm?article=541 (which also exposes an interesting problem about them).

svn path=/trunk/; revision=68841
2015-08-28 03:03:26 +00:00
Stefan Ginsberg ca5361525f - Fix a "clever" check in KdpDeleteBreakpointRange that made the routine unable to delete more than one breakpoint in the specified range.
svn path=/trunk/; revision=68790
2015-08-21 20:57:19 +00:00
Pierre Schweitzer 6a08c60dee [NTOSKRNL]
Don't enforce tag on free, it may have been reallocated by someone else (Ob)

svn path=/trunk/; revision=68788
2015-08-21 20:40:47 +00:00
Pierre Schweitzer 08229bbb07 [NTOSKRNL]
Addendum to r68759: don't forget to initialize semaphore.

svn path=/trunk/; revision=68782
2015-08-21 11:21:14 +00:00
Pierre Schweitzer 51832e3b60 [NTOSKRNL]
Define UNC tag in tag header

svn path=/trunk/; revision=68781
2015-08-21 08:17:48 +00:00
Pierre Schweitzer b871e6a07c [NTOSKRNL]
Implement the TokenImpersonationLevel case of SeQueryInformationToken().

This fixes VBoxSF driver not being able to expose shared folders in ReactOS

svn path=/trunk/; revision=68777
2015-08-21 08:03:11 +00:00
Pierre Schweitzer b94bea6426 [NTOSKRNL]
Addendum to r68759

svn path=/trunk/; revision=68760
2015-08-18 20:40:17 +00:00
Pierre Schweitzer 4c1d3954cd [FSRTL]
Rewrite FsRtlRegisterUncProvider() and FsRtlDeregisterUncProvider() so that they can support MUP in case it's required
They also support DFS


svn path=/trunk/; revision=68759
2015-08-18 20:17:28 +00:00
Pierre Schweitzer 2127a98b5d [NTOSKRNL]
Don't enforce IO tag when freeing file object name, it might have been reallocated by a driver for an Ob reparse


svn path=/trunk/; revision=68756
2015-08-18 20:17:19 +00:00
Thomas Faber 5b9dc886d4 [NTOS:MM]
- Leave guarded region in failure case of MiFindContiguousPages.
CORE-10026 #resolve

svn path=/trunk/; revision=68753
2015-08-18 11:28:30 +00:00