Commit graph

44 commits

Author SHA1 Message Date
Mark Jansen 6abe0e50aa
[SDK][SHIMENG] Ensure that module entrypoints are not called while loading the shim engine
This is done by marking everything that is already loaded but not 'processed'.
After the shim engine is done initializing, the original state is restored,
with the exception of the shim engine itself.
CORE-15846
2019-03-14 20:02:01 +01:00
Serge Gautherie 6accaef3c7 [NDK] Fix 'DeletedChidren' typo (#1367)
On behalf of Vadim Galyant.
CORE-15769
2019-02-20 22:16:16 +01:00
Timo Kreuzer 68abf035c6 [NDK] Fix INIT_SECTION for Clang (use the GCC definition) 2019-02-12 19:31:33 +01:00
Mark Jansen e1aae1c620
[RTL] Implement RtlComputePrivatizedDllName_U 2019-02-07 18:48:49 +01:00
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Serge Gautherie c34fa1e389 [SDK][NDK] Move SYSTEM_POWER_INFORMATION to ntpoapi.h (#869)
As suggested by Thomas Faber. See CORE-12587 for more details.
2018-12-05 13:48:01 +01:00
Andrew Boyarshin 8c710dc518 [SDK] Allow use of SYSTEM_MEMORY_LIST_INFORMATION in kernel code 2018-11-30 10:21:12 +01:00
Mark Jansen 06eb99edef
[NTDLL][KERNEL32] Implement FLS callbacks. 2018-09-15 17:56:03 +02:00
Timo Kreuzer 2c909db295 [NTOS:OB] Rename object types to their official names to satisfy WinDbg
- Rename ObDirectoryType to ObpDirectoryObjectType and remove it from NDK (this is not exported!)
- Rename ObSymbolicLinkType to ObpSymbolicLinkObjectType
- Remove duplicated ObpTypeObjectType from ob.h
2018-08-17 20:28:45 +02:00
Mike Swanson 3c7e9bb332 Remove unnecessary executable bits 2018-08-15 18:29:09 +02:00
Eric Kohl 9d26058a8e [UMPNPMGR] Partially implement ReenumerateDeviceInstance which is needed by the Lenovo T400 network driver installer 2018-08-12 22:26:22 +02:00
Eric Kohl 4ffa0a2e55 [NTOSKRNL][NDK][UMPNPMGR] Define and use PLUGPLAY_CONTROL_PROPERTY_DATA.Properties values
NDK: Define PLUGPLAY_CONTROL_PROPERTY_DATA.Properties and PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA.Relations values.

NTOSKRNL: Map PLUGPLAY_CONTROL_PROPERTY_DATA.Properties values to IoGetDeviceProperty properties and add (dummy) code for unsupported cases.

UMPNPMGR: Use PLUGPLAY_CONTROL_PROPERTY_DATA.Properties values in PNP_GetDeviceRegProp.
2018-07-15 15:57:57 +02:00
Timo Kreuzer e39876dab7 [SDK] Fix 64 bit issues 2018-07-01 14:45:21 +02:00
Timo Kreuzer ae9e9eaef3 [NDK] Fix definition of MSR_DEBUG_CTL_LBR and MSR_DEBUG_CTL_BTF 2018-07-01 14:45:21 +02:00
Timo Kreuzer 3b78272d39 [NDK] Fix alignment macros and add missing ones
Remove obsolete ALIGN_UP_BY macro definition
2018-07-01 14:45:21 +02:00
Timo Kreuzer ca9fd861aa [DRIVERS][NTOS][NDK] Use IO_STACK_LOCATION instead of EXTENDED_IO_STACK_LOCATION and remove the latter from NDK 2018-07-01 14:45:21 +02:00
Timo Kreuzer 8719252e48 [XDK][NDK] Fix IO_STACK_LOCATION alignments
* Also add missing DIRECTORY_NOTIFY_INFORMATION_CLASS
2018-07-01 14:45:21 +02:00
Timo Kreuzer de1b195837 [NDK] Fix the type of KPROCESS::ActiveProcessors
Also fix related logic in KiSwapProcess
2018-07-01 14:45:21 +02:00
Timo Kreuzer 158812409d [NDK] Update x64 version of KEXCEPTION_FRAME 2018-07-01 14:45:21 +02:00
Hermès Bélusca-Maïto 4d494caf61
[NTOS:SE] Overhaul the token management code.
- Overhaul SepCreateToken() and SepDuplicateToken() so that they
  implement the "variable information area" of the token, where
  immutable lists of user & groups and privileges reside, and the
  "dynamic information area" (allocated separately in paged pool),
  where mutable data such as the token's default DACL is stored.
  Perform the necessary adaptations in SepDeleteToken() and in
  NtSetInformationToken().

- Actually dereference the token's logon session, when needed, in the
  'TokenSessionReference' case in NtSetInformationToken().

- Overhaul SepFindPrimaryGroupAndDefaultOwner() so that it returns
  the indices of candidate primary group and default owner within the
  token's user & groups array. This allows for fixing the 'TokenOwner'
  and 'TokenPrimaryGroup' cases of NtSetInformationToken(), since the
  owner or primary group being set *MUST* already exist in the token's
  user & groups array (as a by-product, memory corruptions that existed
  before due to the broken way of setting these properties disappear too).

- Lock tokens every time operations are performed on them (NOTE: we
  still use a global token lock!).

- Touch the ModifiedId LUID member of tokens everytime a write operation
  (property change, etc...) is made on them.

- Fix some group attributes in the SYSTEM process token, SepCreateSystemProcessToken().

- Make the SeCreateTokenPrivilege mandatory when calling NtCreateToken().

- Update the token pool tags.

- Explicitly use the Ex*ResourceLite() versions of the locking functions
  in the token locking macros.
2018-06-27 23:40:18 +02:00
Hermès Bélusca-Maïto a3376cd50d
[NDK] Update NtCreateToken() prototype annotations. 2018-06-27 23:40:17 +02:00
Eric Kohl 4911382913 [NDK] Replace the SYSTEMTIME fields StandardDate and DaylightDate in RTL_TIME_ZONE_INFORMATION by TIME_FIELDs and fix resulting errors
Patch will be sent upstream.

CORE-14658
2018-05-31 17:48:29 +02:00
Pierre Schweitzer 69a7879e81
[SDK] Add more types for job objects information 2018-05-25 08:48:51 +02:00
Pierre Schweitzer fb9ffed1cd
[SDK] Add a few types for job objects information 2018-05-25 08:48:51 +02:00
Mark Jansen 5a68fbeb43
[SDK] Correct NtGlobalFlag names. 2018-05-12 13:34:24 +02:00
Hermès Bélusca-Maïto e6d7ed7080
[NDK] Increase MAXIMUM_HARDERROR_PARAMETERS for Win2k3 compatibility. 2018-04-07 18:48:00 +02:00
Thomas Faber 56e2bf2f92
[NTOS:CC] Avoid some magic numbers. 2018-02-22 14:03:03 +01:00
Denis Malikov 420c0360ac
[SDK] Fix NT6 building issues and improve SDK NT6 headers.
CORE-12596
2018-02-10 18:58:35 +01:00
Pierre Schweitzer c5139563db
[NTOSKRNL] Bring an initial (and not perfect ;-)) implementation of read ahead to our Cc!
This halfplements CcScheduleReadAhead() which is responsible for finding the next reads
to perform given last read and previous reads. I made it very basic for now, at least
to test the whole process.
This also introduces the CcExpressWorkQueue in the lazy writer which is responsible
for dealing with read ahead items and which is dealt with before the regular queue.
In CcCopyData(), if read was fine, schedule read ahead so that it can happen in background
without the FSD to notice it! Also, update the read history so that scheduling as a
bit of data.
Implement (à la "old Cc" ;-)) CcPerformReadAhead() which is responsible for performing
the read. It's only to be called by the worker thread.

