Commit graph

51 commits

Author SHA1 Message Date
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
Hermès Bélusca-Maïto bc5acd8102
[NTOS] Minor formatting + don't hardcode sizeof(UCHAR) value. 2018-12-20 03:47:46 +01:00
Hermès Bélusca-Maïto f4597b5540
[NTOS] Addendum to d8cb37bf: return the correct Status from NtAllocateUuids(). 2018-12-20 03:47:45 +01:00
Pierre Schweitzer 549793b8a4
[NTOSKRNL] Fix copy/pasta ;-) 2018-12-19 08:15:11 +01:00
Pierre Schweitzer d8cb37bf15
[NTOSKRNL] Probe parameters in NtAllocateUuids() if called from user-mode
This will avoid that userland applications can trigger an invalid write in
the kernel (and thus, a BSOD).

CORE-15462
2018-12-19 08:09:04 +01:00
Pierre Schweitzer 6ca1c55c6e
[NTOSKRNL] Only allow SYSTEM to call NtSetUuidSeed()
Also, validate input buffer before attempting any operation on it.
This will avoid userland applications to be able to trigger an invalid
read in the kernel (and thus a BSOD).

Regarding access restriction, see:
https://stackoverflow.com/questions/1254244/need-access-to-ntsetuuidseed-from-a-non-localsystem-process

CORE-15460
2018-12-18 23:12:41 +01:00
Pierre Schweitzer 962b2fd66a
[NTOSKRNL] Implement SystemDpcBehaviourInformation query 2018-12-09 20:54:40 +01:00
Pierre Schweitzer 13d9d3ebbf
[NTOSKRNL] Also account PRCBs for Io operations counters 2018-12-09 19:30:07 +01:00
Pierre Schweitzer e632375851
[NTOSKRNL] For SystemPerformanceInformation, return some info extracted from PRCB
This notably includes the amount of context switchs and system calls.
2018-12-09 18:56:50 +01:00
Pierre Schweitzer 4f1e9252f1
[NTOSKRNL] ExfReleaseRundownProtectionCacheAware*() functions don't return anything 2018-11-17 17:36:18 +01:00
Pierre Schweitzer 7ed17cd714
[NTOSKRNL] Implement ExfReInitializeRundownProtectionCacheAware()
We're done with cache-aware rundown protections!
2018-11-17 16:44:37 +01:00
Pierre Schweitzer 05cca64448
[NTOSKRNL] Implement ExfRundownCompletedCacheAware() 2018-11-17 16:44:37 +01:00
Pierre Schweitzer fed61c6305
[NTOSKRNL] Replace ExGetRunRefForCurrentProcessor() by a more generic function 2018-11-17 16:44:36 +01:00
Pierre Schweitzer 7e849470af
[NTOSKRNL] Implement ExfWaitForRundownProtectionReleaseCacheAware() 2018-11-17 16:44:36 +01:00
Pierre Schweitzer acdf74aa3b
[NTOSKRNL] Properly align runrefs on SMP in ExInitializeRundownProtectionCacheAware() 2018-11-17 16:44:36 +01:00
Pierre Schweitzer c5db202bdc
[NTOSKRNL] Properly align allocation on SMP in ExAllocateCacheAwareRundownProtection() 2018-11-17 16:44:36 +01:00
Pierre Schweitzer 36fadc2dca
[NTOSKRNL] Implement ExfAcquireRundownProtectionCacheAwareEx(), ExfReleaseRundownProtectionCacheAwareEx() 2018-11-17 16:44:35 +01:00
Pierre Schweitzer afb2214154
[NTOSKRNL] Simplify implementation of ExfAcquireRundownProtectionCacheAware(), ExfReleaseRundownProtectionCacheAware() 2018-11-17 16:44:35 +01:00
Pierre Schweitzer 7e36e76d5d
[NTOSKRNL] Implement ExfAcquireRundownProtectionCacheAware(), ExfReleaseRundownProtectionCacheAware() 2018-11-17 16:44:35 +01:00
Pierre Schweitzer 47d309b262
[NTOSKRNL] Implement ExSizeOfRundownProtectionCacheAware() 2018-11-17 16:44:35 +01:00
Pierre Schweitzer ce94d37dbe
[NTOSKRNL] Implement ExInitializeRundownProtectionCacheAware() 2018-11-17 16:44:35 +01:00
Pierre Schweitzer bc77f83888
[NTOSKRNL] Implement ExAllocateCacheAwareRundownProtection() and ExFreeCacheAwareRundownProtection() 2018-11-17 16:44:34 +01:00
Hermès Bélusca-Maïto 2ed65d1555
[NTOS] Configuration Manager fixes.
- Rework CmpSetSystemValues() and remove its 1st-stage text-mode setup hack, since a real registry hive will be used for 1st-stage either.
- Lock, then unlock the registry in NtInitializeRegistry when initializing the hives & flusher.
- Call CmpInitializeHiveList() (i.e., initialize the other hives like \Software, \User, \.Default) only when we are not in setup-mode.

