Commit graph

7167 commits

Author SHA1 Message Date
Timo Kreuzer fae2044a23 [CMAKE]
Integrate cmake stuff into trunk
Only files added.

svn path=/trunk/; revision=51783
2011-05-16 13:12:07 +00:00
Timo Kreuzer e12ea18992 [NTOSKRNL]
Patch by Paolo Bonzini <bonzini [at] gnu [dot] org>
Fix implementation of ExInterlockedAddLargeStatistic
The old version wasn't really atomic.

See issue #6223 for more details.

svn path=/trunk/; revision=51748
2011-05-14 19:29:42 +00:00
Timo Kreuzer 41b76d4eca [NTOSKRNL]
Fix pathes of resources

svn path=/trunk/; revision=51722
2011-05-14 08:50:11 +00:00
Timo Kreuzer 0615e6a7be [NTOSKRNL]
Merge r51181 from cmake branch:
Move macro definition out of macro instantiation.
Fixes compilation with MSVC

svn path=/trunk/; revision=51721
2011-05-14 08:33:30 +00:00
Timo Kreuzer 1a70567bcd [FREELDR/HAL/NTOSKRNL]
Merge asm changes from cmake branch. No code change, only MSVC compatibility fixes


svn path=/trunk/; revision=51708
2011-05-13 19:51:09 +00:00
Aleksey Bragin 9d03d12745 [NTOSKRNL]
- Sam Arun Raj Seeniraj: ObpLookupObjectName() used to reparse endlessly when a symlink points to itself, preventing this by limiting number of reparse attemtps.
See issue #993 for more details.

svn path=/trunk/; revision=51666
2011-05-10 15:43:55 +00:00
Aleksey Bragin 5f617a7c44 [NTOSKRNL]
- Make ObpParseSymbolicLink properly handle the case when target path has a trailing path separator. Based on findings by Samarunraj.
See issue #993 for more details.

svn path=/trunk/; revision=51665
2011-05-10 15:09:36 +00:00
Eric Kohl 1335fefcd9 [NTOSKRNL]
Fix two typos, one spotted by Gabriel Ilardi and the other one spotted by me.

svn path=/trunk/; revision=51663
2011-05-10 12:31:11 +00:00
Eric Kohl 52077d8306 [NTOSKRNL]
Implement CmpSetVersionData: Set the CurrentType value in the HKLM\Software\Microsoft\Windows NT\CurrentVersion key.

svn path=/trunk/; revision=51653
2011-05-08 21:37:00 +00:00
Aleksey Bragin 3d60cef193 Sam Arun Raj Seeniraj:
[NTOSKRNL.EXE]
- Complemented existing stub routines ObpDeleteSymbolicLinkName() and ObpCreateSymbolicLinkName(). Now when symbolic links are created, they are checked for dos drive mapping and ObSystemDeviceMap is updated accordingly.
- Updates to ObpDeviceMapLock are protected by a guarded mutex (changed from fast mutex by Aleksey Bragin).
- Aleksey Bragin: Fix concurrent access issues in ObDereferenceDeviceMap. The DeviceMap read/write operation must be atomic (within the ObpDeviceMapLock region).

[SUBST.EXE]
- Removed hard coded strings and moved it to resource file.

[WIN32CSR.DLL]
- Added a workaround, when target path end with a trailing '\', the substituted drive fails to parse to the target, this is a bug in the object manager, but working around it in CsrDefineDosDevice() by stripping trailing '\'.

See issue #993 for more details.

svn path=/trunk/; revision=51452
2011-04-25 16:08:00 +00:00
Aleksey Bragin 0e5118d97b [NTOSKRNL/KE]
- Correctly return whether there is a kernel APC pending in KiSwapContextExit. Fixes IRQL asserts seen in bugs 5955 and 5777. Michael Martin's help in finding and fixing this bug was invaluable. Also thanks to Art Yerkes and testing team for additional information.
See issue #5955 for more details.

svn path=/trunk/; revision=51445
2011-04-24 11:24:37 +00:00
Michael Martin 7e9f462dbd [ntoskrnl]
- Fix a type from rev 19847. Only if the KernelMode List is not empty are there pending APCs.

