Commit graph

15 commits

Author SHA1 Message Date
Joachim Henze f9dc3a86b6 [0.4.11][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907
The main motivation to port all that back is to get rid of Win32K-BSODs 0x50 like CORE-13907
that could be triggered by user-mode-applications.
Technical reason was CORE-14857 "RtlImageNtHeaderEx needs SEH" and issues with hooks+callbacks.
All other tickets mentioned in here were regressions that we experienced on the long
journey towards perfecting the fixes on master head, and those were not happening yet in the older builds,
so they are mentioned in here only to allow tracking where that code went into.

Thanks to Jim Tabor, Mark Jansen & Thomas Faber
By squashed backmerge of the following commits:
0.4.15-dev-3440-g a89844f740
0.4.15-dev-3430-g 9cff384c22
0.4.14-dev-1287-g 568b6d0558
0.4.14-dev-1255-g 177ae91bf6
0.4.14-dev-1241-g 915a5764a9
0.4.14-dev-1240-g d8add40e89
0.4.14-dev-1002-g feb7df42b4

JIRA-tickets: CORE-13907, CORE-16769, CORE-14857, CORE-17856, CORE-17857, partially CORE-13019.
We also had some more dupes of CORE-13907 in JIRA, but I linked all of them (transitively)
towards the initial report, and resolved them without setting a fixVer for them.

In more detail:
--------------
[USER32] Fix BSOD 0x50 in 'WineVDM + Castle Of Winds' CORE-17856 CORE-17857

CORE-17856 BSOD 0x50 when starting Castle of the Winds second time, with WineVDM
CORE-17857 BSOD 0x50 on shutdown after closing Castle of the Winds with WineVDM

0.4.15-dev-3430-g 9cff384c22
0.4.15-dev-3440-g a89844f740
--------------
[NTUSER] Fix Strings and Format to Hooks

Allocate heap instead of data segment to be used for callbacks on user side.
Move and correct initial hook call out setup. Use it in more than one hook call.

This fixes issues with strings out of alignment and use of kernel pointers.

See CORE-13907 (HXD-portable BSOD) and CORE-16769 (HXD-portable exception)

Small wow update.

cherry picked from commit 0.4.14-dev-1287-g 568b6d0558
--------------
[RTL] Introduce RtlpImageNtHeader,
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857

cherry picked from commit 0.4.14-dev-1255-g 177ae91bf6
--------------
[WIN32SS] Form Sanity to Hook Callbacks

Fix WH_CALLWNDPROC/RET data to user hook calls.
Helps with CORE-13907 "(HXD-portable BSOD)"
Fixes the logging of "(win32ss/user/ntuser/callback.c:748) err: Failure to make Callback! Status 0xc00000fd" within CORE-13019, but not the whole ticket.

cherry picked from commit 0.4.14-dev-1241-g 915a5764a9
--------------
[USER32] Fix null return.

See CORE-16769 "HxD 1.7.7.0 portable unhandled exception"

cherry picked from commit 0.4.14-dev-1240-g d8add40e89
--------------
[WIN32SS] Fix a typo in dbg print

cherry picked from commit 0.4.14-dev-1002-g feb7df42b4
2022-03-17 14:00:15 +01:00
Pierre Schweitzer 45fd48bd0f
[CDFS_NEW] -> [CDFS] No old driver, thus no new driver 2018-08-21 12:32:15 +02:00
Hermès Bélusca-Maïto d53991895d
[BOOTLIB] Fix the implementation of RtlAssert() ('Message' can be NULL, and fix the printing of ANSI string). Fix also the implementation of DbgPrint(). 2018-08-08 21:37:22 +02:00
Timo Kreuzer 3be4081607
[BOOTLIB] Fix 64 bit issues (#433) 2018-03-18 16:10:41 +01:00
Alex Ionescu 9ec85c29e3 [ROSLOAD]: Continue work on target preparation OslPrepareTarget 2/104.
[ROSLOAD]: Stubplement OslpCheckForcedFailure, OslpGetSetBootStatusData, OslSetBootStatusData, OslGetBootStatusData.
[ROSLOAD]: Stub OslpInitializeBootStatusDataLog, OslpReadWriteBootStatusData.
[BOOTLIB]: Fix BlAppendBootOptionString to accept an actual BCD ID instead of hardcoding LibraryPath.
[BOOTLIB]: Fix BlAppendBootOptionBoolean to accept an actual BOOLEAN value instead of hardcoding TRUE.
[BOOTLIB]: Implement BlDeviceIsVirtualPartitionDevice.
[BOOTLIB]: Add missing BcdOSLoaderInteger_ForceFailure BCD value. Add BCDE_OSLOADER_TYPE_BOOT_STATUS_POLICY based on BcdEdit.exe and Geoff Chappel site.
2018-02-04 16:01:38 -08:00
Thomas Faber 324180a32e
[ROSLOAD] Fix clang-cl build. 2018-02-04 12:54:32 +01:00
Alex Ionescu adcb9bd175 [ROSLOAD]: Begin target preparation code. 1/104.
[ROSLOAD]: Stubs for OslFatalErrorEx, OslAbortBoot.
OslpSanitizeLoadOptionsString, OslpSanitizeStringOptions
[ROSLOAD]: Implement OslBlStatusErrorHandler,
OslpRemoveInternalApplicationOptions
[ROSLOAD]: Begin work on OslPrepareTarget. Small misc. fixes.
[BOOTLIB]: Extend BlStatusError to handle a custom status error handler.
2018-02-03 15:52:35 -08:00
jimtabor 61484edb9c Fix Linux Build 2018-02-03 11:35:08 -06:00
Alex Ionescu b6f5520bee [ROSLOAD]: Continue work on loader
[ROSLOAD]: Implement OslExecuteTransition, OslArchKernelSetup,
ArchRestoreProcessorFeatures, OslArchTransferToKernel.
[ROSLOAD]: Factor out the logo code. Clean ups.
2018-02-03 09:16:16 -08:00
Alex Ionescu 478348ead1 [ROSLOAD]: Fix NX enabling
[ROSLOAD]: The IA32_MISC_ENABLE MSR bit actually _disables_ NX, so
diabling the bit _enables_ NX.
[ROSLOAD]: The MSR_XD_ENABLE_MASK is for the _high_ DWORD of the MSR
(bit 34), not the low.
[ROSLOAD]: Fix printf.
[ENVIRON/ROSLOAD]: Switch to CPU_INFO structure instead of blindly using
INT[4]. Revealed a bug in the PAE detection which was reading out of
bounds.
2018-01-28 16:29:43 +01:00
Alex Ionescu e836d0b56e [ROSLOAD] Initial support for launching OS Loader Entrypoint and returning from it
[ENVIRON]: Implement BlArchGetCpuVendor
[ROSLOAD]: Stub OslPrepareTarget, OslExecuteTransition
[ROSLOAD]: Implement OslpMain
2018-01-28 13:24:20 +01:00
Amine Khaldi 7f56c4c5a2 [BOOT/ENVIRON] Define the INT8 type as signed char. CORE-11799 (#94) 2017-10-30 21:51:30 +01:00
Hermès Bélusca-Maïto acdf04bad2 Add .keep guard files in order to restore lost but empty directories we had with SVN.
Note that when you start populating these directories, you can remove the associated .keep guard file(s)!
2017-10-04 10:28:36 +02:00
Hermès Bélusca-Maïto 221ed4cefe Remove unwanted .gitignore files. 2017-10-04 10:28:36 +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