Side note on the modifications done in CcRosReleaseFileCache(). Private cache map
is tied to a handle. If it goes away, private cache map gets deleted. Read ahead
can run after the handle was closed (and thus, private cache map deleted), so
it is mandatory to always lock the master lock before accessing the structure in
read ahead or before deleting it in CcRosReleaseFileCache(). Otherwise, you'll
just break everything. You've been warned!

This commit also partly reverts f8b5d27.

CORE-14312
2018-02-09 10:14:11 +01:00
Pierre Schweitzer f8b5d27807
[NDK] Update the PRIVATE_CACHE_MAP structure to match W2K3 one.
Also update the spin lock on allocation.
2018-02-08 14:02:42 +01:00
Alex Ionescu 16e0cca7e1 [RTL]: Document and flesh out Boot Status Data (BSD) API/Structures
[NDK]: Document latest RTL_BSD_DATA as of RS3 based on ext.dll WinDBG
extension "!blackboxbsd" which outputs the entire structure field by
field :).
[NDK]: Update RTL_BSD_ITEM_TYPE thanks to ole32 symbols
[RTL]: Move system volume APIs to sysvol.c
[RTL]: Fill out BsdItemTable based on actual field offsets/sizes and not
hardcoded magic numbers which we won't ask where they came from.
[RTL]: Make RtlCreateBootStatusDataFile use an appropriate structure for
initializing the buffer instead of "UCHAR Buffer[12] = {0xC,0,0,0,
1,0,0,0, 1, 0x1e, 1, 0};" which appears like magic knowledge.
[RTL]: Rename "WriteMode" to "Read" in RtlGetSetBootStatusData since
it's much less confusing.
[RTL]: Some formatting fixes, SAL updates.
2018-02-04 09:33:32 -08:00
David Quintana 9b89cd1ef2
[NTOSKRNL] Fix CcIdleDelay initializer for old msvc versions (#339)
[NTOSKRNL] Fix initialization of CcIdleDelay for msvc builds (fixes boot).
* Introduce a macro to initialize LARGE_INTEGERs in a consistent way.
2018-01-31 18:12:57 +01:00
Thomas Faber d3e0eb2026
[NDK] Add DEFERRED_WRITE structure for Cc. CORE-14235
Consistently use CSHORT for NodeTypeCode/NodeByteSize while we're at it.
2018-01-28 10:48:36 +01:00
Timo Kreuzer 690cc9f30b [NDK] Fix some ob types (64 bit) 2018-01-06 17:13:22 +01:00
Timo Kreuzer a2f7de7ee8
Amd64/misc 64bit fixes (#236)
[REACTOS] Misc 64 bit fixes

* [NTOS:MM] Allow MEM_DOS_LIM in NtMapViewOfSection on x64 as well
* [NTOS:MM] Implement x64 version of MmIsDisabledPage
* [HAL] Remove obsolete code
* [NTOS:KE] Fix amd64 version of KeContextToTrapFrame and KeTrapFrameToContext
* [XDK] Fix CONTEXT_XSTATE definition
* [PCNET] Convert physical address types from pointers to PHYSICAL_ADDRESS
2018-01-01 12:07:50 +01:00
Ivan Labutin d6792047f3 [NTOS][NDK][RTL] A bunch of 'wrong size' fixes 2017-12-20 06:56:09 +01:00
Amine Khaldi 631a14ff64 [ASM][NDK][NTOS] Rename Self to SelfPcr in the KIPCR structure. 2017-12-13 13:49:00 +01:00
Jérôme Gardou 6aaf217b10 [OPENGL32]
- Implement storing thread data into the TEB
CORE-14024
2017-11-21 08:22:31 +01:00
Timo Kreuzer 547b38e022 [NDK] Add tests for TEB 2017-10-22 14:36:18 +02:00
Timo Kreuzer 95827a70e6 [NDK] Fix/improve definition of TEB
This also changes the default definition for NTDDI_VERSION in sdkddkver.h to NTDDI_WS03SP1, when _WIN32_WINNT is _WIN32_WINNT_WS03.
2017-10-22 14:36:18 +02:00
Timo Kreuzer 30cd606fe2 [NDK] fix some rtltypes.h definitions 2017-10-22 14:36:18 +02:00
Timo Kreuzer c22817db06 [NDK] Improve NDK tests for KTHREAD and add them to build 2017-10-08 18:11:07 +02:00
Timo Kreuzer b8bd38c860 [NDK] Add Win8+ version of KTHREAD 2017-10-08 18:11:07 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00