svn path=/trunk/; revision=51442
2011-04-24 06:48:50 +00:00
Matthias Kupfer 7ce75cdf13 fix accidentally set property svn:executable
svn path=/trunk/; revision=51374
2011-04-17 09:50:07 +00:00
Timo Kreuzer b63bf768a6 [NTOSKRNL]
ExInitializePushLock takes a PEX_PUSH_LOCK as parameter, do it the same in the inline version instead of casting to PULONG_PTR everywhere

svn path=/trunk/; revision=51278
2011-04-08 12:30:33 +00:00
Michael Martin 6ecaf80fcf [NTOS/MM]
- Update PoolTag used with ExFreePooWithTag to match changes made in 46987 by richard.

svn path=/trunk/; revision=51258
2011-04-05 11:42:38 +00:00
Aleksey Bragin 550e976e24 [NTOS/KE]
- Clear KernelApcPending flag every time the Kernel APCs queue is not empty.

svn path=/trunk/; revision=51204
2011-03-30 11:05:40 +00:00
Aleksey Bragin fb0b4f31c4 [NTOS/MM]
- Remove IMG_SCN_TYPE_NOLOAD support which was firstly removed by Alex, then reenabled by Herve. Hopefully it works this time.
- Return proper image size after successfully mapping an image section (previously, 0 was always returned). The change above is necessary for returning correct size.

svn path=/trunk/; revision=51192
2011-03-29 10:56:28 +00:00
Aleksey Bragin 828d04705a [NTOS/MM]
- Return STATUS_IMAGE_NOT_AT_BASE when mapping an image section to a different base address. New ntdll loader depends on this and fails to relocate the image if this status is not returned.

svn path=/trunk/; revision=51171
2011-03-27 11:32:55 +00:00
Rafal Harabien 164140d904 Fix duplicated startup version string
Patch by Thomas Faber <thfabba at gmx dot de>
See issue #6015 for more details.

svn path=/trunk/; revision=51165
2011-03-26 21:41:49 +00:00
Rafal Harabien 547a7d215f [NTOSKRNL]
Change strncpy calls to RtlStringSbCopyA (PART 1/x)
Fix bug in MmLoadSystemImage which caused FileName parameter to be freed

svn path=/trunk/; revision=51138
2011-03-25 22:28:15 +00:00
Rafal Harabien c14b8afbdc Forgotten in r51135...
svn path=/trunk/; revision=51136
2011-03-25 21:49:03 +00:00
Rafal Harabien e0191e8920 [PSDK]
Import strsafe.h from mingw-w64. It's more complete compared to our headers

[DDK]
Import ntstrsafe.h from mingw-w64 (converted from strsafe.h). It's more complete compared to our headers

[NTOSKRNL]
Use sizeof instead of magic numbers

Let's use strsafe functions now instead of strncpy/wcsncpy, which doesn't always NULL terminate :)

svn path=/trunk/; revision=51135
2011-03-25 21:42:48 +00:00
Rafal Harabien cd22887a97 [NTOSKRNL]
Revert r51108. ProbeForRead doesn't check if memory is readable.
Improve comments and replace trick raising exception with call to ExRaiseAccessViolation.

[WIN32K]
Remove ASSERTs in IntSetSysColors: this function is only called in NtUserSetSysColors in SEH block. It shouldn't crash for NULL pointers.

svn path=/trunk/; revision=51126
2011-03-23 15:49:44 +00:00
Gabriel Ilardi d312252d26 [NTOS/INBV]
- Update boot screen copyright year.

svn path=/trunk/; revision=51121
2011-03-23 11:44:35 +00:00
Aleksey Bragin cc6c8e90e2 [NTOS/KE]
- Remove VirtualBox SYSENTER-hack added in r50991.
- Bring back NT-compatible SYSENTER support detection changed in r50991.

svn path=/trunk/; revision=51120
2011-03-22 16:35:51 +00:00
Giannis Adamopoulos 8cf95d1319 [ntoskrnl]
- Implement calling OkayToCloseProcedure callouts to win32k for desktop and window station objects
- Fix a bug that caused ObpCloseHandle to return success even when OkayToCloseProcedure failed

[win32k]
- Rewrite SetProcessWindowStation to actually set the current window station and close the previous one
- Implement OkayToCloseProcedure callouts from the kernel to prevent closing the current desktop or window station

