Commit graph

621 commits

Author SHA1 Message Date
Joachim Henze ea05d36496 [0.4.13][PARPORT] Fix I/O port length check, [REACTOS] Logging & formatting, e.g. CORE-14388 CORE-19105
Ports back a real fix:
0.4.15-dev-1173-g ba09834c5e [PARPORT] Fix I/O port length check

Ports back logging and formatting:
0.4.15-dev-6794-g 4eace8d762 [IPHLPAPI] Silence obsolete FIXME in GetAdaptersAddresses (#5834) CORE-14388
0.4.15-dev-6438-g b12ab486d8 [MUP] Mute DPRINT1's that slow down shared folder accesses (#5545) CORE-19105

And mutes some other loggings as well for stuff, that I either never want to port back, e.g. the IMM-implementations,
or which is not really helpful in the older branches:
fixme:(win32ss/user/user32/misc/imm.c:446) WINNLSEnableIME is UNIMPLEMENTED!
fixme:(../dll/win32/iphlpapi/address.c:290) GetAdaptersAddresses - Semi Stub: Family 2, Flags 0x0000002e, Reserved 00000000, pAdapterAddress 00000000, pOutBufLen 0143EBD4.
(dll/ntdll/ldr/ldrinit.c:1649) LdrpInitializeProcessCompat: Not applying automatic fix for winver 0xa00 due to policy
(win32ss/gdi/gdi32/objects/text.c:543) GdiBCExtTextOut nothing

when browsing the startmenu:
fixme:(dll/win32/comctl32/toolbar.c:394) [00080086] TBSTYLE_REGISTERDROP not implemented
fixme:(dll/win32/comctl32/toolbar.c:5636) [00080086] response 2045774661 not handled to NM_CUSTOMDRAW (CDDS_PREERASE)
fixme:(dll/win32/comctl32/toolbar.c:5673) [00080086] response 3225142 not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)
fixme:(dll/win32/comctl32/toolbar.c:5636) [000200BA] response 9 not handled to NM_CUSTOMDRAW (CDDS_PREERASE)
fixme:(dll/win32/comctl32/toolbar.c:5636) [00080086] response 2288892 not handled to NM_CUSTOMDRAW (CDDS_PREERASE)
fixme:(dll/win32/comctl32/toolbar.c:5673) [00080086] response 3291448 not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)

and a bigger block regarding the parallel port during booting:
(drivers/parallel/parport/parport.c:127) Parport DriverEntry
(drivers/parallel/parport/fdo.c:391) AddDevice(B0B50548 B0FED980)
(drivers/parallel/parport/fdo.c:25) AddDeviceInternal()
(drivers/parallel/parport/fdo.c:513) FdoPnp()
(drivers/parallel/parport/fdo.c:582) IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS
(drivers/parallel/parport/fdo.c:513) FdoPnp()
(drivers/parallel/parport/fdo.c:546) IRP_MJ_PNP / IRP_MN_START_DEVICE
(drivers/parallel/parport/misc.c:42) Calling lower device B0FED980
(drivers/parallel/parport/fdo.c:116) FdoStartDevice ()
(drivers/parallel/parport/fdo.c:160) Port: BaseAddress 0x378  Length 8
(drivers/parallel/parport/fdo.c:160) Port: BaseAddress 0x778  Length 8
(drivers/parallel/parport/fdo.c:174) Interrupt: Level 20  Vector 55
(drivers/parallel/parport/fdo.c:195) New LPT port: Base 0x378
(drivers/parallel/parport/fdo.c:513) FdoPnp()
(drivers/parallel/parport/fdo.c:586) Unknown minor function 0x9
(drivers/parallel/parport/fdo.c:513) FdoPnp()
(drivers/parallel/parport/fdo.c:586) Unknown minor function 0x14
(drivers/parallel/parport/fdo.c:513) FdoPnp()
(drivers/parallel/parport/fdo.c:564) IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations
(drivers/parallel/parport/fdo.c:351) FdoQueryBusRelations()
(drivers/parallel/parport/fdo.c:233) FdoCreateRawParallelPdo()
(drivers/parallel/parport/fdo.c:378) Done
(drivers/parallel/parport/pdo.c:165) PdoPnp()
2023-11-05 13:24:34 +01:00
Joachim Henze 4a6b865483 [0.4.13][NTOS][WIN32SS] Fix double free in ObCreateObject
Backport the following commits:
0.4.15-dev-6401-g 53b30e3f3b [NTOSKRNL][NTGDI] Formatting addendum, no functional change
0.4.15-dev-5487-g e7bbbf049e [NTOS] Fix double free on allocation failure in ObCreateObject

