Commit graph

22853 commits

Author SHA1 Message Date
Thomas Bluemel 66e157c5eb Minor simplification
svn path=/trunk/; revision=24583
2006-10-20 14:26:41 +00:00
Thomas Bluemel b330be87df Prefer inline probing macros for base types
svn path=/trunk/; revision=24582
2006-10-20 14:20:27 +00:00
Thomas Bluemel 5d6a6fd0b8 Fix integer overflow vulnerability in NtPrivilegeCheck
svn path=/trunk/; revision=24581
2006-10-20 14:10:53 +00:00
Thomas Bluemel de34ab04c1 Fix returning the context of the current thread in NtGetContextThread
svn path=/trunk/; revision=24580
2006-10-20 13:45:52 +00:00
Thomas Bluemel cf98132b2f Use inline probing macro for handle variables
svn path=/trunk/; revision=24579
2006-10-20 13:33:24 +00:00
Thomas Bluemel ccd9ed0a4e - Some minor Nt stub fixes
- Fix compilation with GCC4

svn path=/trunk/; revision=24578
2006-10-20 13:19:13 +00:00
Alex Ionescu d9b18cdbb2 - Implement DbgkpConvertKernelToUserStateChange. I just remembered that there's actually 3 debug subsystems in NT: Win32, Native and Kernel, so this structure will still need to be heavily parsed at the Win32 level (in kernel32) before user-mode debuggers can work (so I'll have to write a small native-mode debugger test app to test this implementation first).
- Implement DbgkpMarkProcessPeb.

svn path=/trunk/; revision=24577
2006-10-20 06:12:54 +00:00
Alex Ionescu 2a37845ce0 - Fix kernel symbol loading.
svn path=/trunk/; revision=24576
2006-10-20 05:41:01 +00:00
Alex Ionescu 9c4178c05b - Define DBGKM_APINUMBER
- Implement DbgkpSendApiMessageLpc, DbgkpSendApiMessage, DbgkCopyProcessDebugPort, DbgkForwardException, DbgkFreeDebugEvent, DbgpWakeTarget.
- Close original handle in DbgkOpenHandles.

svn path=/trunk/; revision=24575
2006-10-20 05:16:04 +00:00
Alex Ionescu 0d09a4e5f9 - Fixup DEBUG_OBJECT definition.
- Implement DbgkpCloseObject.
- Implement DbgkpOpenHandles.
- Fix various bugs in the code and flag usage.
- Enable calling DbgkClearProcessDebugObject when terminating a process.

svn path=/trunk/; revision=24574
2006-10-19 20:08:52 +00:00
Ged Murphy 41ba900587 - test app to display both the system and device image lists.
- this app confirms the overlay icons in the device image list are part of the list.

svn path=/trunk/; revision=24573
2006-10-19 16:55:11 +00:00
Alex Ionescu aef24e2a4a - Implement the entire kernel-mode native interface of Debug Objects, minus a few missing operations in NtWaitForDebugEvent:
- NtCreateDebugObject, NtDebugContinue, NtDebugActiveProcess, NtRemoveProcessDebug, NtSetInformationDebugObject, NtWaitForDebugEvent.
- Of course, the entire backend is stubbed out.
- Implement Debug object initialization (not called yet) and close(not done) and delete (done) callbacks.

svn path=/trunk/; revision=24572
2006-10-19 07:04:21 +00:00
James Tabor 42d7cdbd64 Add four more members to the Gdi user data (DC_ATTR) structure. Sort the list later.
svn path=/trunk/; revision=24571
2006-10-19 04:48:51 +00:00
Alex Ionescu ad5eb998a6 - Fix SD charges to 2048 bytes instead of 2000.
- Fix a memory leak in ObOpenObjectByName. Object Create Information is now freed.

svn path=/trunk/; revision=24570
2006-10-19 03:09:19 +00:00
Alex Ionescu fb85f19b88 - Implement Object Type Resource Lock, since object types are shared across all objects and thread-safety is critical. Used it everywhere where I think it's needed. Thomas, can you check if I missed anything please?
- Use interlocked increase/decrease for accounting variables inside the Object Type instead of acquiring a full lock or not being thread safe.
- Clear the creator type list of an object if it lost all its handles.
- Fix a bug in NtduplicateObject which was potentially derefernecing a garbage pointer (thanks Prefast!).