svn path=/trunk/; revision=51115
2011-03-22 09:19:26 +00:00
Rafal Harabien ec3c8d2441 Fix ProbeForRead. It wasn't ever checking if memory can be accessed. Thanks to big-endian it wasn't breaking MmUserProbeAddress as well. Code is now nearly the same as in ProbeForWrite. It shouldn't break anything. If it does, it's not bug in this code. :)
svn path=/trunk/; revision=51108
2011-03-21 14:43:56 +00:00
Roel Messiant 64c7077d57 [GENERAL]
Patch by Rafal Harabien (rafalh1992 at o2 dot pl)
- Change () to (VOID) in function declarators. Part 6/XX.
[USETUP]
Patch by Rafal Harabien (rafalh1992 at o2 dot pl)
- Initialize Offset field of partition list. Spotted using DPH.

svn path=/trunk/; revision=51072
2011-03-16 21:07:25 +00:00
Pierre Schweitzer c6add84fb9 [NDK]
Define HAL_IRQ_TRANSLATOR_VERSION constant

[NTOSKRNL]
When needed, use HAL_IRQ_TRANSLATOR_VERSION from NDK and don't define it locally

svn path=/trunk/; revision=51057
2011-03-15 19:45:43 +00:00
Pierre Schweitzer dc102df1d6 [NTOSKRNL]
Revert r51017 that was reverting r51016.
In fact, it seems that cmlib assert error, whatever that eats randomly doesn't come from software issue inside ReactOS, but from a build issue.
Indeed, as you may see in the different tests I performed it shows that the same build produces the same failure, again and again. But, new build shows that there is no assert anylonger with that commit.
Don't ask me why or how it happens, I just don't get it.
But most of the time, it works, no one knows why ("as usual" (tm)). But it's cool.

Someone from BE team and/or buildslaves managers should take a serious look at this issue.

Just in case: if that commit re-hits cmlib assert, don't blame it immediatly, just commit something else, and see whether trunk is still broken.
But, as you can see in testman, we have now test results for r51016 ;-)

svn path=/trunk/; revision=51025
2011-03-12 12:56:36 +00:00
Pierre Schweitzer b6ee921ee6 [NTOSKRNL]
Revert r51016 that quite magically breaks Qemu test bot (Registry corruption?).
Everything was (and is still fine) on VirtualBox.
It will be put back online once the issue will have been fixed.

svn path=/trunk/; revision=51017
2011-03-11 15:17:59 +00:00
Pierre Schweitzer c4d0b3e36b [NTOSKRNL]
Add most of the missing HAL stubs for both public & private dispatch tables

svn path=/trunk/; revision=51016
2011-03-11 13:16:16 +00:00
Pierre Schweitzer 81f9d934ff [NTOSKRNL]
Implemented FstubTranslatorNull, FstubTranslateResource, FstubTranslateRequirement, xHalGetInterruptTranslator.
In other words: please welcome interrupt translator in ReactOS.
It's not used yet.

svn path=/trunk/; revision=51012
2011-03-10 21:02:21 +00:00
Pierre Schweitzer c6d8f7de70 [NTOSKRNL]
Implemented FstubFixupEfiPartition():
Purpose is to let ReactOS handle realistic partitions length in case of an EFI/GPT protective MBR.
Indeed, when formatting a disk to GPT, you add a protective MBR that contains a fake partition entry, with type 0xEE having the following property: its size is set to maximum allocatable size in MBR.
In that case, if disk is small, you may go beyond disk size.
This is why a fix to partition length may be needed when re-reading partition entry.
This is the way ReactOS creates protective MBR.
You may find some more information here: http://msdn.microsoft.com/en-us/windows/hardware/gg463525

Fixed xHalIoReadPartitionTable():
- Allocate a buffer that has the proper size (instead of allocating a buffer which is too big). Especially since this leads to partial init only some lines after.
- Remove redundant & useless affectation.
- Check/fix 0xEE partition length in case of an EFI/GPT protective MBR (see upper point).

svn path=/trunk/; revision=51002
2011-03-09 10:33:13 +00:00
Jérôme Gardou f9ac17b332 [NTOSKRNL]
- Beatify cpu supported features output once and for all
DPRINT1 is not printf...

