Commit graph

46980 commits

Author SHA1 Message Date
Alex Ionescu 2507c181d0 [RTL]: Clarify what RtlGetLongestNtPathLength returns instead of using "+9" as a magic constant.
svn path=/trunk/; revision=52623
2011-07-11 00:38:34 +00:00
Alex Ionescu 642d0d6141 [NTDLL] Merge LdrpResolveFullName and LdrpSearchPath and LdrpAllocateUnicodeString from the LDR Rewrite branch. Not actually used yet since they use Rtl APIs that ReactOS does not implement. Guess what the next commits are going to be about.
svn path=/trunk/; revision=52622
2011-07-11 00:25:26 +00:00
Alex Ionescu 1b775b8d8a [NTDLL]: Cleanup and half-fix LdrpCheckForLoadedDll, including adding comments for where it's broken. This uses RtlImageNtHeaderEx with much stringent checks as well.
svn path=/trunk/; revision=52621
2011-07-11 00:12:33 +00:00
Alex Ionescu f1c4df527e [RTL]: One day, Microsoft is going to stop using flags that are negatives. Fix boot/etc.
svn path=/trunk/; revision=52620
2011-07-11 00:10:27 +00:00
Rafal Harabien f9f36696f9 [WIN32CSR]
- Fix CSR hard error messages. Parameters are now converted to ANSI string which are expected by message format string.

svn path=/trunk/; revision=52619
2011-07-10 22:40:43 +00:00
Alex Ionescu c93b41ab3f [NDK]: Add missing RtlImageNtHeaderEx flags.
[RTL]: Implement RtlImageNtHeaderEx and make RtlImageNtHeader call it. This will result in much stricter (and correct) PE loading by default, and enable a flag which can do even stricter checks.
[NTDLL]: Export RtlImageNtHeaderEx (maybe NTOS should export it too, not sure).

svn path=/trunk/; revision=52618
2011-07-10 21:55:55 +00:00
Rafal Harabien d730393e07 - Add more NT status messages. Few of them are used by new LDR. Contains patch by Thomas Faber.
svn path=/trunk/; revision=52617
2011-07-10 19:47:45 +00:00
Jérôme Gardou c34fe70bfe [NTOSKRNL/MM]
- The initial region does not necessarily begins with the asked address, calculate remaining space acccordingly.

svn path=/trunk/; revision=52616
2011-07-10 19:24:49 +00:00
Cameron Gutman a149b1c33b [RTL]
- Revert r52612
- It came before its time ;)

svn path=/trunk/; revision=52615
2011-07-10 17:46:27 +00:00
Jérôme Gardou 0cb80213de [NTOSKRNL/MM]
- fix broken logic
- simplify calculation of remainig space to alter
- call ExFreePoolWithTag instead of ExFreePool
- return error on failure

svn path=/trunk/; revision=52614
2011-07-10 17:21:38 +00:00
Timo Kreuzer d28438f515 [NTDLL]
add some stubs for amd64

svn path=/trunk/; revision=52613
2011-07-10 16:43:03 +00:00
Cameron Gutman bee9140898 [RTL]
- Enable the proper implementation of RtlActivateActivationContextUnsafeFast

svn path=/trunk/; revision=52612
2011-07-10 16:33:23 +00:00
Cameron Gutman 6ef48aa4b4 [NTDLL]
- Fix memory corruption by reverting part of r52603

svn path=/trunk/; revision=52611
2011-07-10 16:25:42 +00:00
Rafal Harabien ce8c949828 [EVENTLOG]
- Fix MSVC warnings

svn path=/trunk/; revision=52610
2011-07-10 15:39:32 +00:00
Sylvain Petreolle 0685c73a53 [SFC_OS]
Implement SfcFileException, required by VBox Guest additions to install 3D support.

svn path=/trunk/; revision=52609
2011-07-10 15:05:14 +00:00
Rafal Harabien b509f3318b [NTDLL/LDR] - Fix one more USHORT and -1 comparison. Patch by Thomas Faber
svn path=/trunk/; revision=52608
2011-07-10 15:02:00 +00:00
Alex Ionescu ca4263fbf8 [NTDLL]: Fix parsing and buffer overflow in LdrpLoadDll. Add more debug prints, and add some missing code (commented out) for later.
svn path=/trunk/; revision=52607
2011-07-10 13:51:40 +00:00
Rafal Harabien 12bc8ad634 [NTDLL/LDR]
- Fix CMake build
- Minor improvements
Path by Thomas Faber

svn path=/trunk/; revision=52606
2011-07-10 13:44:19 +00:00
Jérôme Gardou ef65e8cc09 [AFD]
- fix MSVC build

