Commit graph

8763 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
a5ed535978 [NTOS:CONFIG]
- 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
2016-01-10 01:28:04 +00:00
Hermès Bélusca-Maïto
63025d14ef [NTOS:PO]: Whitespace fixes only!
svn path=/trunk/; revision=70535
2016-01-07 20:00:05 +00:00
Hermès Bélusca-Maïto
d407f4f1e3 [NTOS:MM]: Don't hardcode Mm tags since we have a #define
svn path=/trunk/; revision=70498
2016-01-05 19:53:07 +00:00
Ged Murphy
f8cbc3e48c [NTOSKRNL]
- 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
2016-01-05 18:58:32 +00:00
Alex Ionescu
9a4cbe2cbe [CMLIB]: Move Value functions to CMLIB as well, so that they can be shared with the new boot code.
svn path=/trunk/; revision=70489
2016-01-05 01:51:54 +00:00
Hermès Bélusca-Maïto
42fdef7ea4 Happy New Year 2016 !!
☆.¸¸.•´☆.¸¸.•´☆.¸¸.•´☆.¸¸.•´☆

⋱★⋰⋱☆⋰⋱★⋰⋱☆⋰⋱☆⋰⋱★⋰⋱☆⋰⋱★⋰
░░░░░░█░█ █▀█ █▀█ █▀█ █░█░░░░░░
░░░░░░█▀█ █▀█ █▀▀ █▀▀ ▀█▀░░░░░░
░░░░░░▀░▀ ▀░▀ ▀░░ ▀░░ ░▀░░░░░░░
█▄░█ █▀▀ █░█░█░░█░█ █▀▀ █▀█ █▀█
█░██ █▀▀ █░█░█░░▀█▀ █▀▀ █▀█ ██▀
▀░░▀ ▀▀▀ ░▀▀▀░░░░▀░ ▀▀▀ ▀░▀ ▀░▀
⋱☆⋰⋱★⋰⋱☆⋰⋱★⋰⋱★⋰⋱☆⋰⋱★⋰⋱☆⋰
░░░▄████▄░▄███▄░░▄██░▄████▄░░░
░░░▀▀░▄██░██░██░████░██▄▄▄░░░░
░░░░▄██▀░░██░██░░░██░██░░██░░░
░░░██████░▀███▀░░░██░▀████▀░░░

☆.¸¸.•´☆.¸¸.•´☆.¸¸.•´☆.¸¸.•´☆

svn path=/trunk/; revision=70477
2015-12-31 23:05:23 +00:00
Hermès Bélusca-Maïto
f17fe51f38 [NTOS]
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
2015-12-26 00:29:07 +00:00
Timo Kreuzer
385bbababc [NTOS/KDBK]
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
2015-12-23 22:38:46 +00:00
Ged Murphy
645acc270a [NTOSKRNL]
- 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
2015-12-23 11:26:28 +00:00
Hermès Bélusca-Maïto
38814b24c9 [NTOS:KDBG]: Sync back the code that I copied in FreeLdr (r70403) for COM port selection.
svn path=/trunk/; revision=70404
2015-12-20 02:53:30 +00:00
Hermès Bélusca-Maïto
b34568e9f6 [NTOS]: Fix comments only, no code changes.
svn path=/trunk/; revision=70374
2015-12-16 23:53:51 +00:00
Thomas Faber
42f54fdc45 [NTOS:IO]
- Add some missing OBJ_KERNEL_HANDLE.
CORE-10207

svn path=/trunk/; revision=70366
2015-12-16 18:08:38 +00:00
Thomas Faber
a6a9039032 [NTOS:PNP]
- Don't free NULL buffers returned from IopCaptureUnicodeString.
CORE-10706 #resolve

svn path=/trunk/; revision=70356
2015-12-16 10:05:15 +00:00
Aleksey Bragin
830c4ee4a0 [NTOS]
- Fix copypasta in the comments

svn path=/trunk/; revision=70348
2015-12-14 23:20:10 +00:00
Thomas Faber
85fe2a25a0 [NTOS:PS]
- 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
2015-11-28 12:45:16 +00:00
Thomas Faber
b73ac49f8c [NTOS:SE]
- Fail in SeAccessCheck if the resulting access would be zero.
CORE-10587 #resolve

svn path=/trunk/; revision=70151
2015-11-27 12:06:59 +00:00
Thomas Faber
80ecc1e76f [NTOS:PS]
- Use the correct generic mapping for threads in NtOpenThread

