- Gut down IopCreateFile to the strict minimum so that only the critical parts remain.
- NT Compatiblity fix in ObFindObject: stop parsing if remaining path is null, this means that the parse routine is done parsing and that -this- is the final object.
svn path=/trunk/; revision=22290
- Give Files/Devices a parse routine and currently stubplement it for debugging purposes and trying to figure out a way to kill the IopCreateFile hack.
- Implement ObpChargeQuotaForObject. Using a memory breakpoint in WinDBG I've finally found where the OB_FLAG_CREATE_INFO flag gets masked out. Also attempted a very naive quota charging implementation, but it's a guess and probably wrong (but at least it does...something.)
svn path=/trunk/; revision=22287
* Implement Per-Processor Lookaside List based allocation and de-allocation of the Object Create Information (object attributes capture) and of the object name. I counted over 4000 allocations for only 30 seconds of runtime, so this change greatly reduces pool fragmentation and increases speed. (Implementation is similar to the IRP lookaside list implementation, but inlined for speed).
* Fix some cases where we weren't freeing captured information properly. This patch should also decrease memory leaks/usage.
* Comment/formatting fixes.
svn path=/trunk/; revision=22100
- Isolate ObFindObject into CmFindObject for the registry routines. Because of their well-known abuse of Ob, it's better to give them their internal routine so that when/if Ob ever gets fixed to parse properly, it won't force a re-write of Cm's object routines.
svn path=/trunk/; revision=22047
-start to macrofy list enums in ntoskrnl using LIST_FOR_EACH macros
-use IsListEmpty some places instead of manual coding
-profile.c:KeStartProfile() zero correct buffer in (and not the NULL ptr;-)
-improve LIST_FOR_EACH macros so that the iterator is set to NULL at end of enum
-kthread.c:KiServiceCheck() set the shadowtable before calling the win32k proc/thread init funcs
-apc.c:KiInsertQueueApc() insert special apcs in correct fifo order
-apc.c:KeFlushQueueApc() simplify
-timer.c:KiExpireTimers() calling RemoveEntryList on a possibly empty list is not ok
svn path=/trunk/; revision=18113
Check the access to parameters in IopQueryAttributesFile if we are called from user mode because calling Zw functions from kernel mode will bypass all checks.
svn path=/trunk/; revision=18028
from the object attribute (at least the OBJ_INHERIT flag). We cannot
use IoCreateStreamFileObject because a handle from such a file object
is never inheritable.
svn path=/trunk/; revision=17248
- Correct the Pool Charge for Object Types, select a Default Object, always use a security procedure, read global flag for maintaing type lists, set the pool type
- Initialize a Default Wait Object.
- Fix security callback for objects.
- Implement SeDefaultObjectMethod for security callbacks of objects which don't have a custom one.
svn path=/trunk/; revision=17176
- Bypass the driver for FilePositionInformation and FileAlignmentInformation in NtQueryInformationFile and NtSetInformationFile.
svn path=/trunk/; revision=16755
1) The documented Object Create Information Structure and semantics implemented. All Object Attributes and passed data from user-mode is now probed and saved into this object create structure when ObCreateObject is called.
2) ObCreateObject does NOT PERFORM ANY OTHER OPERATION EXCEPT CREATING THE OBJECT ANYMORE. ObCreateObject will NOT insert the Object into the tree and other operations. These are now done correctly by ObInsertObject. Therefore, the biggest hurdle was changing pieces of code which assumed ObCreateObject would be enough.
3) ObInsertObject uses the captured create info for all operations isntead of the Object Attributes.
4) ObFindObject now uses the captured info as well.
5) The OBject name and directory are now stored in the documented Object Name Information, always allocated and freed from non paged pool.
HACKS:
5) Because the registry code is horribly broken and doesn't use ObFindObjectByName, the old ObFindObject had to be temporarily duplicated into CmpFindObject.
7) Win32k used ObInsertObject in CsrInsertObject as a way to create a handle inside csrss. However, OBInsertObject now does more then this. As a temporary hack, ObpCreateHandle is exported from the kernel and called from win32k. A fix needs to be done for this, but I don't know the design of win32k+csrss well enough to find a solution.
8) SEH has been commented out in some places of the new probing code because it breaks smss and explorer. These need to be investigated (seh did not exist in the previous code, so this is not really a hack)
9) Named objects with a parent directory are NOT allowed. However because of bugs in kernel32, the new check has been temporarily disabled. (this check did not exist in the previous code, so this is not really a hack)
The next patch will add a proper ObFindObject which will support a more complete Parse Procedure with context and security information. This is needed for proper registry access (requested by Eric Kohl) and for proper functionality of the Desktop/File creation, which should use the Parse routine, and not the Create Handle Routine. This will also make it possible to remove some previous hacks and pave the way for a fixed Iop/IoCreateFile
svn path=/trunk/; revision=15395
- Don't set FO_DIRECT_DEVICE_OPEN in IoCreateStreamFileObject.
- Disabled the setting of IRP_NOCACHE, because vfat cannot handle cached and non cached requests for the same file.
- Set the correct device object in NtWriteFile.
svn path=/trunk/; revision=15381