Just for verifying that the size didn't increase anywhere:

ntoskrnl.exe GCC8.4.0dbg RosBEWin2.2.2 master               5.124.096
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4.14  4.413.440 -> 4.413.440
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4.13  4.367.360 -> 4.367.360
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4.12  4.377.600 -> 4.377.600
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4.11  4.377.088 -> 4.377.088
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4.10  4.344.320 -> 4.344.320
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4. 9  4.311.552 -> 4.311.552
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4. 8  4.296.704 -> 4.296.704
ntoskrnl.exe GCC4.7.2dbg RosBEWin2.1.6 0.4. 7  4.231.168 -> 4.231.168

udfs.sys     GCC8.4.0dbg RosBEWin2.2.2 master             835.584
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4.14  745.472 -> 745.472
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4.13  745.472 -> 745.472
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4.12  749.568 -> 749.568
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4.11  749.568 -> 749.568
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4.10  749.568 -> 749.568
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4. 9  749.568 -> 749.568
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4. 8  749.568 -> 749.568
udfs.sys     GCC4.7.2dbg RosBEWin2.1.6 0.4. 7  749.568 -> 749.568

user32.dll   GCC8.4.0dbg RosBEWin2.2.2 master               1.585.152
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4.14  1.448.448 -> 1.448.448
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4.13  1.445.376 -> 1.445.376
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4.12  1.455.616 -> 1.455.616
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4.11  1.453.056 -> 1.453.056
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4.10  1.434.624 -> 1.434.624
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4. 9  1.422.336 -> 1.422.336
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4. 8  1.421.824 -> 1.421.824
user32.dll   GCC4.7.2dbg RosBEWin2.1.6 0.4. 7  1.418.752 -> 1.418.752

win32k.sys   GCC8.4.0dbg RosBEWin2.2.2 master               3.477.504
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4.14  2.904.064 -> 2.904.064
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4.13  2.895.872 -> 2.895.872
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4.12  2.887.680 -> 2.887.680
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4.11  2.867.200 -> 2.867.200
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4.10  2.863.104 -> 2.863.104
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4. 9  2.834.432 -> 2.834.432
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4. 8  2.830.336 -> 2.830.336
win32k.sys   GCC4.7.2dbg RosBEWin2.1.6 0.4. 7  2.830.336 -> 2.830.336
2023-08-02 00:36:48 +02:00
Joachim Henze b1d5a3913c [0.4.13][NTOS:MM] Ignore sections either PointerToRawData or SizeOfRawData is zero
VC1 Linker fills BSS.SizeOfRawData with data in IMAGE_OPTIONAL_HEADER.SizeOfUninitializedData but keeps PointerToRawData to zero.