svn path=/trunk/; revision=70147
2015-11-27 08:49:57 +00:00
Thomas Faber
d1f13dc28b [NTOS:FSRTL]
- FILE_LOCK_INFO::ProcessId is really an EPROCESS pointer, not a process id

svn path=/trunk/; revision=70144
2015-11-27 07:49:31 +00:00
Thomas Faber
4c091ac8d1 [NTOS:KD]
- Actually write back the response to the user buffer in KdpPrompt

svn path=/trunk/; revision=69883
2015-11-14 08:55:46 +00:00
Eric Kohl
46bc3c6068 [NTOSKRNL]
DPRINT1 --> DPRINT

svn path=/trunk/; revision=69753
2015-10-31 15:16:57 +00:00
Pierre Schweitzer
8bd572f390 [NTOSKNRL]
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
2015-10-31 13:50:23 +00:00
Eric Kohl
c9d15891f5 [NTOSKRNL]
Dereference the primary access token in SeDeassignPrimaryToken.

svn path=/trunk/; revision=69749
2015-10-31 13:32:12 +00:00
Timo Kreuzer
966a646fb7 [NTOSKRNL]
Fix parameter checks in NtQuerySection. Fixes a number of kernel32:virtual winetests.

svn path=/trunk/; revision=69747
2015-10-31 12:43:09 +00:00
Pierre Schweitzer
aeeb7963bc [NTOSKRNL]
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
2015-10-30 18:54:16 +00:00
Eric Kohl
58e9053fbc [NTOSKRNL]
- 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
2015-10-29 22:50:14 +00:00
Thomas Faber
857d9e69e3 [NTOS:IO]
- Add missing OBJ_KERNEL_HANDLE
- Avoid INVALID_HANDLE_VALUE
CORE-10207

svn path=/trunk/; revision=69730
2015-10-28 11:14:46 +00:00
Thomas Faber
f3e8d3e967 [NTOS:IO]
- 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
2015-10-28 10:59:59 +00:00
Eric Kohl
6b82bc960e [NTOSKRNL][LSASRV]
- Move the message typedefs into a shared header file.
- Implement LsapRmCreateLogonSession and LsapRmDeleteLogonSession. Call LsapRmCreateLogonSession in LsapCreateLogonSession.

svn path=/trunk/; revision=69714
2015-10-26 21:03:40 +00:00
Eric Kohl
ebdf8b1700 [NTOSKRNL][LSASRV]
- 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
2015-10-25 14:33:27 +00:00
Thomas Faber
ba56cef9c1 [NTOS:SE]
- Fail if the provided default DACL is invalid in NtCreateToken. CID 1237131

svn path=/trunk/; revision=69657
2015-10-23 12:40:29 +00:00
Pierre Schweitzer
8ecfaec11f [NTOSKRNL]
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
2015-10-18 16:09:11 +00:00
Thomas Faber
21b04efae8 [NTOS:OB]
- Create kernel handles if requested by the caller in ObDuplicateObject
CORE-10207

svn path=/trunk/; revision=69571
2015-10-17 18:37:49 +00:00
Thomas Faber
875281ff63 [NTOS:EX]
- Add missing OBJ_KERNEL_HANDLE and avoid handle leak in ExpGetCurrentUserUILanguage
CORE-10207

svn path=/trunk/; revision=69553
2015-10-16 13:28:40 +00:00
Thomas Faber
164c7773ba [NTOS:CM]
- Remove duplicate macro definitions

svn path=/trunk/; revision=69552
2015-10-16 13:20:00 +00:00
Stefan Ginsberg
c80e7b9a83 [NTOS]
Fix (last?) instance of treating hyperspace as global pages

svn path=/trunk/; revision=69541
2015-10-15 16:10:50 +00:00
Stefan Ginsberg
415eda607f Somehow missed this in previous commit
svn path=/trunk/; revision=69540
2015-10-15 12:58:28 +00:00
Stefan Ginsberg
8ea1ea856d [NTOS]
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
2015-10-15 12:56:19 +00:00
Thomas Faber
027ae80ad0 [NTOS:APPHELP]
- Avoid excessive indentation
- Minor changes to conform better to kernel style