svn path=/branches/setup_improvements/; revision=74747
2018-10-25 00:40:02 +02:00
Pierre Schweitzer 3d13a464f7
[NTOSKRNL] Add the CcPinMappedDataCount counter 2018-10-13 22:51:44 +02:00
Stanislav Motylkov d033fe9bbf [NTOS:EX] Implement SystemFirmwareTableInformation class 2018-08-19 20:27:59 +02:00
Serge Gautherie 7d6bda16c6
[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n".
NB: Not touching calls in "third-party" code: class and classpnp.
2018-08-08 22:03:45 +02:00
Serge Gautherie 9ff9bd81c4 [NTOSKRNL] Round memory size up, "debug log" part
Assumed to better match actual physical RAM size.

CORE-12321
2018-08-07 20:36:04 +02:00
Timo Kreuzer ff7cc6f37e [NTOS] Fix 64 bit issues 2018-08-04 19:19:34 +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
Hermès Bélusca-Maïto c54aaacc8e
[NTOSKRNL] Formatting fix only. 2018-04-01 22:51:24 +02:00
Hermès Bélusca-Maïto 6cefd1242d
[NTOSKRNL] Simplify NtRaiseHardError() by merging the terminating blocks.
- Return the status codes provided by the Ex(p)RaiseHardError() calls.
- Fix the return values in case of failure.
2018-04-01 22:50:56 +02:00
Hermès Bélusca-Maïto ea390c2b3f
[NTOSKRNL] ExRaiseHardError(): Protect strings copy to user-mode space inside a SEH block. 2018-04-01 22:50:44 +02:00
Hermès Bélusca-Maïto 842605e3ef
[NTOSKRNL] Don't emit hard errors for the calling thread if hard errors have been disabled for this thread on user-mode side. 2018-04-01 22:50:33 +02:00
Hermès Bélusca-Maïto 3a0ecb3dc8
[NTOSKRNL] Don't hardcode flag values for DefaultHardErrorProcessing. 2018-04-01 22:50:16 +02:00
Hermès Bélusca-Maïto 1fadfea053
[NTOSKRNL] Update Doxygen descriptions for NtRaiseHardError, ExRaiseHardError, ExpRaiseHardError and NtSetDefaultHardErrorPort. 2018-04-01 22:39:32 +02:00
Hermès Bélusca-Maïto f0729b30bb
[NTOSKRNL] Forbid processes without the Tcb prvilege to perform a user-mode hard-error BSOD. 2018-04-01 22:39:31 +02:00
Hermès Bélusca-Maïto ed06b843fb
[NTOSKRNL] In addition to the hard-error port, reference also the process that handles the hard errors so that it doesn't disappear behind our back. On shutdown both the hard-error port and process are dereferenced. 2018-04-01 22:39:30 +02:00
Thomas Faber 2b8f4f6e24
[NTOS:EX] Worker threads must not exit with a critical region held. CORE-13734 2018-03-07 13:18:09 +01:00
Pierre Schweitzer 9ac2e9855a
[NTOSKRNL] Add the CcDataFlushes and CcDataPages counters 2018-02-24 14:52:04 +01:00
Pierre Schweitzer 0fbdf31709
[NTOSKRNL] Add the CcPinReadWait and CcPinReadNoWait counters 2018-02-24 14:52:04 +01:00
Pierre Schweitzer 45964099f3
[NTOSKRNL] Return some Cc counters in SystemPerformanceInformation 2018-02-24 13:36:26 +01:00
Pierre Schweitzer 853f04e6fc
[NTOSKRNL] Rename ExpCriticalWorkerThreads and ExpDelayedWorkerThreads (no p)
to match Windows names and make them available for the whole kernel.
2018-02-07 21:37:17 +01:00
Thomas Faber fda24da872
[NTOS] Remove unnecessary NULL checks and add a missing one. CIDs 1411958, 716670, 1322186 2018-01-20 15:59:35 +01:00
Timo Kreuzer 2dade10d54 [NTOS] Fix 64 bit warnings 2018-01-14 13:54:14 +01:00
Timo Kreuzer f555c102b7 [NTOS:EX] Don't dereference ExpCritSecOutOfMemoryEvent when it was never referenced. 2018-01-04 21:05:10 +01:00
Stanislav Motylkov dd71fb5ec8 [NTOS:INBV] Implement rotation bar for boot screen
CORE-10327 #resolve
2018-01-03 02:57:28 +01:00
Timo Kreuzer cbc4cfeed6 [NTOS:EX] Fix handle table code for x64.
Based on patch by Ivan Labutin. See PR #115
2017-12-29 19:44:09 +01:00
Hermès Bélusca-Maïto ff8d8a8162
Revert 57c0678 (PR #194) that has been erroneously committed too early. 2017-12-24 16:54:48 +01:00
Stanislav Motylkov 57c0678818
[NTOS:INBV] Implement rotation bar for boot screen 2017-12-24 16:47:02 +01:00
Colin Finck 3d6040615a Make ReactOS report the Git revision as output by "git describe".
- REVISION is now something like "0.4.7-dev-53-g1304b53" instead of "r12345".
- Change WINDOWS_NT_BANNER to better represent the ReactOS version and the reported NT version.
- Introduce REACTOS_COMMIT_HASH which contains the full 40-character commit hash (for comparing revisions, e.g. in rosautotest/testman).
2017-10-03 12:55:38 +02:00