Commit graph

22778 commits

Author SHA1 Message Date
Alex Ionescu d8762edcd7 - Implement DbgkPostFakeModuleMessages.
- Stub MmGetFileNameForAddress but write documentation on how to implement it (thanks to Filip Navara). For now it always returns ntdll.dll as a testhack.

svn path=/trunk/; revision=24609
2006-10-22 19:53:10 +00:00
Alex Ionescu 6d08ee060e - Add one of the basic OBJECT_ATTRIBUTES flags and don't fail any 3rd-party driver or application that might've been using it.
- Add missing member to DBGKM_LOAD_DLL.

svn path=/trunk/; revision=24608
2006-10-22 19:48:43 +00:00
Johannes Anderwald 5d119e76fa - set breakpoint before FreeConsole to have a bigger chance of output :)
svn path=/trunk/; revision=24607
2006-10-22 19:11:24 +00:00
Johannes Anderwald 913d10566a - add an checkpoint for the system regression tool
svn path=/trunk/; revision=24606
2006-10-22 18:52:01 +00:00
Johannes Anderwald f17eb0c2a1 - implement FormatPartition settings
- fix a few bugs in the unattend setup code

svn path=/trunk/; revision=24605
2006-10-22 18:40:37 +00:00
Johannes Anderwald 2e2bcf5447 - add auto-format partition setting to unattend setup
svn path=/trunk/; revision=24604
2006-10-22 18:28:51 +00:00
Hervé Poussineau b4c3d08f83 Remove multiple definition warning
Add a few missing error codes (taken from http://www.derkeiler.com/Newsgroups/microsoft.public.platformsdk.security/2004-02/0201.html)

svn path=/trunk/; revision=24603
2006-10-22 17:19:49 +00:00
Johannes Anderwald d966387fc7 - implemented ROSBOOT_CHECKPOINT
- implemented ROSBOOT_DELAY_READ
- dump reached checkpoint in case of bsod / um-exceptions
- add error handling
- remove hardcoded constants

svn path=/trunk/; revision=24602
2006-10-22 11:27:45 +00:00
Magnus Olsen 98ae58da2b should have read msdn one more time for D3DParseUnknownCommand vaild command return sizeof of the struct * number of struct + 4 bytes, so it point to the end of the buffer.
svn path=/trunk/; revision=24601
2006-10-22 10:43:36 +00:00
Magnus Olsen b780943388 full implement of D3DParseUnknownCommand + 1 undocument command that have been review by D3DParseUnknownCommand_show in rosapps/tests
svn path=/trunk/; revision=24600
2006-10-22 10:01:46 +00:00
Thomas Bluemel 39500f9853 - Change RtlMoveMemory to RtlCopyMemory where memory regions are never overlapping
- Re-Secure a few Nt stubs by adding SEH/Probing where neccessary

svn path=/trunk/; revision=24599
2006-10-22 09:06:58 +00:00
Magnus Olsen 68b1244df5 correct D3DHAL_DP2OPERATION struct
this include file should be rewriten 

svn path=/trunk/; revision=24598
2006-10-22 08:23:13 +00:00
Magnus Olsen 2c691e6c16 return code scanner for D3DParseUnknownCommand to figout what it support.
svn path=/trunk/; revision=24596
2006-10-22 07:15:06 +00:00
Alex Ionescu 5143e2364f - Implement DbgkpQueueMessage. This is the main bi-directional communication routine for the newer non-LPC Debug Object.
- Implement DbgkPostFakeProcessCreateMessages (and stub DbgkpPostFakeThreadMessages and DbgkpPostFakeModuleMessages). These are required when attaching to a process after threads have been created and modules loaded, so that the debugger can have a valid state.
- Still missing the two functions to Set/Clear the Debug Object, will do these next.

svn path=/trunk/; revision=24595
2006-10-21 19:26:54 +00:00
Johannes Anderwald af697b174a - quit sysreg when checkpoint USETUP_COMPLETED is reached
svn path=/trunk/; revision=24594
2006-10-21 17:59:15 +00:00
Johannes Anderwald c58fc3041a - add an option to store emulators pidfile in txt
- destroy emulator process when sysreg exits (windows only currently)
- the tool now works in windows

svn path=/trunk/; revision=24593
2006-10-21 16:12:42 +00:00
Thomas Bluemel c4f8255e95 Remove the no longer used kjs library
svn path=/trunk/; revision=24592
2006-10-21 16:00:44 +00:00
Johannes Anderwald c59a6328c4 - set svn-eol:style property
svn path=/trunk/; revision=24591
2006-10-21 08:56:23 +00:00
Johannes Anderwald 4d2dee8fd5 - provide a sample configuration file
- allow other address line resolver than addr2line

svn path=/trunk/; revision=24590
2006-10-21 08:55:34 +00:00
Johannes Anderwald 95126f2a4a - give sysreg a makefile
- allow compilation with gcc 4.1.1
- temporary disable execution of emulator command
- lets start testing :)

svn path=/trunk/; revision=24589
2006-10-21 08:34:00 +00:00
Johannes Anderwald b75f825406 - implement a basic boot detection algorithm
- sysreg can now recognize some user mode detection and blue screen of deaths
- a few timing issues have to be sorted out in order make deployment ready

svn path=/trunk/; revision=24588
2006-10-21 00:13:52 +00:00
Johannes Anderwald ee5b1449f9 - use timeout to define maximum runtime of emulator
svn path=/trunk/; revision=24587
2006-10-20 21:14:08 +00:00
Johannes Anderwald 74847bd6f5 - avoid using _tprintf
- use EnvironmentVariable as a singleton

svn path=/trunk/; revision=24586
2006-10-20 20:09:29 +00:00
Johannes Anderwald 98aa4d7f47 - fix compilation
- implement scanning of symbol directories

svn path=/trunk/; revision=24585
2006-10-20 19:40:33 +00:00
Johannes Anderwald 4ba2129226 * beginning of a system regression tools
svn path=/trunk/; revision=24584
2006-10-20 15:49:46 +00:00
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