svn path=/trunk/; revision=69534
2015-10-15 07:44:25 +00:00
Stefan Ginsberg
b7d35a7776 [NTOS]
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
2015-10-15 01:49:26 +00:00
Stefan Ginsberg
caccb5cc8f [NTOS]
Global pages may not have been enabled when KeFlushCurrentTb is first called, so don't enable them in there.

svn path=/trunk/; revision=69531
2015-10-14 20:42:18 +00:00
Stefan Ginsberg
5e026edfdc [NTOS]
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
2015-10-14 19:33:35 +00:00
Thomas Faber
c0cd33da02 [NTOS:PO]
- 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
2015-10-11 19:57:06 +00:00
Stefan Ginsberg
9d6572fbd3 [NTOS] Follow up to r69075: Assert IRQL correctly in KeDisconnectInterrupt too (do not assume debug build means MP build).
svn path=/trunk/; revision=69496
2015-10-11 13:18:30 +00:00
Alex Ionescu
85b39039dd [CMLIB/NTOSKRNL]:
- 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
2015-10-04 20:18:49 +00:00
Alex Ionescu
6c476394c7 [NTOSKRNL]: Jerome _was_ nice enough to make our cells ordered (64222).
svn path=/trunk/; revision=69441
2015-10-04 17:13:38 +00:00
Amine Khaldi
ec120a57d3 [NTOS] Improve the FILE header section. Brought to you by Adam Stachowicz. CORE-10114
svn path=/trunk/; revision=69439
2015-10-04 11:54:25 +00:00
Stefan Ginsberg
0fbe4b9b8e Remove legacy _KeNumberProcessors hack. While we are at it fix its type (CCHAR not UCHAR) and remove it from the NDK as it is a public global provided by the DDK (where we properly define it with the "__CREATE_NTOS_DATA_IMPORT_ALIAS" fix when needed. Also, the variable KeActiveProcessors is not even exported from NTOS so move it to an internal header. Fix missed fix in UDFS as well in uncompiled file.
svn path=/trunk/; revision=69416
2015-09-29 18:34:33 +00:00
Pierre Schweitzer
54d56a1de4 [NTOSKRNL]
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
2015-09-29 16:28:59 +00:00
Stefan Ginsberg
b0f0ec8442 [NTOS] Implement the KD Get/SetContextEx functionality (copying part of a CONTEXT via Offset + Byte Count instead of copying a whole context), and stub out KdpWriteCustomBreakpoint. Newer WinDbg uses the GetContextEx functionality regardless of whether we report it as supported or not, and didn't seem to fall back on the regular GetContext functionality when it was missing, so whatever it was using it for should work awesome now. This had no impact on the broken Registers window though. Also small fix to use the _M_XXX checks consistently.
svn path=/trunk/; revision=69400
2015-09-28 14:08:54 +00:00
Stefan Ginsberg
f543c860f7 [NTOS] Fix kmtest
svn path=/trunk/; revision=69399
2015-09-28 12:48:14 +00:00
Stefan Ginsberg
79dd48516a [NTOS] Fix the Ob wait system calls to only catch the exceptions that are expected to be raised by the Ke wait functions (and not potentially silently catching *any* exception and corrupting everything in the process). Also fixup some code logic. SEH Mega Fixup 1/???
svn path=/trunk/; revision=69393
2015-09-28 09:01:11 +00:00
Stefan Ginsberg
63a2204088 [NTOS] Make SE routines use ExAllocateLocallyUniqueId instead of the system call variant (SeCreateAccessStateEx already did this, but with Exp*). Also, Ex(p)AllocateLocallyUniqueId can't fail so there is no need to return success all the time (and check for it...). This also just happens to move the first system call to phase 1 instead of 0.
svn path=/trunk/; revision=69391
2015-09-28 07:44:49 +00:00
Thomas Faber
2859b9f49c [NTOS:EX]
- Remove push lock asserts that are prone to race conditions
CORE-10267 #resolve

svn path=/trunk/; revision=69383
2015-09-27 17:40:23 +00:00
Stefan Ginsberg
a73afd7919 [KE]
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
2015-09-26 10:12:53 +00:00
Stefan Ginsberg
d8105a4366 [KDBG] Let's try to have one single version of DPFLTR_DEFAULT_ID shall we -- 101 as part of DPFLTR_TYPE enum is correct, 0xFFFFFFFF as an incorrect define for the "internal" default ID is wrong.
svn path=/trunk/; revision=69355
2015-09-25 19:28:05 +00:00
Stefan Ginsberg
0ad0cb4df8 [NDK] Put ZwCreateKeyedEvent in NDK where it belongs.
[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
2015-09-25 18:40:56 +00:00
Alex Ionescu
88cc94bcb3 [NTOSKRNL]: Now that OBJ_VALID_ATTRIBUTES doesn't include all attributes, fix the kernel parameter checks.
svn path=/trunk/; revision=69341
2015-09-24 03:32:08 +00:00
Alex Ionescu
f8f8f5c96b [NDK]: Add OB_FLAG_KERNEL_EXCLUSIVE and OBJ_KERNEL_EXCLUSIVE flags
[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
2015-09-24 02:40:30 +00:00
Hermès Bélusca-Maïto
5c49e6b52e Fix build.
svn path=/trunk/; revision=69338
2015-09-23 23:55:04 +00:00
Hermès Bélusca-Maïto
f5c0c9408e [NTOS]: Implement KeDeregisterNmiCallback.
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
2015-09-23 23:52:03 +00:00
Alex Ionescu
0e86ca73d0 [NTOSKRNL]: Properly respect the registry's Win32PrioritySeparation value instead of ignoring it.
[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
2015-09-23 05:10:58 +00:00
Stefan Ginsberg
ecc1e62543 [KD] Stub out the (new) unsupported KD API messages a bit more by adding 2 missing ones, likely API names and associated structures. Thanks to Mark Jensen for finding out the structs.
svn path=/trunk/; revision=69286
2015-09-19 13:58:08 +00:00
Thomas Faber
12e643e2f1 [NTOS:OB]
- Improve DPRINT in NtWaitForMultipleObjects

svn path=/trunk/; revision=69277
2015-09-18 19:42:56 +00:00
Thomas Faber
cf070e1e2f [NTOS]
- Add some missing OBJ_KERNEL_HANDLE
CORE-10207

svn path=/trunk/; revision=69269
2015-09-18 14:22:12 +00:00
Thomas Faber
1264afa150 [NTOS:CM]
- Fix SID mixup in CmpHiveRootSecurityDescriptor

svn path=/trunk/; revision=69267
2015-09-18 13:00:16 +00:00
Thomas Faber
3dedb38d2f [NTOS:CM]
- Actually use the allocated security descriptor in CmpCreateRegistryRoot

svn path=/trunk/; revision=69266
2015-09-18 11:14:54 +00:00
Thomas Faber
fe3d8770c2 [NTOS:CM]
- Improve pool tagging

svn path=/trunk/; revision=69262
2015-09-18 09:25:58 +00:00
Stefan Ginsberg
259f15f48a [RTL] Add support for vectored continue handlers, complementing the vectored exception handler support we already have, by doing some massive shared code usage: just use two different lists for the different handler types and all the code is basically the same. Call the "new" functionality from RtlDispatchException and stub it out for kernel mode. Clean up the existing code and simplify it. Passes the Winetests fine, not that they test this a a lot.
#CORE-10202

svn path=/trunk/; revision=69259
2015-09-17 13:36:55 +00:00
Stefan Ginsberg
d2608984c9 Completely disable the debug register assertions in the trap exit code for KDBG as it sets them improperly. These checks should not have been added for KDBG to begin with and would have made any usage of address breakpoints inside KDBG end up in a trap exit breakpoint. Whoever knows KDBG better than I do please investigate. However, enable the DR7 debug check for KD as it handles the debug registers just fine. The likelihood of loading a driver that modifies a debug register (which would be the only other thing triggering this) is pretty slim.
svn path=/trunk/; revision=69244
2015-09-15 17:55:14 +00:00
Stefan Ginsberg
2d55091cc2 Sprinkle cdecl declarations liberally all around to make a bunch of the base components compile (freeldr compiles but does not link yet). Some of these should really be NTAPI, working on that.
svn path=/trunk/; revision=69238
2015-09-15 10:35:49 +00:00
Thomas Faber
e6b660bdce [NTOS:PNP]
- 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
2015-09-14 18:58:58 +00:00
Stefan Ginsberg
d320870f3f Stop using ATTRIB_NORETURN in hal and kernel, replace with the UNREACHABLE macro that both compilers can understand. Also fix up the UNREACHABLE def a bit.
svn path=/trunk/; revision=69220
2015-09-13 20:37:28 +00:00
Stefan Ginsberg
427c11919f [KDBG] Don't bring down the kernel either when int2c-ing from user mode
svn path=/trunk/; revision=69210
2015-09-12 22:01:10 +00:00
Stefan Ginsberg
2c81e1e2b1 - Make KDBG handle assertion failures/int2C the same way as breakpoints/int3 (that is, ignore them from user-mode by default) for the time being until an internal prompt-routine is implemented.
svn path=/trunk/; revision=69209
2015-09-12 21:44:48 +00:00
Stefan Ginsberg
3cdcabd3c9 [KDBG]: Add new command "reboot" that does exactly what it says.
svn path=/trunk/; revision=69205
2015-09-12 20:10:43 +00:00
Daniel Reimer
393d90900e [NTOSKRNL]
Fix 1 unresolved external on ARM build.

svn path=/trunk/; revision=69196
2015-09-12 11:31:43 +00:00
Stefan Ginsberg
b77dacb82b - Add some globals WinDbg expected to find when using !sysptes and !vm. Unused but makes the debugger happy
svn path=/trunk/; revision=69173
2015-09-10 19:47:45 +00:00
Stefan Ginsberg
c1c6314688 - Consistently check for KDBG via if-def, not if (like we do for _WINKD_), everywhere.
svn path=/trunk/; revision=69152
2015-09-09 16:06:38 +00:00
Stefan Ginsberg
8ad1f36b58 Fixie fixie
svn path=/trunk/; revision=69145
2015-09-09 11:24:34 +00:00
Stefan Ginsberg
8e45e7a979 [NTOS] Fix broken NtSetSystemEnvironmentValueEx stub which had the wrong amount of parameters.
[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
2015-09-09 11:21:02 +00:00
Stefan Ginsberg
240afacd87 - While we are at it, remove a bunch of kernel exports that shouldn't exist. KiEoiHelper stays for now.
svn path=/trunk/; revision=69133
2015-09-08 22:58:28 +00:00
Stefan Ginsberg
ee039d524e [NTOS] Add in MmDoesFileHaveUserWritableReferences, seemingly new to 2k3 SP2. MSDN reports this as "Vista and later" but this is not entirely correct it seems.
svn path=/trunk/; revision=69130
2015-09-08 20:42:21 +00:00
Stefan Ginsberg
2425661867 Fix build (TM)
svn path=/trunk/; revision=69129
2015-09-08 20:19:10 +00:00
Stefan Ginsberg
900d67c9f9 [NTOS] STUB ALL THE EXPORTS. We should now have all the exports expected by a 2k3-ish kernel (except for a few amd64-specific ones). Add some missing explicit cdecl to the Verifier stubs, and don't return STATUS_SUCCESS (0) from the ABIOS stubs.
[NDK] Add a few types needed by the PfxXxx routines.

This should fix absolutely nothing.

svn path=/trunk/; revision=69128
2015-09-08 20:14:39 +00:00
Stefan Ginsberg
ec566e8082 - Fix the ASSERT in VdmSwapContext now that we are always setting up the trap frame correctly on debug build.
- 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
2015-09-06 22:29:10 +00:00
Pierre Schweitzer
93ff988b19 [NTOSKRNL]
Fix a bug in HalpGetFullGeometry(): properly reset the event before reusing it. We may have waited on it previously.

svn path=/trunk/; revision=69074
2015-09-06 22:10:53 +00:00
Thomas Faber
39849bdb73 [NTOS:PNP]
- Handle power IRPs for the PNP root device
CORE-10117

svn path=/trunk/; revision=69061
2015-09-06 17:13:48 +00:00
Pierre Schweitzer
3363077e26 [NTOSKRNL]
Define & use a tag for FsRtlNotify* memory allocations

svn path=/trunk/; revision=69052
2015-09-06 10:06:59 +00:00
Stefan Ginsberg
4365775be6 - Don't have two different implementation of KiConvertToGuiThread, first as inlined assembly gcc and second as a function call (for msvc). Always use the function call to be consistent with both compilers.
svn path=/trunk/; revision=69032
2015-09-05 15:20:27 +00:00
Thomas Faber
57bd950d25 [NTOS:MM]
- Use MmExpansionLock to synchronize changes to MmProcessList. Should fix random crashes in MmDeleteProcessAddressSpace.
CORE-10111 #resolve

svn path=/trunk/; revision=69031
2015-09-05 14:39:40 +00:00
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