Commit graph

64 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
Mark Jansen faddd38b36
[KERNEL32] Revert d897e27, which would re-initialized a list.
Spotted by Andrew Boyarshin.
2018-12-03 20:48:14 +01:00
Denis Malikov d897e271a2
[KERNEL32] FlsAlloc - fiber local storage list was not initialized before using 2018-11-21 19:18:01 +01:00
Adam Słaboń b8044d6783 [TRANSLATION] Polish translation update (#1029)
Translated missing strings and improved existing translations.
2018-11-11 17:55:01 +01:00
Mark Jansen 824e5dba51
[KERNEL32] Directly use UnhandledExceptionFilter in BaseProcessStartup 2018-10-28 13:01:38 +01:00
Mark Jansen 40549483f6
[KERNEL32] Use the default UnhandledExceptionFilter in BaseThreadStartup.
This should allow unhandled exceptions in a thread to trigger our crash reporter,
instead of killing the process directly.
2018-10-28 13:01:38 +01:00
Mark Jansen 71993fd8c9
[KERNEL32] Fix some stubs for 0x600+ 2018-10-12 19:30:24 +02:00
Mark Jansen 12654d2852
[KERNEL32] Ensure the PebLock is always released in FlsFree 2018-09-15 17:56:03 +02:00
Mark Jansen 06eb99edef
[NTDLL][KERNEL32] Implement FLS callbacks. 2018-09-15 17:56:03 +02:00
Katayama Hirofumi MZ 31019e8c0c [TRANSLATION] Update Romanian translation (#851)
Translation from Stefan Fulea.
CORE-15023
2018-09-14 11:04:36 +02:00
Mark Jansen 8642654a00
[KERNEL32] Do not embed binary data inside a string resource.
CORE-14948
2018-09-12 21:31:55 +02:00
Denis Malikov 69a040d275 [KERNEL32] fix spec file for -version=0x600+
CORE-12596
2018-09-01 17:21:21 +02:00
Pierre Schweitzer 2bd33d58d8
[KERNEL32] Shhhh! 2018-09-01 15:46:44 +02:00
Stanislav Motylkov 844483504b [KERNEL32] Implement system firmware functions properly 2018-08-19 20:27:59 +02:00
Timo Kreuzer 094a90ad4e [NTOS:PS] Fix an issue with PROCESS_DEVICEMAP_INFORMATION size on 64 bit builds
The PROCESS_DEVICEMAP_INFORMATION  union has 2 fields, one is a handle, the other one is a structure of 36 bytes (independent of architecture). The handle forces 64 bit alignment on 64 bit builds, making the structure 4 bytes bigger than on 32 bit builds. The site is checked in NtQueryInformationProcess (case ProcessDeviceMap). The expected size on x64 is the size of the Query structure without alignment. autocheck correctly passes the site of the Query union member, while smss passes the full size of PROCESS_DEVICEMAP_INFORMATION. Packing the structure is not an option, since it is defined in public headers without packing. Using the original headers sizeof(PROCESS_DEVICEMAP_INFORMATION) is 0x28, sizeof(PROCESS_DEVICEMAP_INFORMATION::Query) is 0x24.
2018-08-17 22:08:37 +02:00
Mark Jansen 9b6fb9f2f8
[RTL][KERNEL32] Add a comment indicating we need SEH in RtlImageNtHeaderEx
CORE-14532
CORE-14857
2018-08-13 13:24:12 +02:00
Timo Kreuzer 0f8439aa71 [DLLS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer 4f0a158a2f [KERNEL32] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Stanislav Motylkov d956eafda8
[KERNEL32] Implement System Firmware functions
- Implement EnumSystemFirmwareTables
- Implement GetSystemFirmwareTable

These functions currently using registry workaround and can be improved later.

CORE-12105
2018-08-02 21:15:28 +02:00
Hermès Bélusca-Maïto 2158f31b71
[KERNEL32] Use RtlStringCbCopyNW() to correctly fill the WIN32_FIND_DATA.cFileName and cAlternateFileName members without any overflow and with a terminating NULL character. 2018-07-22 21:32:38 +02:00
Hermès Bélusca-Maïto c7022c1b0c
[KERNEL32] Use NULL for pointers. 2018-07-07 18:58:03 +02:00
Eric Kohl bd2f3d39a9 [KERNEL32] Get/SetTimeZoneInformation: Convert the Milliseconds value between TIME_FIELDS and SYSTEMTIME too
CORE-14658
2018-06-01 12:49:26 +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
Timo Kreuzer 01ae49857a [KERNEL32] Add Vista exports 2018-04-21 18:31:27 +02:00
Timo Kreuzer 87d3f1005b [KERNEL32] Go back to auto-numbering of export ordinals
Using static numbers was a bad idea in the first place, since we already deal with x64, which has different ordinals. Also @ will automatically do the same thing! It does not mean "no ordinal", it only means automatically apply incrementing numbers.
2018-04-21 18:31:27 +02:00
Serge Gautherie a8f1bea4b1 [KERNEL32] FlsAlloc(): Add a missing '\n' to a DPRINT1() 2018-04-14 16:07:29 +02:00
Amine Khaldi dabc7c9e92 [KERNEL32/STRING] Sync sortkey.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:49:52 +01:00
Amine Khaldi cf14b6b2f5 [KERNEL32/STRING] Sync lcformat.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:48:50 +01:00
Amine Khaldi eaa9d0d12c [KERNEL32/STRING] Sync format_msg.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:47:12 +01:00
Amine Khaldi 7f3e00c573 [KERNEL32/STRING] Sync fold.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:45:42 +01:00
Amine Khaldi d5064a6894 [KERNEL32] Missed this file. Fixes build. 2018-04-11 12:44:23 +01:00
Amine Khaldi efc8966665 [KERNEL32/STRING] Import digitmap.c from, and sync casemap.c with, Wine Staging 3.3. CORE-14434 2018-04-11 12:39:39 +01:00
Amine Khaldi 6d262f1ee4 [KERNEL32/WINE] Sync res.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:36:44 +01:00
Amine Khaldi 8d2519218f [KERNEL32/WINE] Sync profile.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:32:54 +01:00
Amine Khaldi 2f1d080ce5 [KERNEL32/WINE] Sync lzexpand.c with Wine Staging 3.3. CORE-14434 2018-04-11 12:30:53 +01:00
Mark Jansen ac620c2e8e
[KERNEL32] Implement FlsAlloc/FlsFree based on Wine's implementation. 2018-04-08 17:27:24 +02:00
Mark Jansen ee7f479c57
[RTL][XDK][KERNERL32_WINETEST] Import wine actctx changes from 3.2-37c98396
This adds support for reading the trustInfo (requestedExecutionLevel),
and the compatibility (supportedOs) sections.
2018-02-19 22:23:39 +01:00
Mark Jansen 4a2ad113e5 [KERNEL32] Add version info to VerifyVersionInfo mismatch print. 2018-01-15 19:47:58 +01:00
Colin Finck 63a3a2cbb8
[KERNEL32] Accept all images for NT 3.1 and higher instead of bailing out at image versions > 5.01 (#273)
Print a debug message whenever an application newer than ReactOS' internal NT version is started.
This gets a simple "Hello World" compiled by VS' 2017 regular "v141" toolchain to run under ReactOS.

Please retry NT6+ applications!
2018-01-10 09:24:22 +01:00
Erdem Ersoy ba3f074320 [TRANSLATIONS] Update the email address and add a note in the Turkish translation document (#271) 2018-01-07 22:09:42 +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
Hermès Bélusca-Maïto eea43394bf
[KERNEL32] Improve the definition of EXENAME_LENGTH. 2017-12-16 21:07:23 +01:00
Hermès Bélusca-Maïto 197ec4c5b8
[KERNEL32] Update some console API prototypes. 2017-12-10 17:04:29 +01:00
Pierre Schweitzer 4fcaf92ec3
[KERNEL32] Silent a noisy DPRINT1 2017-12-09 11:54:18 +01:00
Pierre Schweitzer ebe9735835
[KERNEL32] Fix a FIXME in WaitNamedPipeW(): allow waiting on a remote pipe 2017-10-29 20:34:49 +01:00
Pierre Schweitzer a80f5f53e7 [KERNEL32] In GetLogicalDrives(), if NtQueryInformationProcess() call succeed, but return drive map is empty, make sure returned error is success.
Patch by Alex Ionescu
2017-10-29 14:49:59 +01:00
Pierre Schweitzer 0add5d0a79 [KERNEL32] Fix MSVC build 2017-10-23 17:25:19 +02:00
Pierre Schweitzer 34c39a1336 [KERNEL32] Implement NpGetUserNamep() 2017-10-23 17:09:21 +02:00
Pierre Schweitzer 19cef7806c [KERNEL32] Fix a FIXME in GetNamedPipeHandleStateW and stub a private function for a left unimplemented function 2017-10-23 14:36:18 +02:00