svn path=/trunk/; revision=24569
2006-10-19 02:54:48 +00:00
Alex Ionescu 51a79c26bd - Set OBJ_OPENLINK invalid for core object types.
- Initialize symbolic link in-line with other core object types.
- Use the SePublicDefaultUnrestrictedSd directly instead of building another SD.
- Create core directory objects with Nt* functions instead of Ob*, to insure full accounting and error-handling.
- Create core objects with OBJ_CASE_INSENSITIVE.
- Fix the huge ObInit hack which was manually inserting Directory and Type object types in the type directory, and now loop the type list. Now we don't skip the Process, Token, Thread, Job, Section types anymore.
- Support Quota Information during object allocation and deallocation isntead of ignoring it.
- Use interlocked decrement when touching the object type (since it's a shared structure. We don't use the lock yet, but we won't for this anyways, since it's a simple lockable operation).
- Use the right object key when freeing the object.
- Modify the allocation function for a more optimized way of allocating objects instead of having to keep track of two sets of variables. 
- Add various accounting variables.
- Make sure to properly handle allocations without object create info (ie, for object types). Now they get creator info and name info (which allowed us to cleanp the hack in ObInit).
- Add checks to see if Quota informatio is needed.
- Clear CreatorBackTraceIndex during allocation.
- Remove CreatorUniqueProcess hack from back when the idle thread was NULL.
- Do not zero out the header during allocation anymore, since this slows down the routine (instead, simply zero out the 2 fields that are NULL).
- Locate and clearly display that the fact we zero objects on creation is a HACK that needs to be fixed. (The Token code makes this assumption).
- Update HighWaterNumberOfObjects when needed.
- If caller didn't give pool charges, use the one from the object type.
- Clear the Total/HighWater* values for newly created object types instead of using random values.
- Properly typecast the WCHAR tag as CHAR.
- Insert each new object type in the ObTypeObjectType Type List.
- Set the Index member of each new object type and insert each new object type in the ObpObjectTypes array. This is crucial for object type enumeration when implemented.
- Fixup the way we insert new object types into the tree. Allow failure and don't return a type if we couldn't insert it, and only reference the type directory object if it actually exists.
- Move DOS Devices\"??" initialization in its own routine and fix it:
  - Use Nt APIs for all operations instead of raw I/O.
  - Create GLOBALROOT link to \
  - Create \??\Global link to \??

svn path=/trunk/; revision=24568
2006-10-19 02:20:32 +00:00
Hervé Poussineau c4a6f8d938 Fix calling convention for class callbacks
svn path=/trunk/; revision=24567
2006-10-18 22:40:39 +00:00
Thomas Bluemel cc6eeaab94 Fix gcc4 warning (thx to Herve)
svn path=/trunk/; revision=24566
2006-10-18 21:35:18 +00:00
Thomas Bluemel c9ba938610 fix gcc4 warning
svn path=/trunk/; revision=24565
2006-10-18 21:18:02 +00:00
Alex Ionescu 7716bdddbb - A much simpler and featured RawFs driver that I had been working on while learning how to write simple FS drivers. Still missing some advanced functionality (Lite Stream File Objects and FS Notifications) because the Kernel doesn't fully support them yet. This one actually creates the \\Device names so that user-mode can even talk to it.
svn path=/trunk/; revision=24564
2006-10-18 18:00:42 +00:00
Alex Ionescu 1b96a22c6c - Combine PnpInit1/2 since they were called one after the other.
- Load RAW driver while loading boot drivers.
- Cleanup IoInitSystem a bit more.

svn path=/trunk/; revision=24563
2006-10-18 17:46:55 +00:00
Ged Murphy fd5116b50c To stop the app hanging when enumerating, use a separate thread for enumerating exclusively
svn path=/trunk/; revision=24562
2006-10-18 15:50:05 +00:00
Alex Ionescu 9b785911ed - Some stuff I promised James. This is DC_ATTR from Win2K, IIRC (you called it GDI_USER_DATA). It changed a bit in XP, but now you have a working model. Also added some more flags/enums that I knew about and some font structures.
svn path=/trunk/; revision=24561
2006-10-18 06:00:31 +00:00
James Tabor 31280506e9 Set GDI_BatchLimit from TEB.
svn path=/trunk/; revision=24560
2006-10-18 03:55:28 +00:00
James Tabor f7420ccbad Add more DCDWord constants and two more members in GdiUserData structure.
svn path=/trunk/; revision=24559
2006-10-18 03:54:35 +00:00
Ged Murphy 37741f841f fix a couple of warnings msvc highlighted
svn path=/trunk/; revision=24558
2006-10-17 23:11:02 +00:00
Ged Murphy 400f62c0f2 - enumerate devices in a separate thread so it doesn't stall opening of the main window
- check for problems with devices, e.g. disabled devices (currently missing code to display overlay icons)
- enable / disable the properties command dependant on what item is selected
- fix a few potential bugs

