Commit graph

82264 commits

Author SHA1 Message Date
Timo Kreuzer 45f75d5d32 [NTOS:KE/x64] Handle user faults in KiGeneralProtectionFaultHandler 2022-07-14 18:35:28 +02:00
Timo Kreuzer f659ac5201 [NTDLL_APITEST] Add test for some user mode exceptions 2022-07-14 18:35:28 +02:00
George Bișoc 54a00aa8eb
[CMLIB][NTOS:CM] Deduplicate other common definitions between CMLIB and the NTOS CM
Addendum to commit 8c2454e (r70605). Credits and courtesy go to Hermès BÉLUSCA - MAÏTO.

CORE-10802 CORE-10793
2022-07-10 14:35:53 +02:00
Tuur Martens 10126e7710 [NTOS:MM] Fix VADs being inserted even though the quota would exceed
Since we were charging the pool quota after the VAD insertion,
if the quota charge failed, the VAD would still have been inserted.
This commit attempts to resolve this issue by charging quota
before inserting the VAD thus allowing the quota charge to fail early.

Addendum to 884356a0. CORE-18028
2022-07-06 18:48:32 +02:00
Timo Kreuzer f606b36cff [NTOSKRNL] Fix a bug in MiDeleteVirtualAddresses
When a PDE gets empty, we skip the address to the next PDE boundary, which might introduce an AddressGap, which wasn't handled before.
2022-07-05 19:29:05 +02:00
Eric Kohl 57c84dd658 [DISKPART] Fix magic values in CreateLogicalPartition() and CreatePrimaryPartition() 2022-07-03 14:10:02 +02:00
Serge Gautherie b671b1cf8f
[WIN32K:ENG] EngAlphaBlend(): Release EnterLeaveSource on error (#4560)
Part of CORE-11156

Co-authored-by: Carlo Bramini <carlo.bramix@libero.it>
2022-07-02 12:30:03 +03:00
Thamatip Chitpong 8a3db976a2
[EXPLORER] Fix taskbar icon display problem (#4538)
- Use SMTO_NOTIMEOUTIFNOTHUNG to get the icon with least timeout.
- Replace GCL_* consts with GCLP_* since we're using GetClassLongPtr.

Now the icon is correctly displayed for control panel applets.

CORE-18137
2022-06-30 16:10:47 +03:00
George Bișoc 4471ee4dfa
[NTOS:SE] Properly handle dynamic counters in token
On current master, ReactOS faces these problems:

- ObCreateObject charges both paged and non paged pool a size of TOKEN structure, not the actual dynamic contents of WHAT IS inside a token. For paged pool charge the size is that of the dynamic area (primary group + default DACL if any). This is basically what DynamicCharged is for.
For the non paged pool charge, the actual charge is that of TOKEN structure upon creation. On duplication and filtering however, the paged pool charge size is that of the inherited dynamic charged space from an existing token whereas the non paged pool size is that of the calculated token body
length for the new duplicated/filtered token. On current master, we're literally cheating the kernel by charging the wrong amount of quota not taking into account the dynamic contents which they come from UM.

- Both DynamicCharged and DynamicAvailable are not fully handled (DynamicAvailable is pretty much poorly handled with some cases still to be taking into account). DynamicCharged is barely handled, like at all.

- As a result of these two points above, NtSetInformationToken doesn't check when the caller wants to set up a new default token DACL or primary group if the newly DACL or the said group exceeds the dynamic charged boundary. So what happens is that I'm going to act like a smug bastard fat politician and whack
the primary group and DACL of an token however I want to, because why in the hell not? In reality no, the kernel has to punish whoever attempts to do that, although we currently don't.

- The dynamic area (aka DynamicPart) only picks up the default DACL but not the primary group as well. Generally the dynamic part is composed of primary group and default DACL, if provided.

In addition to that, we aren't returning the dynamic charged and available area in token statistics. SepComputeAvailableDynamicSpace helper is here to accommodate that. Apparently Windows is calculating the dynamic available area rather than just querying the DynamicAvailable field directly from the token.
My theory regarding this is like the following: on Windows both TokenDefaultDacl and TokenPrimaryGroup classes are barely used by the system components during startup (LSASS provides both a DACL and primary group when calling NtCreateToken anyway). In fact DynamicAvailable is 0 during token creation, duplication and filtering when inspecting a token with WinDBG. So
if an application wants to query token statistics that application will face a dynamic available space of 0.
2022-06-29 10:06:37 +02:00
Stanislav Motylkov 846c9aa1fd
[TRACERT] Fix displaying hop address on last ping timeout
- Update source file header per coding rules
- Store intermediate responses to display the hop address
- Add separate function to get response stats from buffer
- Add Cleanup label to free resources in a single place
- Move local variables around to allow Cleanup goto

CORE-18232
2022-06-28 23:42:09 +03:00
Stanislav Motylkov 35a816a24e
[FREELDR][SDK] Sync copyright years with our banner and boot logo
Addendum to 831e2dea. CORE-18191
2022-06-27 21:42:01 +03:00
Stanislav Motylkov 831e2dea3d
[FREELDR][SDK] Use "ReactOS Project" for consistency
CORE-18191
2022-06-27 21:38:14 +03:00
Stanislav Motylkov bbccad0ed6
[INF] Set manufacturer as ReactOS Project for consistency
Also make it non-localizable. CORE-18191
2022-06-27 17:00:18 +03:00
Gary Sims 6881d8c624
[REACTOS] Remove references to ReactOS Foundation (#4557)
See https://reactos.org/wiki/ReactOS_Foundation for more information.

CORE-18191
2022-06-27 16:00:20 +03:00
Stanislav Motylkov e1c89ce397
[PROCESSR] Fix INF file formatting only 2022-06-27 15:40:50 +03:00
Stanislav Motylkov c24e09401b
[CDMAKE] Remove module
We've been using mkisofs for 5 years now and are not looking back.
- Colin Finck
2022-06-27 15:14:03 +03:00
Timo Kreuzer ba0d16f3b3 [CRT] Add missing OP_* constants in fpieee.h 2022-06-26 23:08:14 +02:00
Timo Kreuzer b7c6170a5f [CRT] Add emmintrin.h
Implementations are taken from clang.
2022-06-26 19:59:41 +02:00
George Bișoc 5da5e644bb
[NTOS:OB] Include the security descriptor charge when charging the paged pool quota of an object
On ObpChargeQuotaForObject function, the kernel will either charge the default object type charges or the specified information charges obtained from ObCreateObject API call. What happens is that if a paged pool charge is specified on ObCreateObject call the kernel will charge that
but when an object is about to be de-allocated, the amount of quota to return back to the system is the amounting of the paged pool charge specified previously by the ObCreateObject call plus the amounting of the security descriptor charge (see oblife.c / line 98).

This will result in a fatal crash with a bugcheck of QUOTA_UNDERFLOW because we are returning quota with bits of it that was never charged and that's SecurityDescriptorCharge. A QUOTA_UNDERFLOW bugcheck occurs in two following scenarios:

-- When installing Virtualbox Guest Additions and prompting the installer to reboot the system for you
-- When logging off and on back to the system and then you restart the system normally

This bug has been discovered whilst working on #4555 PR.
2022-06-26 19:47:02 +02:00
Timo Kreuzer b85afdfd25 [CRT] Implement portable + amd64 asm version of fabs/fabsf
Note: older versions of ML64 are broken and don't understand the register form of movq.
See https://stackoverflow.com/questions/24789339/move-quadword-between-xmm-and-general-purpose-register-in-ml64
2022-06-26 19:13:47 +02:00
Timo Kreuzer 8a67170616 [CRT_APITEST] Implement tests for fabs/fabsf 2022-06-26 19:13:47 +02:00
Timo Kreuzer 96b847fd04 [NTDLL_APITEST] Fix RtlGetNtProductType test 2022-06-26 16:09:52 +02:00
Timo Kreuzer 47842d7847 [NTDLL_APITEST] Check whether changing the product type in the registry has an effect on RtlGetNtProductType 2022-06-25 22:57:18 +02:00
Timo Kreuzer 8521f6d7b5 [RTL] Implement dynamic function tables for x64 2022-06-25 21:45:47 +02:00
Serge Gautherie ef1311b7a4
[IP] AddrCountPrefixBits(): Fix loop condition (#4556)
Properly handle BitTest reaching 0.

CORE-18225
2022-06-25 17:14:03 +02:00
Eric Kohl d4a398fb13 [DISKPART] Support quoted command options in script files 2022-06-25 15:20:40 +02:00
Thamatip Chitpong 3a72a52ce8
[HHCTRL.OCX] Don't break WineSync. Addendum to 65d7fb1. (#4554)
Also minor code formatting for HH_LoadString.
2022-06-21 15:48:54 +03:00
Stanislav Motylkov 994e2f289e
[DESK] Pass the list of all display modes to extensions
Also implement mode switching from adapter advanced settings.
2022-06-20 14:38:03 +03:00
Stanislav Motylkov fced1c1192
[DESKADP][DESKMON] Notify property sheet that DWLP_MSGRESULT is set
When FALSE is returned, Apply button ignores validation result
and becomes disabled after clicking as if settings were applied.
Fix it by setting the return value to TRUE.

See https://docs.microsoft.com/en-us/windows/win32/controls/psn-apply
2022-06-20 02:14:02 +03:00
Jose Carlos Jesus 568383c9b9
[REGEDIT] Fix issue at Find registry key (#4341)
- If we dont select a item as a starting point to search from, we need to set
  pszValueName to the first value name in current subkey.

- Check pszSubKey length before calling RegFindRecurse.

- Set focus to subkey when we search for it.
2022-06-19 21:57:30 +02:00
Thamatip Chitpong 65d7fb1a82
[HHCTRL.OCX] Add help viewer window icon and default title (#4541) 2022-06-19 21:22:28 +02:00
Thamatip Chitpong a50d309c48
[TASKMGR] Process page: Fix DevicePathToDosPath (#4537)
- Fix DevicePathToDosPath, don't use the same in-out buffer.
- Also simplify functions related to 59dcec1

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2022-06-19 20:52:06 +02:00
George Bișoc 0c569e1ff3
[NTDLL_APITEST] NtQueryInformationToken: write tests for TokenGroupsAndPrivileges 2022-06-19 17:22:04 +02:00
George Bișoc 9d2de519b2
[NTOS:SE] NtQueryInformationToken: implement TokenGroupsAndPrivileges
TokenGroupsAndPrivileges is the younger sister of two TokenGroups and TokenPrivileges classes. In its purpose there's no huge substantial differences apart that this class comes with its own structure, TOKEN_GROUPS_AND_PRIVILEGES, and that this structure comes with extra information.
2022-06-19 17:22:04 +02:00
Eric Kohl f79ec61bdc [DISKPART] Print proper file system information for the FILESYSTEMS command 2022-06-19 16:12:10 +02:00
Doug Lyons b6d1d1fd7d Modified WINESYNC.txt to show individual tests for msxml3 and update for schema 2022-06-19 15:48:42 +02:00
Doug Lyons 967db49174 Fix winetests/msxml3/schema.c crashes and sync to Wine-6.14 2022-06-19 15:48:42 +02:00
Thomas Csovcsity 1a6f523e01 [WINESYNC]: reg is now in sync with wine-staging wine-6.23
Used winesync.py script, commits which needed obious adjustments have explicit
note in commit message, that it is manually adjusted. Internationalization is
skipped while automated sync and done in last manual step.

Additonal manual adjustments to compile in ros are in this commit:
- wcsupr -> _wcsupr
- only 3 arguments for swprintf, instead of 4 in wine
- disable tests for "/reg:32" and "/reg:64", because they fail on w2k3

Manually addjusted base/applications/cmdutils/reg/lang/zh-CN.rc while rebase to
actuall master (4a66cbb224) on 19.06.2022
2022-06-19 14:13:00 +02:00
winesync 958d4a884a [WINESYNC] reg: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 942f9f71575d4a53ae032360e03f1297be1319f7 by Alexandre Julliard <julliard@winehq.org>
2022-06-19 13:06:39 +02:00
winesync 29992c17f1 [WINESYNC] reg: Support use of registry views in the 'copy' operation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50962
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 04d52eb83fa5c37cfe1100f435e36c2f78918338 by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:39 +02:00
winesync be726bd769 [WINESYNC] reg/tests: Test use of registry views when copying registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id d92f26ed1264ec80f97c0a45a59b986f0b9cae38 by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:39 +02:00
winesync 35b9e2d380 [WINESYNC] reg: Support use of registry views when exporting registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fcf79426147adf0d9f1d80b0cf24d0b6abd8bf59 by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:39 +02:00
winesync bac2e89b05 [WINESYNC] reg/tests: Use correct file and line arguments with delete_file().
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 0b5ba1d0be04f7c6bc0e53e9a28984cf2941b4bc by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:39 +02:00
winesync 54f7d655e4 [WINESYNC] reg/tests: Split 'export' syntax tests into a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 959ea6677ea0571c5042a5ec5bec33fb5a5f1dc6 by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:39 +02:00
winesync 73ac2fc096 [WINESYNC] reg/tests: Test use of registry views when exporting registry data.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fee692178cebd33220027ad6038f6acd8185b77f by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:38 +02:00
winesync 4e25c2d09b [WINESYNC] reg/tests: Add registry view syntax tests for the 'import' operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 49cde0995827b24aa9c1ef1b6a0372797f4166e0 by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:38 +02:00
winesync 9f70f13ee7 [WINESYNC] reg: Support use of registry views in the 'import' command.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 0c71a9879d894e4b82de2909c9c44e36c0bbb35e by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:38 +02:00
winesync bed77337e8 [WINESYNC] reg/tests: Test use of registry views when importing keys and values.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f2ce614d85091500c071f9b7234f17d5d6418727 by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:38 +02:00
winesync 7beb1390e2 [WINESYNC] reg/tests: Split 'import' syntax tests into a separate function.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id e3d14e66f71193faeb532c28b5b5565d5ea9b12f by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:38 +02:00
winesync c69933739b [WINESYNC] reg: Support use of registry views in the 'query' operation.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8eef4a873513cca9ffea61fb225fa8a9c8ac784d by Hugh McMaster <hugh.mcmaster@outlook.com>
2022-06-19 13:06:38 +02:00