Commit graph

82017 commits

Author SHA1 Message Date
Jose Carlos Jesus d432436fed
[TRANSLATION] Improve Portuguese (pt-PT) translation (#4522)
- [REGEDIT] [INTL] [DEVMGR] Improve pt-PT translation
- [W32TIME] Add pt-PT translation
- [BOOTDATA] Add pt-PT to hivesys.inf
2022-05-31 02:04:41 +03:00
Stanislav Motylkov 26b88af642
[WIN32SS] Add missing code parts for monitor handling
- [VIDEOPRT] Add stub for IOCTL_VIDEO_ENUM_MONITOR_PDO.

- [WIN32SS:ENG] Add missing checks and comments.

- [WIN32SS:NTUSER] Add missing monitor handling and comments.

Addendum to 31827c43. CORE-18197 CORE-11715
2022-05-30 15:28:44 +03:00
Stanislav Motylkov 31827c43b6
[WIN32SS] EnumDisplayDevices: Fill DeviceID field properly
- [VIDEOPRT] Return the real PhysicalDeviceObject in Win32k callbacks.

- [WIN32SS:ENG] Pass PhysDeviceObject into the GraphicsDevice structure
  and rename the destination field accordingly.

- [WIN32SS:NTUSER] Request hardware identifiers from device PDO and
  fill DISPLAY_DEVICE's DeviceID field with the first identifier.

Now it's correctly passed to the usermode, and Desktop Propertes applet
can open the video adapter device properties.

Thanks to Hervé Poussineau for the help.

CORE-18197 CORE-11715
2022-05-30 15:28:21 +03:00
Hermès Bélusca-Maïto ee613a18eb
[DISKPART] Fix build. Simplify PrintMessageString(). 2022-05-30 02:41:31 +02:00
Eric Kohl c287c08b27 [DISKPART] Convert command help to messages and fix some texts 2022-05-30 01:09:08 +02:00
Stanislav Motylkov 488643583d
[USETUP] Fix several typos in Russian (ru-RU) translation
CORE-18203
2022-05-29 23:46:19 +03:00
George Bișoc 9a2c62b544
[NTOS:SE] Reorganize the security manager component
The current state of Security manager's code is kind of a mess. Mainly, there's code scattered around places where they shouldn't belong and token implementation (token.c) is already of a bloat in itself as it is. The file has over 6k lines and it's subject to grow exponentially with improvements, features, whatever that is.

With that being said, the token implementation code in the kernel will be split accordingly and rest of the code moved to appropriate places. The new layout will look as follows (excluding the already existing files):

- client.c (Client security implementation code)
- objtype.c (Object type list implementation code -- more code related to object types will be put here when I'm going to implement object type access checks in the future)
- subject.c (Subject security context support)

The token implementation in the kernel will be split in 4 distinct files as shown:

- token.c (Base token support routines)
- tokenlif.c (Life management of a token object -- that is Duplication, Creation and Filtering)
- tokencls.c (Token Query/Set Information Classes support)
- tokenadj.c (Token privileges/groups adjusting support)

In addition to that, tidy up the internal header and reorganize it as well.
2022-05-29 20:22:19 +02:00
Mark Jansen 96eacfc352
[GITHUB] Add workflow to close stale PR's 2022-05-29 20:10:31 +02:00
Eric Kohl 54efd75889 [DISKPART] Improve DETAIL commands 2022-05-29 17:32:34 +02:00
Tuur Martens cc99b9d96e [NTOS:MM] Fix MiInsertSharedUserPageVad preventing boot on x64
Fix MiInsertSharedUserPageVad to not charge the system process pool quota.
Even though PsChargeProcessNonPagedPoolQuota itself checks if the process specified is the system process, this doesn't work here as we're too early into boot for the kernel to know what the system process is.
2022-05-29 13:28:27 +02:00
Eric Kohl 96d137a559 [DISKPART] Silence a debug message 2022-05-29 13:07:53 +02:00
Eric Kohl 5a1c00c117 [DISKPART] Improve the LIST VOLUME command 2022-05-29 12:41:42 +02:00
Eric Kohl 863400813a [DISKPART] Implement CREATE PARTITION LOGICAL 2022-05-29 10:05:51 +02:00
Eric Kohl 52bbf6078e [DISKPART] Implement CREATE PARTITION EXTENDED and warn about unimplemented options 2022-05-28 13:17:45 +02:00
Eric Kohl 723947eab1 [DISKPART] Implement CREATE PARTITION PRIMARY and DELETE PARTITION 2022-05-28 11:33:29 +02:00
Eric Kohl 166b88f95c [DISKPART] Fix crashes in the interpreter 2022-05-28 09:54:46 +02:00
Stanislav Motylkov 17e0e4428c
[PC98VID] Fix video driver settings
- Store settings in non hardware-profile registry key.
- Rename driver file to vgapnp.sys to keep in sync with VBE.
- This makes PC-98 video driver working again.

Addendum to 073a1ea3 and f03750de. CORE-18201 CORE-17977
2022-05-27 18:56:13 +03:00
Stanislav Motylkov 5471363801
[XBOXVMP] Fix video driver settings
- Store settings in non hardware-profile registry key.
- This makes Xbox video driver working again.

Addendum to f03750de. CORE-16216
2022-05-27 18:54:20 +03:00
Victor Perevertkin a5a6101ca0
[CMAKE] Fix buildbot builders 2022-05-27 01:48:52 +03:00
Victor Perevertkin 447ef2aa4a
[CMAKE] Do not use USE_CLANG_CL variable in CMake scripts 2022-05-27 01:37:37 +03:00
Victor Perevertkin f155b9377f
[CMAKE] Elimitate the use of GCC and CLANG variables 2022-05-27 01:37:34 +03:00
Dmitry Borisov 6f4be52a1c
[HALX86] Print the correct size of the BAR in HalpDebugPciDumpBus()
Reference: https://wiki.osdev.org/PCI#Address_and_size_of_the_BAR

To determine the amount of address space needed by a PCI device,
you must save the original value of the BAR, write a value
of all 1's to the register, then read it back.

Note: 64-bit BARs are not supported yet.
2022-05-26 16:40:17 +03:00
Mark Jansen 11e0ed3c2b
[ASM x64] Fix UNIMPLEMENTED macro for MSVC 2022-05-25 23:16:04 +02:00
Mark Jansen 8ea46b53e3
[KERNEL32] Fix reading SafeDllSearchMode 2022-05-25 22:43:47 +02:00
Stanislav Motylkov 8b55d712a7
[GITHUB] Add MSVC ARM64 builder
This builds only some applications for now.

CORE-17518
2022-05-25 21:10:17 +03:00
Justin Miller 4363e74ddc
[REACTOS] Finally get some ARM64 applications building (#4517)
- Add some missing ARM64 exports to ntdll, kernel32 and user32
- Create mmtypes header file based on WoA debug symbols
- Get the remaining headers in order, so we can build ARM64 apps
- Adjust subsystem version for binaries so they can run on WoA host
- Get calc, notepad and more base apps to build for ARM64 platform

CORE-17518

Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-25 17:06:32 +03:00
William Kent 3464df8c28
[CMAKE] Search the PATH for the compilers and cache the results
We are deliberately using a macro here instead of REQUIRED parameter
because it is available only in CMake 3.18+, so it won't work with
CMake version that is being shipped with RosBE.

On my dev box the RosBE tools are only in the PATH when needed.
Since my IDE inherits the PATH from the system and not from my shell,
I needed to be able to run configure.sh with the tools in my PATH
and then be able to successfully reconfigure when building
from a "regular" command prompt.
2022-05-25 16:34:16 +03:00
William Kent 6c38b251cf
[DBGHELP] Fix rsym runtime crash on ARM64 host
CORE-17518
2022-05-25 16:34:16 +03:00
William Kent 21bd607758
[MKISOFS] Add ARM64 processor support
Also changed a "shouldn't-ever-happen" deliberate syntax error into a proper #error.

CORE-17518
2022-05-25 16:34:11 +03:00
George Bișoc b922b6d7fc
[NTOS:KE] Write a basic kernel mode test for FPU Save/Restore mechanism 2022-05-24 18:39:46 +02:00
George Bișoc 064a35dc67
[NTOS:KE] Fully implement FPU Save/Restore mechanism
This commit fully implements the inner logic of KeSaveFloatingPointState and KeRestoreFloatingPointState routines. On ReactOS we're currently simply doing a FNSAVE operation whereas on Windows it is a lot more than that.

On Windows Server 2003 the logic more or less goes like this. In order to save the FPU state the NPX state of the current thread has to be checked first, that is, if NPX is loaded and currently charged for the current thread then the system will acquire the NPX registers actively present. From that point it performs either a FNSAVE or FXSAVE
if FX is actually supported. Otherwise the control word and MXCsr registers are obtained.

FXSAVE/FNSAVE operation is done solely if the FX save area is held up in a pool allocation. Pool allocation occurs if it's been found out that the NPX IRQL of the thread is not the same as the current thread which from where it determines if the interrupt level is APC then allocate some pool memory and hold the save area there, otherwise
the save area in question is grabbed from the current processor control region. If NPX is not loaded for the current thread then the FPU state is obtained from the NPX frame.

In our case we'll be doing something way simpler. Only do a FXSAVE/FNSAVE directly of the FPU state registers, in this way we are simplifying the code and the actual logic of Save/Restore mechanism.
2022-05-24 18:39:45 +02:00
George Bișoc c020966091
[NTOS:KE] Implement the internal FPU state context structure
This is needed to store FPU state information when saving or restoring the floating point state of a system due to a call to KeSaveFloatingPointState or KeRestoreFloatingPointState.
2022-05-24 18:39:45 +02:00
George Bișoc d88cd0eefc
[NTOS:KE] Move related FPU instrunctions to internal intrinsic file 2022-05-24 18:39:45 +02:00
George Bișoc 657bc083dc
[NTOSKRNL] Add FPU pool tags 2022-05-24 18:39:45 +02:00
George Bișoc 66c1bb7eab
[MC] Add INVALID_FLOATING_POINT_STATE bugcheck code
This kind of code will be used for FPU Save/Restore related code.
2022-05-24 18:39:30 +02:00
Wilson Simanjuntak 1f2d450599
[TRANSLATION] Improve Indonesian (id-ID) translation [part 1] (#4500)
[CALC] [DRWTSN32] [DXDIAG] Add Indonesian translation
[REACTOS] [USETUP] [EXPLORER] Improve Indonesian translation

Signed-off-by: Wilson Simanjuntak <wilsontulus5@gmail.com>
Reviewed-by: Mas Ahmad Muhammad <m.charly81@gmail.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-24 19:14:41 +03:00
Thamatip Chitpong 1aa95f3897
[EXPLORER] Implement CDesktopThread::Destroy (#4371)
Now Explorer exits properly without using ExitProcess hack.

Signed-off-by: Thamatip Chitpong <tangaming123456@outlook.com>
Reviewed-by: Mark Jansen <mark.jansen@reactos.org>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-24 14:58:24 +03:00
Marcus Boillat 4900dd3d87
[RAPPS] Improve localized display of installation date (#4498)
Parse InstallDate registry key in "YYYYMMDD" format. CORE-17422

Signed-off-by: Marcus Boillat <marcus.boillat@gmail.com>
Reviewed-by: Mark Jansen <mark.jansen@reactos.org>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-24 12:20:52 +03:00
Victor Perevertkin 505ac6565a
[NTOS:PNP] Misc IoInvalidateDeviceState fixes
- Add a check for correct PDO before doing anything
- Process the request only for started devices
- Send the request synchronously during the start sequence

This makes Windows' i8042prt.sys work on ReactOS.
Addendum to cf0bc1c132
2022-05-24 05:04:11 +03:00
Stanislav Motylkov 17154c94c1
[DESKMON] Implement GetMonitorDevInstID function
- Now our deskmon.cpl extension works on Windows XP and 2003
  and does open the monitor device properties correctly.
- Also "Properties" button should be disabled
  when no Device Instance ID found for the monitor.
2022-05-23 23:54:41 +03:00
Stanislav Motylkov fcba0968be
[DESK] Add debug prints to pCDevSettings_GetDeviceInstanceId
Addendum to 3900cf88.
2022-05-23 23:50:47 +03:00
Hermès Bélusca-Maïto 985468d08a
[NTOS:SE] Replace a bunch of RtlCopyLuid() calls into direct assignations (#4523)
Nowadays' compilers support such direct structure assignations,
and our existing codebase already uses that in other places.
2022-05-23 19:30:37 +02:00
Hermès Bélusca-Maïto 487d8601f9
[NTOS:SE] SepPerformTokenFiltering(): Fix corruption of DynamicPart (#4523)
The problem is that EndMem is changed to point to the DynamicPart of
the token, but the code after that expects it to still point into the
VariablePart instead.

Problem fixed by moving the insertion of RestrictedSids much sooner
(where the original ones are also being copied).
2022-05-23 19:30:36 +02:00
Hermès Bélusca-Maïto 9676188543
[NTOS:SE] NtAdjustGroupsToken(): Avoid double-free on ObReferenceObjectByHandle failure path (#4523) 2022-05-23 19:30:36 +02:00
Hermès Bélusca-Maïto 3370652dfc
[NTOS:SE] Fix locking in SepDuplicateToken() and SepPerformTokenFiltering() (#4523)
Shared locking must be used on the source token as it is accessed for
reading only. This fixes in particular the kmtest SeTokenFiltering that
would hang otherwise on a (wrong) exclusive locking.

- SepPerformTokenFiltering(): Always shared-lock the source token.
  Its callers (NtFilterToken and SeFilterToken) just need to sanitize and
  put the parameters in correct form before calling this helper function.

- Sync comments in NtFilterToken() with SeFilterToken().
2022-05-23 19:30:35 +02:00
Hermès Bélusca-Maïto b33911b93d
[NTOS:SE] SepPerformTokenFiltering(): Remove useless SEH handling (#4523)
This function is either called inter-kernel (in which case, all
parameters must be valid, and if not, we have to bugcheck), or, it
is called with **captured** parameters (from NtFilterToken) and those
latter ones are now expected to be valid and reside in kernel-mode.
Finally, data copied between token structures reside in kernel-mode
only and again are expected to be valid (if not, we bugcheck).
2022-05-23 19:30:34 +02:00
Hermès Bélusca-Maïto 389a2da7ff
[NTOS:SE] SepCaptureAcl(): Add missing validation of the captured ACL (#4523)
- The ACL is however not validated when the function is called within
  kernel mode and no capture is actually being done.

- Simplify aspects of the function (returning early when possible).
2022-05-23 19:30:34 +02:00
Hermès Bélusca-Maïto a0bcf90f35
[NTOS:SE] SeValidSecurityDescriptor(): Add missing validation aspects (#4523)
- Add extra bounds checks.
- Add missing RtlValidAcl() calls for verifying the DACL and SACL.
2022-05-23 19:30:33 +02:00
Hermès Bélusca-Maïto d21895e6ef
[WIN32K:NTUSER] Only call IntFreeSecurityBuffer() when needed, don't free NULL buffers.
Addendum to 878c2f44.
2022-05-23 19:30:13 +02:00
Stanislav Motylkov 3900cf88b3
[DESK] Implement pCDevSettings_GetDeviceInstanceId properly
- CM_Locate_DevNodeW expects a Device Instance ID as second argument,
  so it cannot be used for converting a Hardware ID.
- Use SetupAPI functions here instead, as documented in:
  https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumdisplaydevicesw
- Now our desk.cpl passes correct identifier to CPL extensions,
  such as deskadp and deskmon, so clicking on "Properties" in the
  advanced display properties now works in Windows XP.
- Also fix copypasta in DisplayAdvancedSettings that affected applet
  built with MSVC - deskadp extension was loaded twice.
- Also fix magic flag value for EDD_GET_DEVICE_INTERFACE_NAME.
2022-05-23 19:04:47 +03:00