svn path=/trunk/; revision=50996
2011-03-07 20:39:33 +00:00
Jérôme Gardou f7049d7fb7 [NTOSKRNL]
- shrink cpu features output.
  - Add reference for the detection of non SYSENTER aware but claiming so CPUs detection

svn path=/trunk/; revision=50993
2011-03-07 18:45:11 +00:00
Aleksey Bragin ba43b429b9 [NTOS/FSRTL]
- Remove unnecessary upcasing, thanks Pierre.

svn path=/trunk/; revision=50992
2011-03-07 13:51:46 +00:00
Jérôme Gardou acd7f5a3da [NTOSKRNL]
- Print supported CPU features.
  - Simplify detection of non working but claimed SYSENTER support for intel processors
  - Workaround a virtualbox "feature" : claim that SYSENTER isn't supported despite the fact that it is.
Fix hang on registration of mshtml.dll in 2nd stage when using Virtualbox.

svn path=/trunk/; revision=50991
2011-03-07 13:33:10 +00:00
Aleksey Bragin fd989b27e9 - Fix a typo, thanks Herve!
svn path=/trunk/; revision=50982
2011-03-06 11:16:22 +00:00
Aleksey Bragin e996625659 [NTOS/FSRTL]
- Implement parameters checking in FsRtlIsNameInExpressionPrivate.
- Add two shortcuts for common wildcard invocations to make the function faster.
- Second (main part of the function) is still under review.

svn path=/trunk/; revision=50981
2011-03-06 11:00:17 +00:00
Timo Kreuzer 69d9838266 [NTOSKRNL]
Fix aborting of backtraces

svn path=/trunk/; revision=50924
2011-02-27 19:03:12 +00:00
Timo Kreuzer 3a61fab955 [NTOSKRNL]
Fix a serious bug, where NtAllocateVirtualMemory could allocate memory user mode memory above MmHighestUserAddress up to MmSystemRangeStart - 1, which is a no-access area.

svn path=/trunk/; revision=50917
2011-02-27 15:16:00 +00:00
Hervé Poussineau 38a3cf6ee4 [ntoskrnl] Fix compilation with _WINKD_=1
svn path=/trunk/; revision=50914
2011-02-26 20:00:08 +00:00
Pierre Schweitzer d6f4155e39 [NTOSKNRL]
For both FsRtlIsNameInExpression() & FsRtlIsDbcsInExpression():
As both UNICODE_STRING & ANSI_STRING might not be NULL-termined, don't attempt to read null char.
This fixes potential buffer overruns.
Then it fixes some (all?) 'TempPte.u.Long != 0' assertion failure.
See issue #5923 for more details.

svn path=/trunk/; revision=50904
2011-02-25 20:15:51 +00:00
Pierre Schweitzer 54e7b58e77 [NTOSKRNL]
Apply r50873 on FsRtlIsNameInExpression()

svn path=/trunk/; revision=50875
2011-02-23 12:09:07 +00:00
Pierre Schweitzer ba16b2f1ee [NTOSKRNL]
Reverted changes commited to largemcb.c
They weren't intended to be commited

svn path=/trunk/; revision=50874
2011-02-23 12:08:16 +00:00
Pierre Schweitzer d56de922f2 [NTOSKRNL]
One-line fix for FsRtlIs*InExpression(). This fixes failing tests, but not overrun.
Added some breaks to reach more quickly the end

svn path=/trunk/; revision=50873
2011-02-23 12:04:08 +00:00
Timo Kreuzer 6da719aa66 [NTOSKRNL]
Halfplement (win32 only) ProcessWow64Information case in NtQueryInformationProcess. Patch by Samuel Serapion.

See issue #5916 for more details.

svn path=/trunk/; revision=50831
2011-02-20 11:27:07 +00:00
Timo Kreuzer ea5522e1d8 [NTOSKRNL]
Add support for debug pre/post syscall hooks, that can be registered from win32k. They only exist on DBG versions.

svn path=/trunk/; revision=50823
2011-02-19 21:50:11 +00:00
Sylvain Petreolle 3eb47ac17d [NTOSKRNL]
Fix typo.

svn path=/trunk/; revision=50821
2011-02-19 18:43:54 +00:00