svn path=/trunk/; revision=52605
2011-07-10 13:28:47 +00:00
Alex Ionescu f23c2d83be [NTDLL]: Actually delete the file.
svn path=/trunk/; revision=52604
2011-07-10 13:23:54 +00:00
Alex Ionescu 5a7963b7ba [NTDLL]: More fixes to the PE parsing code.
[NTDLL]: Move and fix LdrUnloadDll to ldrapi.c
[NTDLL]: Remove yet another cruft file. 

svn path=/trunk/; revision=52603
2011-07-10 13:23:19 +00:00
Rafal Harabien cc5bf5ecd5 [NTDLL/LDR]
- Don't use -1 for USHORT LDR_DATA_TABLE_ENTRY::LoadCount. When comparing ((USHORT)-1) == 0xFFFF vs (int)-1 it ends in comparison 0xFFFF vs 0xFFFFFFFF with is wrong. Fixes shutdown from shell
See issue #6345 for more details.

svn path=/trunk/; revision=52601
2011-07-10 11:49:52 +00:00
Cameron Gutman 38990db5fd [AFD]
- Fix broken TDI address functions which were causing subtle memory corruptions, wasted memory, and incorrect or uninitialized values of the address length field
- Remove some buggy code that wasn't used anywhere
- General refactoring to reduce code duplication
- Handle an invalid address type properly

svn path=/trunk/; revision=52600
2011-07-10 08:25:31 +00:00
Cameron Gutman 3e44b02671 [KERNEL32]: Fix build
svn path=/trunk/; revision=52598
2011-07-10 07:15:26 +00:00
Cameron Gutman 41406f9697 [AFD]
- Probe and lock pages with the KernelMode access mode instead of Irp->RequestorMode (UserMode) since we're dealing with memory that we allocated in kernel-mode
- Fixes getpeername() and HTTPS browsing in Firefox

svn path=/trunk/; revision=52597
2011-07-10 02:23:12 +00:00
Alex Ionescu dfe6317126 [NTDLL]: More attempts at fixing up the loader, this time in the PE side of things.
svn path=/trunk/; revision=52596
2011-07-10 02:14:29 +00:00
Alex Ionescu ef16071792 [NTDLL]: Multiple fixes and cleanups to several loader functions in ldrutils.
[NTDLL]: Use original symbolic function names instead of modified ones.
[NTDLL]: Fixup some incorrect flag and typedef definitions with correct ones.
[NTDLL]: Tag functions which seem broken/lacking in functionality/very different from the rest of the code the LDR rewrite was based on.

svn path=/trunk/; revision=52595
2011-07-10 01:34:19 +00:00
Rafal Harabien 4adb49c9cf [NTDLL/LDR]
- Fix build (not sure if its right place for IMAGE_LOADER_FLAGS_*)
- Remove unused label

svn path=/trunk/; revision=52593
2011-07-09 22:26:23 +00:00
Rafal Harabien 2bd7185260 [NTDLL/LDR]
- Fix CMake build
- Don't override failure status in LdrGetDllHandleEx
- Minor improvements
Fixes loading of mshtml.tlb in 2nd stage. Patch by Thomas Faber

svn path=/trunk/; revision=52591
2011-07-09 21:48:59 +00:00
Rafal Harabien 03c817cabf [BZIP2]
- Fix MSVC build

svn path=/trunk/; revision=52590
2011-07-09 21:07:30 +00:00
Rafal Harabien 5cec9ddc0e [FRAMEBUF_NEW]
- Fix MSVC build

svn path=/trunk/; revision=52589
2011-07-09 20:33:47 +00:00
Alex Ionescu d544cad512 [NTDLL]: Fix busted up LdrpCreateDllSection function, checking for the wrong things completely for Safer support, and also messing up the failure/success paths. Based on a find by arty.
svn path=/trunk/; revision=52588
2011-07-09 20:33:29 +00:00
Rafal Harabien 97e63bf1b7 [NORMALIZ]
- Don't build normaliz.dll - it's Win Vista library. It didn't even work because exports was redirected to commented out kernel32 exports. GCC ignored it but MSVC returns error in such case.

svn path=/trunk/; revision=52587
2011-07-09 19:18:49 +00:00
Timo Kreuzer c182d594ae [NTOSKRNL]
Update TRAP_ENTRY macro to generate debugging information. Now WinDbg knows how to deal with the trap functions and also shows the user mode back traces.

