reactos/ntoskrnl
Joachim Henze 4ea9a8a667 [0.4.10][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:01:19 +01:00
..
cache [NTOSKRNL] Drop the always running thread for lazy writer. 2018-02-07 21:37:17 +01:00
cc [NTOSKRNL] Be noisy when deferring writes. 2018-07-15 09:57:16 +02:00
config [REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n". 2018-08-08 22:03:45 +02:00
dbgk [NTOS] Remove unnecessary NULL checks and add a missing one. CIDs 1411958, 716670, 1322186 2018-01-20 15:59:35 +01:00
ex [NTOS:EX] Implement SystemFirmwareTableInformation class 2018-08-19 20:27:59 +02:00
fsrtl [NTOSKRNL] Properly initialize the IO_STATUS_BLOCK 2018-08-17 19:13:13 +02:00
fstub [NTOS] Fix 64 bit warnings 2018-01-14 13:54:14 +01:00
inbv [NTOS:INBV] Simplify a little bit the BootLogoFadeIn() function 2018-01-03 02:57:28 +01:00
include [NTOS:OB] Rename object types to their official names to satisfy WinDbg 2018-08-17 20:28:45 +02:00
io [0.4.10][NTOSKRNL] Demote some noisy dprints 2020-12-21 06:18:09 +01:00
kd [NTOSKRNL] Round memory size up, "debug log" part 2018-08-07 20:36:04 +02:00
kd64 [NTOSKRNL] Round memory size up, "debug log" part 2018-08-07 20:36:04 +02:00
kdbg [NTOSKRNL] Quickly implement the !defwrites in KDBG 2018-02-09 12:16:29 +01:00
ke [0.4.10][NTOS][USERSRV] Silence noisy debug output. 2020-12-21 08:51:34 +01:00
lpc [NTOS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed. 2017-12-30 11:45:03 +01:00
mm [0.4.10][NTOSKRNL] Mute noisy DPRINT 'SectionObject has ImageSection' during shutdown CORE-18029 2022-01-27 20:18:42 +01:00
ntkrnlmp
ob [NTOS:OB] Rename object types to their official names to satisfy WinDbg 2018-08-17 20:28:45 +02:00
po [0.4.10][NTOSKRNL] Demote some noisy dprints 2020-12-21 06:18:09 +01:00
ps [NTOS:PS] Fix an issue with PROCESS_DEVICEMAP_INFORMATION size on 64 bit builds 2018-08-17 22:08:37 +02:00
rtl [0.4.10][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907 2022-03-17 14:01:19 +01:00
se [NTOS:SE] Fix SeSetSecurityDescriptorInfoEx to prevent pool corruption on x64 2018-08-16 16:32:49 +02:00
tests
vdm
vf
wmi [REACTOS] Improve/Fix some "printf" formats (#555) 2018-05-30 14:18:23 +02:00
CMakeLists.txt [0.4.10][NTOSKRNL] Restore section layout for NTOSKRNL to fix BSOD regression CORE-14683 2020-10-31 16:37:16 +01:00
guid.c
KrnlFun.c
ntdll.S
ntos.cmake [NTOSKRNL] Stub MM shutdown 2018-08-13 08:30:17 +02:00
ntoskrnl.rc [NTOS:INBV] Implement rotation bar for boot screen 2018-01-03 02:57:28 +01:00
ntoskrnl.spec
sysfuncs.lst