svn path=/trunk/; revision=24557
2006-10-17 15:56:41 +00:00
Magnus Olsen fead15e683 adding windows 28592 (iso-2859-2) latin2 to ansi to utf -8 converter in roswebparser
svn path=/trunk/; revision=24556
2006-10-17 15:16:06 +00:00
Aleksey Bragin 95d350f6fe Having two cats with the same name in one repository is too much
svn path=/trunk/; revision=24555
2006-10-17 15:02:51 +00:00
James Tabor 7b814c1069 Add another member to GdiUserData structure.
svn path=/trunk/; revision=24554
2006-10-17 05:52:35 +00:00
James Tabor 7b6642d8a0 Implement Get & Set batch limit.
svn path=/trunk/; revision=24553
2006-10-17 05:30:54 +00:00
Alex Ionescu 07b9937721 - Merge some parts of IoInitSystem in the same main function instead of calling out to 10 external modules.
- Re-factor some code into smaller functions.
- Don't create some Object Directories twice, since now ExpCreateSystemRootLink does some of them.
- Add some failure paths to I/O Init.
- Implement a function to mark the boot partition DO_SYSTEM_BOOT_PARTITION in order to better catch some bugchecks.

svn path=/trunk/; revision=24552
2006-10-17 05:14:57 +00:00
James Tabor 6dc593f684 Win32k GDI Compatibility Project:
- Add new Gdi user data structure
- Fixed Meta constants
- Add new GetDCWord constant

svn path=/trunk/; revision=24551
2006-10-17 04:32:18 +00:00
Alex Ionescu 7c42b991f3 - One school day and two midterms later, I'm still the only one with enough time to fix a header. Can't wait to see who will be up for trying to fix booting...
svn path=/trunk/; revision=24550
2006-10-17 04:20:48 +00:00
Thomas Bluemel 9d10081480 Fixed usage of uninitialized variable warning
svn path=/trunk/; revision=24549
2006-10-16 15:55:33 +00:00
Alex Ionescu 3b6c356260 - Fix user-mode compilation.
svn path=/trunk/; revision=24548
2006-10-16 15:27:12 +00:00
Thomas Bluemel 503b41d90b Fix a typo. Thanks to Dmitry Timoshkov
svn path=/trunk/; revision=24547
2006-10-16 11:26:24 +00:00
Alex Ionescu f9a7faa6e5 - Implement RtlGetElementGenericTable using ordered node/element.
- The splay tree generic table package is now complete. (The AVL package was done by Art earlier).

svn path=/trunk/; revision=24546
2006-10-16 04:08:09 +00:00
Alex Ionescu a18f3458b2 - Fix GCC compile bug.
svn path=/trunk/; revision=24545
2006-10-16 03:53:48 +00:00
Alex Ionescu d403bc14c4 - Create "AVL FUNCTIONS" section tag.
- Implement RtlENumerateGEnericTableWithoutSplaying.

svn path=/trunk/; revision=24544
2006-10-16 03:51:49 +00:00
Alex Ionescu cac3dc3812 - Implement RtlLookupElementGenericTableFull.
- Implement RtlEnumerateGenericTable.

svn path=/trunk/; revision=24543
2006-10-16 03:47:47 +00:00
Alex Ionescu cef2ebcee2 - Implement RtlIsGenericTableEmpty, RtlNumberGenericTableElements.
- Implement RtlLookupElementGenericTable.
- Implement RtlDeleteElementGenericTable

svn path=/trunk/; revision=24542
2006-10-16 03:39:49 +00:00
Alex Ionescu dbb8a15d7c - Added some generic table routines to rtlfuncs.h so that they can be used in user-mode.
- Implemented RtlInsertElementGenericTable and RtlInsertElementGenericTableFull (Splay-Tree versions). Also implemented a helper function RtlpFindGenericTableNodeOrParent when we're not given one and need to locate it manually.
- Defined structure for generic table entries so that we can properly return user data and do the right allocations.

svn path=/trunk/; revision=24541
2006-10-16 03:19:14 +00:00
Alex Ionescu 693525bd5a - Organize file by AVL/Splay routines.
- Add RtlLookupFirstMatchingElementGenericTableAvl stub.
- Fixup some formatting/tag spacing and prototype definitions.

svn path=/trunk/; revision=24540
2006-10-16 02:49:23 +00:00
Alex Ionescu d280d7f5a7 - Fix a bug in FreeLdr key creation (patch by Filip Navara).
- Make cmlib use the StorageTypeCount value since my new Cm code needs it.

svn path=/trunk/; revision=24538
2006-10-16 02:04:09 +00:00
Hervé Poussineau 6ea6b76acd Add some missing exports
svn path=/trunk/; revision=24537
2006-10-16 02:02:51 +00:00
James Tabor 2834696d89 Add object type COLORSPACE mask.
svn path=/trunk/; revision=24536
2006-10-16 01:39:34 +00:00
James Tabor 8835a6c1cb First of the Win32k-Gdi compatibility changes.
svn path=/trunk/; revision=24535
2006-10-16 01:29:27 +00:00
James Tabor 7e06d0e8cf Fix text line.
svn path=/trunk/; revision=24534
2006-10-16 01:22:21 +00:00
Hervé Poussineau 48a7051b20 Correctly return FALSE in SeAccessCheck if access is not granted
Don't always check the first ace in the DACL

svn path=/trunk/; revision=24533
2006-10-15 23:31:16 +00:00