svn path=/trunk/; revision=52586
2011-07-09 19:15:34 +00:00
Alex Ionescu 918511d9ea [NTDLL]: Reimplemnt LdrDisableThreadCalloutsForDll using new loader APIS.
[NTDLL]: Fix LdrpInitializeProcess to use new loader relocation API instead of LdrRelocateImage. Warn if an EXE gets relocated since this was never supported in ReactOS.
[NTDLL]: Move APIs into ldrapi.c and delete 3 leftover cruft files.
This is the extent of my review for the moment. There are still many problems with the loader. It should've been tested/put in a branch. I found these 25 bugs in less than a day. Other problems remaining are missing SEH around loader lock, not too sure if the cookie generation is correct, cookies are ULONG_PTR not ULONGs, and haven't checked the PE loading code yet (only reviewed ldrapi.c).

svn path=/trunk/; revision=52585
2011-07-09 16:15:43 +00:00
Alex Ionescu c3743c23c3 [NTDLL]: Some more misc. cleanups and extra output.
svn path=/trunk/; revision=52584
2011-07-09 15:32:36 +00:00
Alex Ionescu a00bcc0821 [NTDLL]: LdrFindEntryForAddress should cehck EntryInProgress first. Also add missing dprint.
[NTDLL]: LdrVerifyImageMatchesCheckSum does not actually do the check if the FileHandle is ORed with 1 (this is an optimization for KnownDLLs). Also, use EndOfFile.LowPart for the checksum, not ViewSize.
[NTDLL]: LdrpGetProcedureAddress: fix overflows, incorrect constants, incorrect memcopy call, and only run init routines if the thunk was actually snapped.

svn path=/trunk/; revision=52583
2011-07-09 14:52:07 +00:00
Timo Kreuzer b5eab2f965 [NTOSKRNL]
In MmDbgCopyMemory do physical memory copy, if the virtual target address is valid, but not writable. Fixes Step-Over on user mode addresses with WinDbg (can write break points now)

svn path=/trunk/; revision=52582
2011-07-09 14:15:47 +00:00
Alex Ionescu 5bf3d7c1d8 [NTDLL]: Fix multiple levels of fail in LdrGetDllHandleEx (returning with lock held, leaking memory, using NULL pointers, using magic flags, missing ASSERTs, buffer overflows, usage of incorrect constants, ignoring status failures, lack of varaible initialization, incorrect string initialization).
svn path=/trunk/; revision=52581
2011-07-09 13:37:47 +00:00
Jérôme Gardou 5d0a090209 [CMAKE]
- fix typo

svn path=/trunk/; revision=52580
2011-07-09 11:17:12 +00:00
Eric Kohl 752c88cdbd [WLANSVC]
Set status SERVICE_STOPPED when the service has been stopped.

svn path=/trunk/; revision=52579
2011-07-09 10:41:55 +00:00
Art Yerkes 720358902c [CMAKE] Sidesetup overloading nonpaged pool with big slabs of dwarf data.
svn path=/trunk/; revision=52578
2011-07-09 09:58:02 +00:00
Aleksey Bragin 289a5f8d37 [NTDLL/LDR]
- Comment out the actctx redirection check because it's placed wrongly. This should fix cases when a DLL is being loaded twice or more times for the same process. Spotted by Rafal Harabien.

svn path=/trunk/; revision=52577
2011-07-08 22:32:48 +00:00
Alex Ionescu 9fb0ac1448 [NTDLL]: Simplify LdrLockLoaderLock, fix its prototype, add an ASSERT, move cookie generation into its own inline.
svn path=/trunk/; revision=52576
2011-07-08 21:19:38 +00:00
Alex Ionescu d6358dd51e [NTDLL]: Fix LdrUnlockLoaderLock bugs. 4x10000$.
svn path=/trunk/; revision=52575
2011-07-08 21:07:31 +00:00
Rafal Harabien dbe1886186 [NTDLL/LDR]
- Use \\KnownDlls\\KnownDllPath instead of \\KnownDlls\\KnownDlls to check known dlls patch (spotted by Thomas Faber)
- Assume known dlls are in system32 if \\KnownDlls exists but KnownDllPath not

svn path=/trunk/; revision=52574
2011-07-08 19:42:53 +00:00
Cameron Gutman 820aba4e5a [IP]
- Complete waiting requests upon socket error
- Fixes connect() stall forever if the remote side is not listening

svn path=/trunk/; revision=52572
2011-07-08 16:34:49 +00:00
Amine Khaldi 31ee5fc3a7 [CMAKE]
* Add yet another awesome rossym/kdbg feature: struct printing using the command "dt". Brought to you by the Arty.

svn path=/trunk/; revision=52571
2011-07-08 11:16:26 +00:00
Amine Khaldi 81a39fdab6 [CMAKE]
* Disable stdcall fixup for executables.

svn path=/trunk/; revision=52570
2011-07-08 11:14:10 +00:00
Timo Kreuzer 2c426dbf82 [CMAKE]
Improve configure.cmd

svn path=/trunk/; revision=52569
2011-07-08 10:01:43 +00:00