Fixes CORE-18797 and some duplicates of that. (Apps, e.g. Doom95, compiled with Watcom-C-compilers wouldn't run otherwise.)
which regressed by
0.4.10-dev-136-g c7eb46d9fd
fix picked from
0.4.15-dev-5589-g 0d4a8d0ea6
----------
Port back also some unrelated formatting-improvements within section.c, e.g.: return(xyz) -> return xyz
A *partial* port of
0.4.15-dev-1793-g b7eb0fddf3
2023-02-28 04:06:46 +01:00
Joachim Henze c1a59f6d2e [0.4.13][NTOS:MM] Copy the WorkingSet page when initializing "hand-built" process CORE-16737
(and part of the duplicated ticket CORE-17642 which covers a bit more changes in master)

fix picked from 0.4.15-dev-3018-g 34662e2f6f
2022-10-15 17:25:40 +02:00
Joachim Henze 90965cd047 [0.4.13][REACTOS] Fix '\n.' typos CORE-18103
The same set of matches affected branches all the way down to releases/0.4.7
Fix picked from 0.4.14-dev-1010-g 1a83762ccc
2022-03-25 18:58:23 +01:00
Joachim Henze 04c7635c9e [0.4.13][NTOSKRNL] Mute noisy DPRINT 'SectionObject has ImageSection' during shutdown CORE-18029
All releases/0.4.8 until and including releases/0.4.14 were affected by the following logspam
during shutdown:
(../ntoskrnl/mm/section.c:4839) SectionObject has ImageSection
triggered 2 times for bootcd, but triggered 83 times for livecd.

Today I found out by chance, that we started to trigger it with the switch from CDFS to CDFS_NEW with
0.4.8-dev-164-g ec6b3ecbe4

We 'suffered' from that logspam for many years now and it did never help us in any way.
And during 0.4.15-dev'ing with the MM rewrite, the logging was entirely removed in the NTOSKRNL.
2022-01-27 20:16:40 +01:00
Joachim Henze b97a2ae1ca [0.4.13][NTOS:INBV] Fix screen flash and more (#2821)
- Fix screen flash (CORE-16786);
- Don't process rotating bar if not used.

cherry picked from commit 0.4.15-dev-287-g 319374eb71
2021-01-15 14:29:57 +01:00
jimtabor b784074c2f [0.4.13][WIN32SS][RTL] Fix regression CORE-16769 + BSOD CORE-13907 & CORE-14857
Thanks to Jim Tabor, Mark Jansen & Thomas Faber
By squashed backmerge of the following commits:
--------------
[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 and CORE-16769. KsStudio still needs retested.

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. See CORE-13019 and CORE-13907.

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

See CORE-16769.

cherry picked from commit 0.4.14-dev-1240-g
d8add40e89
2020-04-03 14:51:10 +02:00
Hervé Poussineau e70f523446 [0.4.13][NTOS:KD] Fix compilation with CMAKE_BUILD_TYPE=Release CORE-16777
Compilation was broken by commit 0.4.13-dev-253-g
f7ec84eea0

fix cherry picked from commit 0.4.14-dev-1270-g
38e53eea4f
2020-03-30 18:08:57 +02:00
Hermès Bélusca-Maïto 155f90f2e5 [0.4.13] Happy New Year 2020 to everyone!!
🎊 🎆 🍾 🥳

.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
   __,  ,__)            __,  ,__)       __, ,__)        ░░▄████▄░▄███▄░▄████▄░▄███▄░░
  (--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_   ░░▀▀░▄██░██░██░▀▀░▄██░██░██░░
    _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||    ░░░▄██▀░░██░██░░▄██▀░░██░██░░
   (        |  |  ,_|   (                (__|           ░░██████░▀███▀░██████░▀███▀░░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.

   ███████████████████████████████████████████████████████████████████████████████
   ██████████████████▓▒▒▒▒▒▒▓▓█████████████████████████▓▓▒▒▒▒▒▒▓██████████████████
   ███████████████▒▒▒▒▓▓███▓▓▓▒▒░▒▓▓█████████████▓▒▒░▒▒▓▓████▓▓▒▒▒▓███████████████
   █████████████▓░░░░░░░░░▒▒▓██████▓▒▒▒▓█████▓▒▒▒▓██████▓▒▒░░░░░░░░░▓█████████████
   ███████████▒▓░▒█████████▓▓▒░▒▓███▓▓▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▓▓████████▓▒░▓▓███████████
   ██████████▒▒▓░▓██████████████▓▓▓▓▓█████▓▓▓▓▓▓▓▓▒▒███████████████▓░▓░▒██████████
   █████████▓░▓█░▓██████████▓▒▒▒▒▓▓▓▓███████▓▓▓▓▓▓▓▓▓▒▒▓███████████▓░█▒░▓█████████
   █████████▓▒██▒▒████████▒▒░░░░▒▒▓▓▓███████▓▓▓▓▓▓▓▓▓▓▓▒▒░█████████▒▒█▓▒▒█████████
   █████████▓░██▓░▓█████▓▓▒▒░░░░▒▒▓▓▓▓████▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▒░░▓█████▓░▓█▓░▓█████████
   ██████████░▓██▒▒▓██▓▓▓▓▓▒▒▒▒▒▒▓▓▓▓██████▓▓▓▓▓▓▒▒▒▒▒▓▓▓▓▒▒░░███▓░▒██▒░██████████
   ██████████▒▒▓██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████▓▓▓▒▒▒▒▒▒▒▒▒▓▒▒▒▒░░▓█▒▒██▓░▓██████████
   ███████████▒▒███▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▒▒░▒▒▒▒▒▒▒▒▒░░░▒███▒▓███████████
   ████████████▒▒█▓▓▒░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░░▒▒░░░▒▒▒░░░▓██▒▒████████████
   █████████████▒▒▒▒▒▒░▒▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▒▒░░░░░░░░░░░░░▒▒▒▓▒▒█████████████
   ██████████████░░▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▒▒▒▒▒░░░░░░░░░▒░░▒░▒██████████████
   ██████████████▓▒░▒▒▒▒▒░░▒▒░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░▓███████████████
   ██████████████▓▒▓░░▒▒▒▒░░░░░░░░░░░░░░░░░▒▒▒▒▒▒░░░░░░░░░░▒░░░░░▓▒▓▓█████████████
   ███████████▓▒▓▓▓▒▒░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░▒▒▒█▒▒▓███████████
   ██████████▓▒▒█▓▓▒▒░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░▓▒▒▒▒██▒▒▓██████████
   █████████▓▒▓██▓▒▒▒▒░░▒░░░░░▒░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░▒▒▒▒▒▒▓███▓▒▓█████████
   ████████▓▒▓███▓▒▒▒▒░░░▒░░░░░░▒░░░░░░░░░░░░░░░░░░░▓▒▒▒▒░▒▓▒▒▓▓▒▒▓▒▓██▓▒▓████████
   ███████▓▒▓███▒▓▓▒▒▒░░░░░▒░░░░░░▒░░░░░░░░░░░░░░░▓▒▒▒▒░▒▓▒▓▓▓▓▒▒██▓▒▓██▓▒████████
   ███████▒▒██▓▒▓█▓▓▒▒░░░░░░░▒░░░░░░▒░░░░░░░░░░░▓▒▒▒▒░▒▓▒▒▒▓▓▓▒▒▓███▓▒███▒▓███████
   ██████▓▒▓██▒▒███▓▒▒▒░░░░░░░░▒▒░░░░░▒▒░░░░░░░░▒▒░░▒▓▓▓▓▒▒▒▒▒▒▓█████▒▒██▓░▓██████
   ██████▒▒██▒▒█████▓▒▒▒░░░░░░░░░▒░░░░░░░▒░░░░▒▒░░▒▓▒▒▒▒▒▒▒▒▒▒████████▒▒██▒▒██████
   ██████▒▓██░▓██████▓▓▒▒▒░░░░░░░░░░▒░░░░░░░▒░░░░▒▒▒▒▒▒▒▓▓▒▒██████████▒░██▒▒██████
   ██████▒▒▓▓▒█████████▓▓▒▒▒░░░░░░░░░░▒▒░░░░▒▒▒▓░░░▒▒▒▒▒▓▓████████████▓▒▓▓░▒██████
   ██████▓░▒▒▒███████████▓▓▒▒░░░░▒▒▒░▒░▒▒▒▒░░▒▒▒▒▒▓▒░░▒▒██████████████▓░▒▒▒███████
   ███████▓▒░░▒█████████▓▒▒░░▒▓▓▒▒▒░░░░▒▒▒▓▒▓▒░░▒▒▓▓██▓▓▒░▒▒▓█████████▒░░▒████████
   ██████████▒░░░░░░░▒▒▓▓█████▓▓▒░░▒▓██▓▓████████▒░▒▒▓██████▓▓▒▒░░░░░░░▒██████████
   ███████████▓▒▒▒▓▓████▓▓▒▒▒░▒▒█████████████████████▒▒░▒▒▓▓▓███▓▓▒▒▒▒████████████
   ████████████████▓▓▓▓▓▓███████████████████████████████████▓▓▓▓▓▓████████████████
   ███████████████████████████████████████████████████████████████████████████████
   ███████████████████████████████████████████████████████████████████████████████
   ██████████████████████████████████████████████████████████▓░░▓████████░░░▓█████
   ███▒░░░░▒▓███████████████████████████████████████▒█████▓▒▒▓██▓▒▒▓████▓░█▓░▓████
   ███▒█████░▒███▓▒▒▒▒▒▓████▓▒▒▒▒▒▓█▓███▓▒▒▒▒▒▒▓██▓▒░▒▒▓▒▓█████████▓▒██▓▒█████████
   ███▒█████░▒█▓▒▒█████▒▒██▒▒▓████▓░▒██▒▒▓████▓▒▓██▓░▓██▓███████████▓▓██▓░░░▒█████
   ███▒█▓░░▒▓█▓▒▒▓▒░░▒▓▒░▒▓▒███████▒▒██▒████████████░███▓███████████▓▓██████░▒████
   ███▒██░▓███▓▒▓█████████▓▒███████▒▒██▒████████████░███▒▓██████████▓████████░▓███
   ███▒███░▒▓██▓▒▒████▓▒▓██▓▒▒▓██▓▒░▒██▓▒▒▓███▓▒▓███░████▓▒▒█████▒▒▓███▓▒▓██░▓████
   ███▒████▓░▓████▒▒▒▒▒██████▓▒▒▒▒▓█▓████▓▒▒▒▒▓█████▒███████▓▒▒▒▒▓███████▒▒▒▓█████
   ███████████████████████████████████████████████████████████████████████████████

cherry picked from commit 0.4.14-dev-743-g
9ba5594599
2020-02-16 17:12:56 +01:00
Joachim Henze 928625ccfa [0.4.13][NTOSKRNL] Workaround CORE-16387 & CORE-16449
Both most likely was introduced by activating feature
MiWriteProtectSystemImage() once.
Imho this feature is not stable yet, therefore I disable
it for releases.
Confirmation of reporters will have to be collected after
the commit.

Both problems most likely got visible by 0.4.12-dev-386-g
65dbfc2868

Master remains affected for now.
If no fix will appear during 0.4.14-dev'ing, then I will
commit this to master as well in 3months.
2019-12-17 00:06:05 +01:00
Katayama Hirofumi MZ 3a1c14f9ba [0.4.13][NTOSKRNL][INBV] Fix IDB_SHUTDOWN_MSG position CORE-16342
Make "shutdown.bmp" (IDB_SHUTDOWN_MSG: 213x11px) horizontally centered.

This fixes a regression of 0.4.13-dev-961-g
238ea69ca0

Fix cherry picked from commit 0.4.14-dev-546-g
55aed4f8fa
2019-12-02 23:42:51 +01:00
Joachim Henze 2314b107e4 [0.4.13][NTOSKRNL] Restore section layout to fix BSOD regression CORE-14683
This version (after .rsrc) works different than the
proper version I used for 0.4.12 (after .reloc).

Inserting after .rsrc as actually not correct, but Thomas believes it can
be used as a temporary trick to avoid random memory corruption upon
relocations of the kernel, caused by ROSBE-154.

I follow his advice, although when judging from practical tests only:
as long as we limit this script to NTOSKRNL like I do for releases
there have no negative consequences been observed in real life yet
even with the proper version of 0.4.12.
Up to now those problems have only been observed when used for drivers
MODULE TYPE sdk/cmake/gcc.cmake as well, like
it was tried for a moment in master 0.4.13-dev-609-g
c4d8e2a6e9

Using for drivers immediately did lead to BSODs like CORE-16183 and therefore was
mitigated in master by total disabling of the scripts for both,
kernel and drivers in
0.4.13-dev-621-g
36e9a6f8dd

To allow installing DVDWritenow without BSOD,
we need the script at least for ntoskrnl!

Master remains affected by the BSOD until Thomas allows to commit there as well.
2019-11-30 14:10:17 +01:00
Joachim Henze 121db03936 [0.4.13] Revert 3 [NTOS:KE] commits to avoid regression CORE-16448
Symptom: stacklog via 'bt' command in gcc+kdbg regressed in certain cases.

This reverts the guilty commit 0.4.13-dev-514-g
3c8f19eb21.

But also reverts 2 tightly related follow-up commits
0.4.13-dev-515-g
04906f2abb
and
0.4.13-dev-516-g
4d5a2dd0f3

We revert only in RC, but master remains affected for now,
the developers aim to fix master by WIP PR#2003 later.

I considered following the bleeding-edge-development being
too risky here. Many unrelated changes in master since then.
2019-11-03 17:36:40 +01:00
Timo Kreuzer 09d3029dd8 [NTOS] Fix a regression in the PE loader CORE-11717
which caused images to be loaded up to MmHighestUserAddress,
thus overwriting the shared user page.

This is now fixed by using MM_HIGHEST_VAD_ADDRESS as the margin instead.
This commit allows again to load WIN32K.sys of Win2K3SP2
which regressed by SVN 67793 == git
3565260212

cherry picked from commit 0.4.14-dev-143-g
56da95671c
2019-10-27 02:19:51 +02:00
Hervé Poussineau fa70635521 [0.4.13] Revert "[NTOS:KDBG] Use CONTEXT instead of KTRAP_FRAME" CORE-16231
This reverts guilty commit 0.4.13-dev-254-g
e5bffe49da.

To repair step/next commands in GCC Kernel Debugger

https://reactos.org/testman/compare.php?ids=69388,69392 VBox on master
https://reactos.org/testman/compare.php?ids=69389,69393 KVM on master

cherry picked from commit 0.4.14-dev-56-g
7390376753
2019-10-19 00:55:31 +02:00
Serge Gautherie e413df4f4e [NTOS:MM] i386: Fix '_MI_NO_EXECUTE' typo
Addendum to 65dbfc2868.
2019-09-30 10:46:58 +03:00
Pierre Schweitzer 3b78ca210e
[NTOSKRNL] Simplify buffer definition in MiQueryMemorySectionName().
Also take into account the UNICODE_STRING structure while computing whole size
This is based on Thomas' patch.

CORE-12043
2019-09-29 14:16:44 +02:00
Pierre Schweitzer 96ee4509e5
[NTOSKRNL] Implement NtQuerySystemInformation(SystemLogicalProcessorInformation) 2019-09-27 20:36:59 +02:00
Thomas Faber 934484ea3e
[NTOS:PNP] When traversing the device tree, keep a reference to the current device. CORE-15874 2019-09-26 10:26:10 +02:00
Serge Gautherie 0339245859 [NTOS:KE] Fix 'Sert' typo, in a comment (#1929) 2019-09-23 01:13:07 +02:00
Timo Kreuzer 41250d1028 [NTOS:MM] Fix MmspCompareSegments
On x64 the previous implementation would only compare the upper 32 bits and ignore the lower 32 bits.
2019-09-01 14:15:07 +02:00
Eric Kohl 0b129da05c [NTOSKRNL] Fix indentation. No code changes! 2019-08-24 10:02:55 +02:00
Mark Jansen 1539fb1414
[NTOSKRNL] Demote some noisy dprints 2019-08-23 13:03:36 +02:00
Yaroslav Kibysh 238ea69ca0 [NTOS:INBV] Refactor boot screen code and resources (#1649)
* [NTOS:INBV] Move typedefs to the only single file where they are used.

* [NTOS:INBV] Refactor code & resources

Remove garbage

* [NTOS:INBV] Reduce fade time and remove wait for animation.
2019-08-20 01:52:25 +02:00
Pierre Schweitzer e12abf63c5
[NTOSKRNL] Handle symlink parsing when it's bound to a specific object 2019-08-19 10:45:50 +02:00
Serge Gautherie 87a625bd6c [NTOS:IO] iomgr.c: Add a missing '#if defined(KDBG)' 2019-08-17 17:36:49 +02:00
Serge Gautherie 66bf74d228 [NTOSKRNL] Move DPRINT1("Thread wants too much stack\n") around
To KiUserModeCallout() from MmGrowKernelStackEx().

As suggested by Thomas Faber:
"MmGrowKernelStackEx really shouldn't be DPRINT'ing."

CORE-14494
2019-08-15 18:18:59 +02:00
Timo Kreuzer de679e8f33 [NTOS:MM] MmSizeOfSystemCacheInPages is ULONG_PTR, not ULONG
Fixes failed assertion on x64.
2019-08-15 18:04:57 +02:00
Timo Kreuzer adcae016c5 [NTOS:KE:I386] Fix parameter description for KiSwapContext 2019-08-15 18:04:57 +02:00
Timo Kreuzer 98a8e8f862 [NTOS:IO] In IopSynchronousCall first check IrpStack->MajorFunction before checking minor
Minor function indices are not unique, they are subfunctions, so without first checking the major function, they are ambiguous.
2019-08-15 18:04:57 +02:00
Timo Kreuzer fffe4f6385 [NTOS:EX] Use InterlockedExchangeAdd64 instead of InterlockedCompareExchange64 loop in ExAllocateLocallyUniqueId 2019-08-15 18:04:57 +02:00
Timo Kreuzer e50873376d [NTOS:IO] Improve an alignment 2019-08-15 18:04:57 +02:00
Timo Kreuzer 7611cc2b12 [REACTOS] Fix SIZE_T related warnings 2019-08-15 14:20:00 +02:00
Andrew Boyarshin b607e0119f [NTOSKRNL][PS] Implement NtQueueApcThreadEx and use it in NtQueueApcThread
Actually rename NtQueueApcThread to NtQueueApcThreadEx and ignore one additional parameter for now.
2019-08-15 12:32:09 +02:00
Eric Kohl 4614c5b57c [NTOSKRNL] Implement SeRegisterLogonSessionTerminatedRoutine() and SeUnregisterLogonSessionTerminatedRoutine(). 2019-08-04 14:01:26 +02:00
Timo Kreuzer 3af7cb825f [NTOSKRNL] Replace overlapping strcopy with memmove
Fixes 4 GCC 8 warnings of the kind:
ntoskrnl/kdbg/kdb_cli.c:3015:21: error: 'strcpy' accessing 1 byte at offsets 0 and [0, 2147483647] may overlap 1 byte at offset 0 [-Werror=restrict]
                     strcpy(p2, p2 + j);
                     ^~~~~~~~~~~~~~~~~~
2019-07-20 13:56:18 +02:00
Hermès Bélusca-Maïto e2d6f61085
[NTOS:INBV] Fix the bitmaps' palette and recompress them in RLE. (#1649)
They don't need to have a zeroed-out palette now that we can
automatically reset it from within the code.

Co-authored-by: Yaroslav Kibysh <yanet.prod@gmail.com>
2019-07-14 22:23:52 +02:00
Hermès Bélusca-Maïto 64a53b304e
[NTOS:INBV] Express some coordinates in terms of screen size. (#1649) 2019-07-14 22:23:51 +02:00
Yaroslav Kibysh dc2eb409c1
[NTOS:INBV] Implement BitBltPalette() and BitBltAligned() and use them for aligning bitmaps. (#1649)
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-07-14 22:23:50 +02:00
Hermès Bélusca-Maïto 3625238ecb
[NTOS:MM] Add a MmChangeKernelResourceSectionProtection() helper. (#1649)
This allows setting the memory protection of the kernel's resource
section as will. MmMakeKernelResourceSectionWritable() is re-implemented
around this helper.
2019-07-14 22:23:49 +02:00
Hermès Bélusca-Maïto a3e22b99a4
[NTOS:INBV] Classify the bitmap resources. (#1649)
See "How to change Windows XP boot logo" at
http://www.reversing.be/article.php?story=20061209171938444
as well as the "Boot Editor for WinXP" program for more details.
2019-07-14 22:23:48 +02:00
Serge Gautherie ccf8bff3ec [NTOS:MM] Fix MmGetFileNameForAddress() callers. (#1723)
MmGetFileNameForAddress() calls RtlCreateUnicodeString().
This also fixes a leak in MiQueryMemorySectionName().
2019-07-14 00:32:23 +02:00
Thomas Faber 2d419e90f9
[NTOS:PNP] Reduce the default buffer size in EnumerateDevices. CORE-15882 2019-07-10 10:58:47 +02:00
Thomas Faber b8e091a44c
[NTOS:PNP] Handle arbitrary subkey name lengths in EnumerateDevices. CORE-15882
This also makes it necessary to fix a bug in the previous code:
ZwEnumerateKey will not account for space for a null terminator, so to
ensure we have space, we must allocate the additional WCHAR, but not
include it in the buffer size passed to the function.
2019-07-10 10:58:45 +02:00
Thomas Faber 36e9a6f8dd
[CMAKE] Disable INIT section ld scripts for now. CORE-16183 ROSBE-154 2019-07-07 16:06:43 +02:00
Thomas Faber c4d8e2a6e9
[CMAKE] Ensure the INIT section is placed at the end of a module. CORE-14683
For MSVC, marking the section as discardable will do this automatically.
For GCC, we use a linker script that places it after the .reloc section
(which should be the last "real" section, check ld --verbose output for the
default linker script).

This fixes what seems to be a regression from r55835 (!).
2019-07-07 08:18:10 +02:00
Serge Gautherie 6ba611f39e [NTOS:MM] Fix MmSizeOfSystemCacheInPages value on AMD64
And add 'ASSERT(MmSystemCacheEnd == ...);'.

Addendum to d56a249089.
CORE-14259
2019-07-06 09:55:38 +02:00
Serge Gautherie a0d2170729 [NTOS:CC] CcWriteVirtualAddress(): Do not round 'Size'
Revert 'Properly align VACB writes' part of 2a80ae2bb6.

CORE-15384 CORE-16018
2019-07-01 21:30:25 +02:00
Pierre Schweitzer 4fd223729b [NTOSKRNL] When looping again in ObpLookupEntryDirectory, properly init root entry
This fixes looking in global directory for DOS drives that are globally mounted
(such as C: drive)

CORE-16114
2019-06-30 23:07:54 +02:00