- Use the standard "CmHive" naming (that is used in all the rest of the 'config' module) for the first parameter of CmpInitializeHive.
[CMLIB]
- Fix the order of the 'HiveFlags'/'FileType' parameters in HvInitialize (the function 'CmGetSystemControlValues' in ntoskrnl/config/cmcontrl.c got them right already).
svn path=/trunk/; revision=70564
- Use the LockQueueIoDatabaseLock spinlock to guard the device list instead of blindly raising the IRQL
- Add missing lock to IopEditDeviceList
svn path=/trunk/; revision=70496
Disable again the DR7 check until we correctly understand why bit 10 of DR7 (reserved) is almost always set (this lead to MSVC-built ReactOS crashing when being starting in non-debugging mode). See also r69244.
CORE-10165 #comment DR7 check again disabled in r70418.
svn path=/trunk/; revision=70418
Fix the value for EIP used by KDBG after an INT3 set by KDBG itself. The address is already fixed by KiDispatchException, but only in the context frame, not in the trap frame and KDBG insists to use the trap frame for a lot of things. Also, after a cont from such an int3, KDBG uses a single step to re-enable the breakpoint (it needs to disable it after it was hit to be able to execute the actual instruction), but it used to dismiss *any* single steps after that. So make sure, that an actual single step, as created by the debugger is not being dismissed, but the break point is still restored after the next single step entry. You might expect that a kernel debugger would at least support setting breakpoints, but this is KDBG.
svn path=/trunk/; revision=70416
- Raise the IRQL when enumerating device lists so it doesn't get edited mid-listing
- Don't hardcode the pointer size when checking the buffer size
svn path=/trunk/; revision=70408
- Properly acquire process rundown
- Reference job object when assigning a process to it
- Don't assert when creating a child process whose parent is in a job
Fixes crashes in kernel32_winetest:process
svn path=/trunk/; revision=70177
Comment out for now in MCB the assert hit when attempting to write on an extX volume.
Aleksey, could you have a look at it?
CORE-10407 #comment Can you retry with r69750?
svn path=/trunk/; revision=69750
Improve the oplocks stubs:
- Always return success when FsRtlCheckOplock() is called: we deny oplock creation at FsRtlOplockFsctrl(), so the oplocks can only be fine.
- Always return TRUE when FsRtlOplockIsFastIoPossible() is called: we deny oplock creation at FsRtlOplockFsctrl(), so no oplock can prevent fastio from happening.
This enables (for real :-)) write support in extX FSD. Not 100% perfect though, as it hits an assert in MCB (but that's yet another story).
Full implementation to come later on.
CORE-10407
CORE-10442
svn path=/trunk/; revision=69742
- Initialize SepRmDbLock and create the system and anonymous logon sessions in Phase 0, right before the system process token is created.
- Implement functions to reference and dereference a logon session.
- Reference a logon session in SepCreateToken and SepDuplicateToken.
- Dereference a logon session in SepDeleteToken.
svn path=/trunk/; revision=69735
- Properly parse SymbolicLinkName (in particular, don't assume it's null-terminated) in IoSetDeviceInterface. Fixes IoDeviceInterface test failures and subsequent crashes due to memory corruption
CORE-9456
svn path=/trunk/; revision=69729
- Move the message typedefs into a shared header file.
- Implement LsapRmCreateLogonSession and LsapRmDeleteLogonSession. Call LsapRmCreateLogonSession in LsapCreateLogonSession.
svn path=/trunk/; revision=69714
- Add the SRM code from Timos kernel-fun branch.
- Move its lsasrv code to a separate file.
Thank you very much, Timo!
svn path=/trunk/; revision=69697
Don't keep spining forever in CcRosFlushDirtyPages() when flushing a dirty VACB fails on a RO volume.
This can be triggered with extX volumes and can prevent shutdown from succeeding
svn path=/trunk/; revision=69602
Isolate KD a bit by replacing Rtl* memory routines with internal versions. Lets one put breakpoints inside kernel memcpy/memset without making KD very, very sad. Fix MmDbgCopyMemory to also not use RtlCopyMemory -- there is no need for it since it only performs 1-to-8 byte copies anyway. Minor fixes in the print/prompt routines.
svn path=/trunk/; revision=69539
Fix mapping of working set list page -- it should be local.
Get rid of MI_MAKE_LOCAL_PAGE and use ValidKernelPdeLocal/ValidKernelPteLocal consistently. This is what they exist for!
We should now hopefully not be creating any global pages when we don't want them.
Next step; fix flushing.
Bonus: Use the right lock in MiSessionLeader
svn path=/trunk/; revision=69532
Add super-complicated handling of global pages to KeFlushCurrentTb (pretty much the same code which has been in HalpFlushTLB for the past ~6 years). This should be all that is required to make this feature work (everything else being in place already), and *seems* to work fine but is disabled under a switch until tested thoroughly.
Global pages, an important optimization that allows for not flushing the whole x86 TLB every time CR3 is changed (typically on context switch to a new process, or during process attach/detach), relies on us doing extra work whenever we do alter a global page. This is likely where any bugs will have to be flushed out!
Fixup Ki386EnableGlobalPage while we are at it -- disable/restore interrupts properly, and verify PGE-bit isn't set (nothing should have touched it before this routine, which is responsible for initializing it, so we shouldn't have to disable it). Fix, but disable, the CPU-sync spin as well as there should be no particular reason to do this for PGE-enabling during initialization (no other processor will be messing with PTEs at this stage, as compared to a call to KeFlushEntireTb).
Everyone, repeat after me: Global pages are awesome!
svn path=/trunk/; revision=69528
- Pass the correct DeviceObject to PoRequestPowerIrp's callback
- Use the IRP stack to store callback parameters instead of a pool allocation as shown by the test
svn path=/trunk/; revision=69503
- Move cmindex.c and cmname.c to cmlib, because bootmgr/winload use the kernel's cm implementation, unlike our freeldr which uses an almost copy-pasted-but-not-shared-because-hey-why-not-have-to-fix-the-bugs-in-two-places-instead-of-just-one implementation.
- Minor fixes to headers to allow those two files to be used/built outside of ntoskrnl.
svn path=/trunk/; revision=69444
Don't bugcheck on unimplemented FsRtlOplockFsctrl(), FsRtlCurrentBatchOplock(), FsRtlCheckOplock()
Properly implement FsRtlInitializeOplock() (which is no-op on Windows 2k3)
CORE-10284 #resolve #comment Resolved with r69412
svn path=/trunk/; revision=69412
Misc trap/interrupt fixes:
- Stub legacy KiGetTickCountHandler (INT 2A) to fail instead of breakpointing. We have made it so far without it, and if someone finds something that actually uses this instead of Win32's GetTickCount we can add it then. Raises the bar of making ReactOS breakpoint from 2 bytes to 4.
- Bugcheck with the right status code in case Kei386EoiHelper is called (which means you are trying to load a Windows HAL which we totally do not support right now).
- Use Ke* instead of Kf* in C code for IRQL routines.
svn path=/trunk/; revision=69362
[EX] Remove "KeGetCurrentProcess" and just use the EPROCESS Pcb member for type correctness instead of inventing a new macro to hide the casting.
[PS] Remove stray INIT_FUNCTION (doesn't do much on a prototype).
[IO] Define _IO_DEBUG_ to 0 again after someone forgot to leave it on 4 years ago (only bloated the code since IopTraceLevel was 0 anyway).
svn path=/trunk/; revision=69354
[NTOSKRNL]: Add a helper function such that user-mode cannot pass certain kernel-only object attributes to ObOpenObjectByPointer.
[NTOSKRNL]: Make \Device\PhysicalMemory OBJ_KERNEL_EXCLUSIVE
[NTOSKRNL]: Deny access to user-mode when opening a handle to an object with OBJ_KERNEL_EXCLUSIVE
[NTOSKRNL]: Fix NtOpenProcess, NtOpenThread, NtOpenThreadTokenEx, NtOpenProcessTokenEx to use the helper function. Should fix Rtl using OBJ_KERNEL_HANDLE in user-mode.
Thanks to ThFabba for finding out these bugs, and the hbelusca for adding a missing check to NtOpenProcessTokenEx.
svn path=/trunk/; revision=69340
Aside question: we have a "nmidebug" driver in \drivers\base\. In it is a NMI callback "NmiDbgCallback". I was wondering what "((void(*)())&KiBugCheckData[4])();" should do, according to the surrounding code, since in some conditions this code path is actually run: http://i.imgur.com/TUsEr5p.jpg
svn path=/trunk/; revision=69337
[NTOSKRNL]: Actually apply the foreground priority boost to threads in a foreground process.
[NTOSKRNL]: Correctly handle the case where the quantum length and fixed/variable flag are set to "default", instead of falling back into the server case.
Thanks to WINSRV doing the right thing, ReactOS console apps now receive the priority separation boost. However, my tests show that it doesn't last as long as it should on Windows (quantums too short? bug in priority decrement?). Also, since Win32k.sys doesn't tell the kernel about foreground GUI apps, they don't get the boost. Someone needs to add a NtSetInformationProcess call in whatever win32k function determines active focus.
Dedicated to ThFabba who needs to write some tests ;-)
svn path=/trunk/; revision=69324
- Fix memory leak in IopDetectResourceConflict. While we're at it use pool tagging, kernel handles and avoid INVALID_HANDLE_VALUE.
svn path=/trunk/; revision=69227
[NDK] Add define guard for HalEndSystemInterrupt because it is no longer compatible with Windows, and add back the old definition. Fix NtSetSystemEnvironmentValueEx prototype.
[KERNEL32] Export SetFileCompletionNotificationModes (MSDN and headers documents it as Vista-only, but this is not entirely correct).
svn path=/trunk/; revision=69144
- Fix the ASSERT in KeConnectInterrupt for debug single-processor builds (but keep the old one for multiprocessor build to make it less confusing if it is hit).
svn path=/trunk/; revision=69075
- Use MmExpansionLock to synchronize changes to MmProcessList. Should fix random crashes in MmDeleteProcessAddressSpace.
CORE-10111 #resolve
svn path=/trunk/; revision=69031