reactos.git
3 years ago[HALX86] Drop hacks in HalpAddDevice to work around PnP synchronization bugs
Victor Perevertkin [Sun, 8 Nov 2020 22:28:50 +0000 (01:28 +0300)]
[HALX86] Drop hacks in HalpAddDevice to work around PnP synchronization bugs

Our PnP manager handles OS boot in a synchronous manner thus we don't
need it anymore.
This effectively reverts f23e722d974e843aff101 and 4a9fcb6

CORE-5686

3 years ago[GITHUB] Enable amd64 artefacts and other minor changes
Victor Perevertkin [Sun, 8 Nov 2020 21:08:18 +0000 (00:08 +0300)]
[GITHUB] Enable amd64 artefacts and other minor changes

- Enable artefacts upload for amd64 builds
- Use environment files instead of ::set-env due to security issue
- Upgrade upload-artifact and cache packages to v2

3 years ago[MOUNTMGR] Fix ReparseFile concatenation in OnlineMountedVolumes
Victor Perevertkin [Sun, 8 Nov 2020 20:32:25 +0000 (23:32 +0300)]
[MOUNTMGR] Fix ReparseFile concatenation in OnlineMountedVolumes

- ReparseFile was concatenated with itself, instead of ReparseIndex
- Meanwhile, use RtlAppendUnicodeStringToString for concatenating
  strings instead of raw memory operations

3 years ago[NTOS:MM] Handle PXE/PPE gaps in MiDeleteVirtualAddresses
Timo Kreuzer [Fri, 3 Jan 2020 09:59:43 +0000 (10:59 +0100)]
[NTOS:MM] Handle PXE/PPE gaps in MiDeleteVirtualAddresses

3 years ago[HAL:X64] Fix/improve the BIOS interface
Timo Kreuzer [Sun, 9 Feb 2020 21:19:54 +0000 (22:19 +0100)]
[HAL:X64] Fix/improve the BIOS interface

* Call HalInitializeBios both in phase 0 and 1
* In phase 0 allocate some physical memory, instead of using arbitrary hardcoded pages, that then end up as page tables and get filled with VESA tables

3 years ago[CMAKE] Add architecture to our build string
Timo Kreuzer [Fri, 9 Mar 2018 20:31:15 +0000 (21:31 +0100)]
[CMAKE] Add architecture to our build string

This introduces a new CMake variable WINARCH, which what Windows usually uses ("x86" instead of "i386") e.g. in sxs names.

3 years ago[SPEC2DEF] Implement support for private exports
Timo Kreuzer [Fri, 23 Oct 2020 08:31:50 +0000 (10:31 +0200)]
[SPEC2DEF] Implement support for private exports

3 years ago[WIN32K] Fix an ASSERT to ignore the upper 32 bits of a passed in GDI handle
Timo Kreuzer [Sat, 4 Jan 2020 12:56:11 +0000 (13:56 +0100)]
[WIN32K] Fix an ASSERT to ignore the upper 32 bits of a passed in GDI handle

3 years ago[WIN32NT_APITEST] Add tests for truncated and extended handle to NtGdiDeleteObjectApp...
Timo Kreuzer [Sat, 4 Jan 2020 12:14:28 +0000 (13:14 +0100)]
[WIN32NT_APITEST] Add tests for truncated and extended handle to NtGdiDeleteObjectApp test

3 years ago[KERNEL32] Fix register initialization in BaseInitializeContext
Timo Kreuzer [Mon, 12 Feb 2018 18:14:15 +0000 (19:14 +0100)]
[KERNEL32] Fix register initialization in BaseInitializeContext
Get rid of BaseThreadStartupThunk and BaseProcessStartThunk asm wrappers and go to the C functions directly (home space is allocated on the stack by the kernel)

3 years ago[PSAPI] Fix and simplify FindDeviceDriver
Timo Kreuzer [Fri, 3 Jan 2020 20:43:44 +0000 (21:43 +0100)]
[PSAPI] Fix and simplify FindDeviceDriver

The previous version was miscalculating the buffer size on x64 (due to alignment) and always using a too small buffer.
The new version removes the size calculation entirely and uses the required size returned by NtQuerySystemInformation.

3 years ago[SHELL32][SHELLEXT] Portuguese (PT) translation improvements and object adjustements...
Jose Carlos Jesus [Sat, 7 Nov 2020 16:30:36 +0000 (16:30 +0000)]
[SHELL32][SHELLEXT] Portuguese (PT) translation improvements and object adjustements (#3186)

- SHELL32: Improve Portuguese (PT) translation.
Minor objects adjustments to the text
and minor improvements to translation.

- SHELLEXT: Improve Portuguese (PT) translation to acppage rc file.

3 years ago[CMD] Add new portuguese (PT) translation (#3260)
Jose Carlos Jesus [Sat, 7 Nov 2020 16:27:52 +0000 (16:27 +0000)]
[CMD] Add new portuguese (PT) translation (#3260)

3 years ago[NTOS:SE] Fix handling of relative security descriptors in SeQuerySecurityDescriptorInfo
Timo Kreuzer [Fri, 3 Jan 2020 19:44:05 +0000 (20:44 +0100)]
[NTOS:SE] Fix handling of relative security descriptors in SeQuerySecurityDescriptorInfo

3 years ago[KMTESTS:HAL] Add a test for HalQueryAMLIIllegalIOPortAddresses. CORE-17359 3339/head
Thomas Faber [Sat, 31 Oct 2020 11:26:27 +0000 (12:26 +0100)]
[KMTESTS:HAL] Add a test for HalQueryAMLIIllegalIOPortAddresses. CORE-17359

3 years ago[WINDOWSCODECS] It turns out that /wd4133 is not enough to demote the error; we need...
Hermès Bélusca-Maïto [Thu, 5 Nov 2020 23:17:33 +0000 (00:17 +0100)]
[WINDOWSCODECS] It turns out that /wd4133 is not enough to demote the error; we need to use remove_target_compile_option() to completely remove the /we4133 flag.

Addendum to commits 7e116f0e and 00ed72d7.

This removes the "error C4133: 'function': incompatible types - from
'WICPixelFormatNumericRepresentation *' to 'DWORD *'"
message that still remains even when using /wd4133 .

3 years ago[RAPPS.COM] Use HeapAlloc/Free instead of the deprecated LocalAlloc/Free.
Hermès Bélusca-Maïto [Thu, 5 Nov 2020 18:55:33 +0000 (19:55 +0100)]
[RAPPS.COM] Use HeapAlloc/Free instead of the deprecated LocalAlloc/Free.

And fix my build.

3 years ago[NTOS:EX] Move the C_ASSERT UUID_CACHED_VALUES_STRUCT.GuidInit to a better place...
Hermès Bélusca-Maïto [Thu, 5 Nov 2020 18:03:30 +0000 (19:03 +0100)]
[NTOS:EX] Move the C_ASSERT UUID_CACHED_VALUES_STRUCT.GuidInit to a better place, where the structure is defined.

3 years ago[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build.
Hermès Bélusca-Maïto [Thu, 20 Aug 2020 15:47:40 +0000 (17:47 +0200)]
[CMD][SERVMAN][SHELL32][WINSPOOL][ROSAPPS][NTOS:PNP] Fix my build.

3 years ago[SERVMAN] Fix trailing whitespace.
Hermès Bélusca-Maïto [Thu, 20 Aug 2020 15:50:42 +0000 (17:50 +0200)]
[SERVMAN] Fix trailing whitespace.

3 years ago[USETUP] Introduce two helpers for formatting displayed disk and partition sizes...
Hermès Bélusca-Maïto [Sun, 3 Mar 2019 16:03:59 +0000 (17:03 +0100)]
[USETUP] Introduce two helpers for formatting displayed disk and partition sizes in order to reduce code duplication.

3 years ago[USETUP] Use pointers to const strings where meaningful.
Hermès Bélusca-Maïto [Wed, 4 Nov 2020 22:20:03 +0000 (23:20 +0100)]
[USETUP] Use pointers to const strings where meaningful.

3 years ago[PC98VID] Fix build for PC-98 target (#3352)
Dmitry Borisov [Wed, 4 Nov 2020 21:26:37 +0000 (03:26 +0600)]
[PC98VID] Fix build for PC-98 target (#3352)

- Some prototypes are not needed anymore.

Addendum to 5c7ce4475e246560d1622b8cc60dc603e3955f66.

3 years ago[DNSAPI_APITEST] Fix null-reference in case of failure 3331/head
Mark Jansen [Thu, 29 Oct 2020 21:27:13 +0000 (22:27 +0100)]
[DNSAPI_APITEST] Fix null-reference in case of failure

3 years ago[FREELDR] Add the possibility to change the boot load options from TXTSETUP.SIF
Hermès Bélusca-Maïto [Tue, 3 Nov 2020 00:42:09 +0000 (01:42 +0100)]
[FREELDR] Add the possibility to change the boot load options from TXTSETUP.SIF
at runtime from the boot selection menu or from FREELDR.INI.

CORE-17350, CORE-9023

For a proper override of the options by new user options, specify the
/SIFOPTIONSOVERRIDE switch in addition. Otherwise, user options are
merged with those retrieved from TXTSETUP.SIF, with priority given to
the former ones.

- Update the documentation for the 'ReactOSSetup' OS type in the
  FREELDR.INI file template.

- Use a different prompt in the custom boot options editor for the
  'ReactOSSetup' OS type, with adequate explanation.

- Get rid of the ReactOS-specific TXTSETUP.SIF 'DbgOsLoadOptions' value,
  and use instead the Windows-compatible 'SetupDebugOptions' value that
  is added to the other load options when debugging is to be enabled.

3 years ago[FREELDR] Fix x64 compilation warning (addendum to commit d887308b).
Hermès Bélusca-Maïto [Wed, 4 Nov 2020 18:21:00 +0000 (19:21 +0100)]
[FREELDR] Fix x64 compilation warning (addendum to commit d887308b).

3 years ago[WDF] Enable Resource and Interrupt APIs
Victor Perevertkin [Wed, 4 Nov 2020 16:34:14 +0000 (19:34 +0300)]
[WDF] Enable Resource and Interrupt APIs

3 years ago[UNIATA] Add an inf file for UniATA Management Port
Victor Perevertkin [Tue, 3 Nov 2020 20:23:35 +0000 (23:23 +0300)]
[UNIATA] Add an inf file for UniATA Management Port

3 years ago[HDAUDBUS] Add a timeout into HDA_SendVerbs
Victor Perevertkin [Tue, 3 Nov 2020 20:18:14 +0000 (23:18 +0300)]
[HDAUDBUS] Add a timeout into HDA_SendVerbs
This function may stuck during device installation if there are issues
with interrupts (or with a device itself).

This fixes the boot on my testing ThinkPad x60s

3 years ago[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation
Victor Perevertkin [Tue, 3 Nov 2020 20:12:40 +0000 (23:12 +0300)]
[STORPROP][CDROM_NEW][DISK_NEW] Improve disk and cdrom device installation

- Take a proper inf file for disk.sys
- Add class information into cdrom.inf
- Make a correct stub for storprop!DvdClassInstaller

3 years ago[FREELDR] Parse NT kernel load options in a consistent manner.
Hermès Bélusca-Maïto [Tue, 3 Nov 2020 00:16:14 +0000 (01:16 +0100)]
[FREELDR] Parse NT kernel load options in a consistent manner.

- Introduce a set of NtLdrGet(Next)Option(Ex) helpers that allow
  retrieving respectively, the "next" option in an options string,
  and retrieving a given named option in such an options string,
  by correctly parsing that string.

  Valid syntaxes:
      /OPTION1 /OPTION2/OPTION3 OPTION4 /OPTION5(=...) ...

  Options separators are slashes, or whitespace (space, tab), mandatory
  if no slash is used, and otherwise optional.

- Use these functions wherever NT load options are being parsed.

- Simplify the parsing of /DEBUGPORT=... using these functions.

- When parsing the /HAL=... or /KERNEL=... options, only the first
  encountered one is taken into account, any other ones are discarded.

- When parsing the other load options, only their first occurrences are
  taken into account, any other repetitions are discarded.
  * The NOPAE option overrides any previous PAE option.
  * Any NOEXECUTE(=) option should override any previous
    NOEXECUTE=ALWAYSOFF (or equivalently, EXECUTE) option.

3 years ago[FREELDR] In LoadReactOSSetup(), verify that our BootType is really ReactOSSetup.
Hermès Bélusca-Maïto [Tue, 3 Nov 2020 00:28:14 +0000 (01:28 +0100)]
[FREELDR] In LoadReactOSSetup(), verify that our BootType is really ReactOSSetup.

3 years ago[FREELDR] Minor code formatting / renaming some variables.
Hermès Bélusca-Maïto [Mon, 2 Nov 2020 23:46:02 +0000 (00:46 +0100)]
[FREELDR] Minor code formatting / renaming some variables.

3 years ago[FREELDR] Fix the parameter type of WinLdrSetupEms()
Hermès Bélusca-Maïto [Mon, 2 Nov 2020 23:22:26 +0000 (00:22 +0100)]
[FREELDR] Fix the parameter type of WinLdrSetupEms()

It's a NULL-terminated string. And thus avoid an unelegant cast.

3 years ago[FREELDR] Remove the 'Setup' parameter of the LoadAndBootWindowsCommon() function.
Hermès Bélusca-Maïto [Mon, 2 Nov 2020 23:13:05 +0000 (00:13 +0100)]
[FREELDR] Remove the 'Setup' parameter of the LoadAndBootWindowsCommon() function.

This parameter is not needed since it's possible to determine, from
within this function, whether or not we are in Setup mode, by just
looking for the presence of a non NULL LoaderBlock->SetupLdrBlock.

3 years ago[FREELDR] Remove trailing whitespace.
Hermès Bélusca-Maïto [Sat, 24 Oct 2020 22:15:43 +0000 (00:15 +0200)]
[FREELDR] Remove trailing whitespace.

3 years ago[WDF] Fix KMDF so it can compile with ReactOS SDK 3234/head
Victor Perevertkin [Fri, 16 Oct 2020 03:30:51 +0000 (06:30 +0300)]
[WDF] Fix KMDF so it can compile with ReactOS SDK
Not all files are included, but these are necessary to compile cdrom driver.
So far it can only be statically linked with drivers, a proper
implementation requires wdfldr helper driver

3 years ago[WDF] Add Windows Driver Framework files
Victor Perevertkin [Thu, 24 Sep 2020 20:51:15 +0000 (23:51 +0300)]
[WDF] Add Windows Driver Framework files
Takern from Microsoft GitHub repo:
https://github.com/microsoft/Windows-Driver-Frameworks/commit/d9c6040fe9fa787964ea99c48a8b35cf1aa978f7

Licensed under MIT

3 years ago[KMDF] Make KMDF headers compatible with our SDK and compilers
Victor Perevertkin [Thu, 24 Sep 2020 20:48:32 +0000 (23:48 +0300)]
[KMDF] Make KMDF headers compatible with our SDK and compilers

3 years ago[KMDF] Add Kernel-Mode Driver Framework headers v1.17
Victor Perevertkin [Thu, 24 Sep 2020 20:41:01 +0000 (23:41 +0300)]
[KMDF] Add Kernel-Mode Driver Framework headers v1.17
Taken from Microsoft GitHub repo:
https://github.com/microsoft/Windows-Driver-Frameworks/commit/d9c6040fe9fa787964ea99c48a8b35cf1aa978f7

Licensed under MIT

3 years ago[REACTOS] Cleanup INIT and some PAGE section allocations 3275/head
Victor Perevertkin [Tue, 6 Oct 2020 19:44:01 +0000 (22:44 +0300)]
[REACTOS] Cleanup INIT and some PAGE section allocations

- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore

3 years ago[NDK][CMAKE] Introduce DATA_SEG and CODE_SEG macro
Victor Perevertkin [Tue, 6 Oct 2020 19:36:45 +0000 (22:36 +0300)]
[NDK][CMAKE] Introduce DATA_SEG and CODE_SEG macro
These are for putting code and data to non-default sections
At the same time, move INIT section attributes declaration to cmake files

3 years ago[MOUNTMGR] Move the driver to drivers/storage
Victor Perevertkin [Sun, 1 Nov 2020 09:35:56 +0000 (12:35 +0300)]
[MOUNTMGR] Move the driver to drivers/storage
Effectively mountmgr.sys is an essential part of the storage stack

3 years ago[CRT] Remove duplicated atexit/onexit code
Timo Kreuzer [Thu, 22 Oct 2020 15:11:02 +0000 (17:11 +0200)]
[CRT] Remove duplicated atexit/onexit code

This removes the broken wine version of atexit and onexit. It keeps only dllonexit, which is implemented properly. The previous __call_atexit is moved to where the mingw onexit/atexit code is and adjusts it to work with the existing code. A call to __call_atexit is added in __tmainCRTStartup after the main function was called.

3 years ago[CMAKE] Rename def files for import libraries on MSVC builds to *_implib.de like...
Timo Kreuzer [Thu, 22 Oct 2020 14:25:46 +0000 (16:25 +0200)]
[CMAKE] Rename def files for import libraries on MSVC builds to *_implib.de like on GCC

3 years ago[CRT_APITEST] Add test for atexit
Timo Kreuzer [Thu, 22 Oct 2020 13:13:56 +0000 (15:13 +0200)]
[CRT_APITEST] Add test for atexit

3 years ago[NTOS:MM:X64] Fix MM_WAIT_ENTRY on x64
Timo Kreuzer [Sun, 28 Jul 2019 12:27:51 +0000 (14:27 +0200)]
[NTOS:MM:X64] Fix MM_WAIT_ENTRY on x64

3 years ago[NTOS:MM] Make sure PXEs/PPEs and PDEs are always MM_EXECUTE_READWRITE
Timo Kreuzer [Wed, 21 Mar 2018 20:22:03 +0000 (21:22 +0100)]
[NTOS:MM] Make sure PXEs/PPEs and PDEs are always MM_EXECUTE_READWRITE

This is required since the NX protection proagates from the highest level, enforcing NX on the entire range, independent of whether lower level P*Es have the bit set or not. It might be useful to add a platform specific constant to allow making page tables NX on architectures that have a different behavior.

3 years ago[NTOS:MM:X64] Fix session space initialization on x64
Timo Kreuzer [Sun, 4 Feb 2018 18:19:03 +0000 (19:19 +0100)]
[NTOS:MM:X64] Fix session space initialization on x64

3 years ago[NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping
Timo Kreuzer [Sat, 10 Feb 2018 21:45:45 +0000 (22:45 +0100)]
[NTOS:MM:X64] Implement MmCreatePageFileMapping and MmDeletePageFileMapping

3 years ago[NTOS:MM:X64] Simplify and fix x64 mapping code
Timo Kreuzer [Sun, 4 Feb 2018 12:33:14 +0000 (13:33 +0100)]
[NTOS:MM:X64] Simplify and fix x64 mapping code

- Use demand-zero-ptes in MiGetPteForProcess
- Handle NoExecute in MiSetPteProtection
- Fix MmIsPageSwapEntry
- Fix MmGetPageFileMapping
- remove obsolete functions.

3 years ago[NTOS:MM:X64] Handle PPEs and PXEs as well in MmInitializeProcessAddressSpace()
Timo Kreuzer [Mon, 26 Oct 2020 10:12:04 +0000 (11:12 +0100)]
[NTOS:MM:X64] Handle PPEs and PXEs as well in MmInitializeProcessAddressSpace()

But don't set up the PFNs for the initial process on x64, as these have already been set up.

3 years ago[NTOS:MM:X64] On x64 allocate a VAD for the shared user page
Timo Kreuzer [Sat, 7 Mar 2020 18:35:15 +0000 (19:35 +0100)]
[NTOS:MM:X64] On x64 allocate a VAD for the shared user page

3 years ago[NTOS:MM:X64] On x64 reserve the address range between FFFF800000000000 and FFFFF6800...
Timo Kreuzer [Mon, 29 Jan 2018 11:39:21 +0000 (12:39 +0100)]
[NTOS:MM:X64] On x64 reserve the address range between FFFF800000000000 and FFFFF68000000000 in MiInitSystemMemoryAreas()

3 years ago[NTOS:MM:X64] Improve x64 Mm initialization
Timo Kreuzer [Mon, 29 Jan 2018 11:33:49 +0000 (12:33 +0100)]
[NTOS:MM:X64] Improve x64 Mm initialization

* Move MiBuildPfnDatabaseFromPageTables into MiBuildPfnDatabase
* Make sure to call MmInitializeProcessAddressSpace() from the x64 version of MiInitMachineDependent()
* Handle result of MmInitializeProcessAddressSpace in MiInitMachineDependent (Should do the same for x86)
* Remove obsolete x64 debug print

3 years ago[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded (#3303)
Serge Gautherie [Sat, 31 Oct 2020 14:18:02 +0000 (15:18 +0100)]
[NTOS:CC] CcMdl*Complete(): Return if FastIO succeeded (#3303)

CORE-17342

3 years ago[GDI32] Fix up GdiFixUpHandle
Timo Kreuzer [Sat, 4 Jan 2020 12:58:06 +0000 (13:58 +0100)]
[GDI32] Fix up GdiFixUpHandle

3 years ago[GDI32_APITEST] Add tests for truncated and extended handle to GetObject test
Timo Kreuzer [Sat, 4 Jan 2020 12:13:45 +0000 (13:13 +0100)]
[GDI32_APITEST] Add tests for truncated and extended handle to GetObject test

3 years ago[NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread
Timo Kreuzer [Sun, 5 Jan 2020 23:56:20 +0000 (00:56 +0100)]
[NTOS:KE:X64] Set the exception frame as well in KiInitializeContextThread

3 years ago[NTOS:KE:X64] Zero out the context in KiDispatchException
Timo Kreuzer [Sun, 5 Jan 2020 23:51:43 +0000 (00:51 +0100)]
[NTOS:KE:X64] Zero out the context in KiDispatchException

3 years ago[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit...
Timo Kreuzer [Thu, 27 Jun 2019 16:07:58 +0000 (18:07 +0200)]
[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit, too)

3 years ago[NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExcept...
Timo Kreuzer [Thu, 18 Apr 2019 14:41:48 +0000 (16:41 +0200)]
[NTOS:KE:X64][NTDLL:X64] Implement KiUserExceptionDispatcher and fix KiDispatchExceptionToUser

3 years ago[NTOS:KE:X64] Zero out volatiles when returning from a system call
Timo Kreuzer [Tue, 15 May 2018 12:07:12 +0000 (14:07 +0200)]
[NTOS:KE:X64] Zero out volatiles when returning from a system call

3 years ago[NTOS:KE:X64][ASM:X64] Fix delivery of APCs
Timo Kreuzer [Mon, 12 Feb 2018 19:53:15 +0000 (20:53 +0100)]
[NTOS:KE:X64][ASM:X64] Fix delivery of APCs

- Deliver pending APCs on trap exit
- Pass the trapframe of KiApcInterrupt to KiDeliverApcs, not NULL.
- Fix parameter passing from KiSwapContext to KiSwapContextInternal and KiSwapContextResume, so that the ApcBypass parameter is not uninitialized
- Fix return value of KiSwapContextResume to correctly indicate whether we want to have APCs directly delivered or not (when there are non, or when delivery is suppressed)

3 years ago[NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code
Timo Kreuzer [Mon, 5 Feb 2018 00:26:11 +0000 (01:26 +0100)]
[NTOS:KE:X64][NTDLL:X64] Implement x64 version of user callback code

3 years ago[NTOS:KE:X64] Simplify KiInitializeUserApc
Timo Kreuzer [Sat, 10 Feb 2018 18:52:46 +0000 (19:52 +0100)]
[NTOS:KE:X64] Simplify KiInitializeUserApc

3 years ago[NTOS:KE:X64] Move KiInitializeUserApc to usercall.c
Timo Kreuzer [Sat, 10 Feb 2018 17:47:29 +0000 (18:47 +0100)]
[NTOS:KE:X64] Move KiInitializeUserApc to usercall.c

3 years ago[NTOS:KE:X64] Implement flushing the GDI batch
Timo Kreuzer [Tue, 28 May 2019 09:06:56 +0000 (11:06 +0200)]
[NTOS:KE:X64] Implement flushing the GDI batch

3 years ago[NTOS:KE:X64] Change the logic of KeSwitchKernelStack and friends to be standards...
Timo Kreuzer [Fri, 9 Feb 2018 19:59:33 +0000 (20:59 +0100)]
[NTOS:KE:X64] Change the logic of KeSwitchKernelStack and friends to be standards conforming

The previous version (like the x86 one) used a combination of C and asm code, called from C code to switch the stack. This is problematic, since there is no guarantee what assumptions C code makes about the stack (i.e. it can place any kind of stack pointers into registers or on the stack itself.) The new algorithm returns back to the systemcall entry point in asm, which then calls KiConvertToGuiThread, which is also asm and calls KeSwitchKernelStack ...

3 years ago[NTOS:KE:X64] Improve kernel stack switching on GUI system calls
Timo Kreuzer [Tue, 6 Feb 2018 19:52:16 +0000 (20:52 +0100)]
[NTOS:KE:X64] Improve kernel stack switching on GUI system calls

To be 100% correct and not rely on assumptions, stack switching can only be done when all previous code - starting with the syscall entry point - is pure asm code, since we can't rely on the C compiler to not use stack addresses in a way that is not transparent. Therefore the new code uses the same mechanism as for normal system calls, returning the address of the asm function KiConvertToGuiThread, which is then called like an Nt* function would be called normally. KiConvertToGuiThread then allocated a new stack, switches to it (which is now fine, since all the code is asm), frees the old stack, calls PsConvertToGuiThread (which now will not try to allocate another stack, since we already have one) and then jumps into the middle of KiSystemCallEntry64, where the system call is handled again.
Also simplify KiSystemCallEntry64 a bit by copying the first parameters into the trap frame, avoiding to allocate additional stack space for the call to KiSystemCallHandler, which now overlaps with the space that is allocated for the Nt* function.
Finally fix the locations where r10 and r11 are stored, which is TrapFrame->Rcx and TrapFrame->EFlags, based on the situation in user mode.

3 years ago[NTOS:KE:X64] Implement KiConvertToGuiThread, KeSwitchKernelStack and support for...
Timo Kreuzer [Sun, 4 Feb 2018 22:44:43 +0000 (23:44 +0100)]
[NTOS:KE:X64] Implement KiConvertToGuiThread, KeSwitchKernelStack and support for win32k syscalls in KiSystemCallHandler

3 years ago[NTOS:KE:X64] Fix bugs in KeContextToTrapFrame and KeTrapFrameToContext
Timo Kreuzer [Mon, 12 Feb 2018 18:21:50 +0000 (19:21 +0100)]
[NTOS:KE:X64] Fix bugs in KeContextToTrapFrame and KeTrapFrameToContext

Set valid EFlags, the non-volatiles need to be taken from the exception frame, because the ones from the trap frame might not be set.

3 years ago[NTOS:KE:X64] Silence KiRundownThread, it has nothing to do
Timo Kreuzer [Sun, 11 Feb 2018 11:12:26 +0000 (12:12 +0100)]
[NTOS:KE:X64] Silence KiRundownThread, it has nothing to do

3 years ago[NTOS:KE:X64] Fix KiWriteSystemTime
Timo Kreuzer [Tue, 31 Dec 2019 08:04:11 +0000 (09:04 +0100)]
[NTOS:KE:X64] Fix KiWriteSystemTime

3 years ago[ASM:X64] Save GS base MSR in trap frame
Timo Kreuzer [Sun, 14 Apr 2019 17:18:38 +0000 (19:18 +0200)]
[ASM:X64] Save GS base MSR in trap frame

3 years ago[ASM:X64] ASSERT that interrupts are enabled, when returning to user mode
Timo Kreuzer [Mon, 12 Feb 2018 19:48:11 +0000 (20:48 +0100)]
[ASM:X64] ASSERT that interrupts are enabled, when returning to user mode

3 years ago[ASM:X64] Add initial version of kxamd64.inc, macamd64.inc
Timo Kreuzer [Fri, 9 Feb 2018 20:04:28 +0000 (21:04 +0100)]
[ASM:X64] Add initial version of kxamd64.inc, macamd64.inc

3 years ago[COMPILER_APITEST] Add SEH tests from MS (#2435)
Timo Kreuzer [Sat, 31 Oct 2020 10:08:27 +0000 (11:08 +0100)]
[COMPILER_APITEST] Add SEH tests from MS (#2435)

* [COMPILER_APITEST] Import MS EH/SEH tests

Taken from https://github.com/microsoft/compiler-tests

* [CRT] Add missing declaration of _longjmpex

* [COMPILER_APITEST] Add cmake build files for MS SEH test

It is built as a static library

* [COMPILER_APITEST] Fix GCC build of MS SEH tests

There are a number of hacks in there now. Also the volatile hacks should be separated and sent upstream.

* [COMPILER_APITEST] Fix x64 build of MS SEH tests

* [COMPILER_APITEST] Fix clang build of MS SEH tests

* [COMPILER_APITEST] Include MS SEH tests

3 years ago[DOC] 3rd Party Files.txt: Add 'rdesktop' entry (#3333)
Serge Gautherie [Fri, 30 Oct 2020 12:35:49 +0000 (13:35 +0100)]
[DOC] 3rd Party Files.txt: Add 'rdesktop' entry (#3333)

3 years ago[BASESRV] Re-enable and actually fix the CsrValidateMessageBuffer() checks in BaseSrv... 3304/head
Hermès Bélusca-Maïto [Sat, 17 Oct 2020 14:40:50 +0000 (16:40 +0200)]
[BASESRV] Re-enable and actually fix the CsrValidateMessageBuffer() checks in BaseSrvDefineDosDevice(). (#3304)

Addendum to commit 0a392b18.

The actual problem that existed all along was that the buffers being
validated with CsrValidateMessageBuffer() were not the correct ones!

What had to be checked is the string buffer **INSIDE** the UNICODE_STRING
structures! Indeed, it is these buffers that we are allocating on client side,
see https://github.com/reactos/reactos/blob/9b421af1/dll/win32/kernel32/client/dosdev.c#L324-L336

Dedicated to Pierre Schweitzer.

3 years ago[CSRSRV] Clarify few comments, and use MAXULONG.
Hermès Bélusca-Maïto [Fri, 30 Oct 2020 00:08:23 +0000 (01:08 +0100)]
[CSRSRV] Clarify few comments, and use MAXULONG.

3 years ago[NTDLL_APITEST] Fix LdrEnumResources testdata initialization 3329/head
Mark Jansen [Wed, 28 Oct 2020 19:14:34 +0000 (20:14 +0100)]
[NTDLL_APITEST] Fix LdrEnumResources testdata initialization
ROSTESTS-361

3 years ago[PSDK] Import some SAL headers from MS
Timo Kreuzer [Sat, 24 Oct 2020 12:18:09 +0000 (14:18 +0200)]
[PSDK] Import some SAL headers from MS

Taken from https://github.com/microsoft/ChakraCore/tree/master/pal/inc/rt

* Move _Check_return_opt_ and _Check_return_wat_ to crtdefs.h
* Update sal.h from https://github.com/microsoft/ChakraCore/blob/master/pal/inc/rt/sal.h
* Import no_sal2.h from MS and remove the one in NDK
* Import specstrings.h from MS
* Import specstrings_strict.h from MS
* Add specstrings_undef.h (based on defines in specstrings_strict.h)
* Remove __REACTOS__ hacks from cdfs

3 years ago[CMAKE] Make reactos_cab_inf really depend on reactos.inf
Jérôme Gardou [Wed, 28 Oct 2020 14:09:15 +0000 (15:09 +0100)]
[CMAKE] Make reactos_cab_inf really depend on reactos.inf

Instead of being always out of date & always trigger reactos.cab creation

3 years agoRevert "[CMAKE] Make unattended bootcd configurable via cmake"
Jérôme Gardou [Mon, 26 Oct 2020 17:11:55 +0000 (18:11 +0100)]
Revert "[CMAKE] Make unattended bootcd configurable via cmake"

This reverts commit cfd4ef9384eb1f2b55a5b195ee39475f015c8a7c.
This was way more controversial than I would have thought

3 years ago[RAPPS] Abort screenshot iteration on the first not found
Mark Jansen [Sun, 25 Oct 2020 19:30:03 +0000 (20:30 +0100)]
[RAPPS] Abort screenshot iteration on the first not found
This should decrease startup time / db parse time

3 years ago[RAPPS][RAPPS.COM] Introduce a rapps console shim 3252/head
Mark Jansen [Sun, 20 Sep 2020 20:18:08 +0000 (22:18 +0200)]
[RAPPS][RAPPS.COM] Introduce a rapps console shim
rapps.com will be launched when running 'rapps' from cmd or
from run, and since it is a console application, explorer/ cmd will
wait for it.
This rapps.com passes the commandline to rapps.exe,
and wait for rapps.exe to exit before closing.

CORE-17281

3 years ago[DBGHELP] Add missing support for AMD64. (#3083)
Carlo Bramini [Sun, 25 Oct 2020 11:30:37 +0000 (12:30 +0100)]
[DBGHELP] Add missing support for AMD64. (#3083)

See:
https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-context

3 years ago[WIN32SS] Repaint the whole window frame on some style bits set (#3199)
Doug Lyons [Sat, 24 Oct 2020 19:35:45 +0000 (14:35 -0500)]
[WIN32SS] Repaint the whole window frame on some style bits set (#3199)

This fixes the ReactOS Calculator buttons disappearing in CORE-16827

3 years ago[FASTFAT] Implement the overflow queue. CORE-17344 CORE-17328 3305/head
Thomas Faber [Sun, 18 Oct 2020 13:23:52 +0000 (15:23 +0200)]
[FASTFAT] Implement the overflow queue. CORE-17344 CORE-17328

This avoids blocking all Ex worker threads in fastfat, thereby making Cc
unable to issue the lazy writes that would unblock those workers.
This is more or less directly taken from fastfat_new.

3 years ago[SHELL32] Stub SHGetShellStyleHInstance and SHGetAttributesFromDataObject CORE-17337...
Oleg Dubinskiy [Sat, 24 Oct 2020 15:04:54 +0000 (18:04 +0300)]
[SHELL32] Stub SHGetShellStyleHInstance and SHGetAttributesFromDataObject CORE-17337 (#3295)

They are required by MS Picture and Fax Viewer (shimgvw.dll), together with MS browseui.dll.
CORE-17337

3 years ago[BROWSEUI] CCommonBrowser class should support aggregation (#3308)
Oleg Dubinskiy [Sat, 24 Oct 2020 15:02:18 +0000 (18:02 +0300)]
[BROWSEUI] CCommonBrowser class should support aggregation (#3308)

It will remove the following error from the log when use MS shell32.dll in ReactOS:
`fixme:(dll/win32/ole32/compobj.c:3454) Class {af604efe-8897-11d1-b944-00a0c90312e1} does not support aggregation`.
References:
https://www.geoffchappell.com/studies/windows/ie/browseui/classes/ccommonbrowser.htm
https://docs.microsoft.com/en-us/cpp/atl/reference/aggregation-and-class-factory-macros?view=vs-2019
CORE-17345

3 years ago[DOC] Add more files to "3rd Party Files.txt"
Victor Perevertkin [Sat, 24 Oct 2020 14:07:13 +0000 (17:07 +0300)]
[DOC] Add more files to "3rd Party Files.txt"

3 years ago[COMPILER_APITEST] Add new compiler_apitest, using pseh tests
Timo Kreuzer [Tue, 10 Mar 2020 00:27:59 +0000 (01:27 +0100)]
[COMPILER_APITEST] Add new compiler_apitest, using pseh tests

3 years ago[PSEH2_TEST] Move it to apitests
Timo Kreuzer [Mon, 9 Mar 2020 21:42:51 +0000 (22:42 +0100)]
[PSEH2_TEST] Move it to apitests

The folder name is compiler, because it is going to be part of a new compiler_apitest.

3 years ago[PSEH2_TEST] Fix compilation with MSVC
Timo Kreuzer [Mon, 9 Mar 2020 21:17:22 +0000 (22:17 +0100)]
[PSEH2_TEST] Fix compilation with MSVC

3 years ago[SHELL32] PL-pl Dialogs fix v2
Piotr Hetnarowicz [Thu, 14 May 2020 15:47:44 +0000 (17:47 +0200)]
[SHELL32] PL-pl Dialogs fix v2

shell32.dll PL-pl
-FIXED: invisible icon,text & description

3 years ago[MLANG] Fix scripts values in fnIMLangFontLink2_GetScriptFontInfo()
Serge Gautherie [Wed, 24 Jun 2020 18:41:44 +0000 (20:41 +0200)]
[MLANG] Fix scripts values in fnIMLangFontLink2_GetScriptFontInfo()

MSVC:
'...\mlang.c(3568): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)'

Import
https://source.winehq.org/git/wine.git/commit/2dc0758b5d0fe4ef49b7d0635299e5cb9e0360df

3 years ago[DOC] Make "3rd Party Files.txt" a main source about 3rd party projects
Victor Perevertkin [Sat, 24 Oct 2020 03:34:55 +0000 (06:34 +0300)]
[DOC] Make "3rd Party Files.txt" a main source about 3rd party projects

- Add path and license information to "3rd Party Files.txt"
- Merge README.FSD with it
- Rename README.WINE to WINESYNC.txt

3 years ago[CMAKE] MSVC RUNTIME_CHECKS is a 'Debug'-only feature
Serge Gautherie [Tue, 2 Jun 2020 19:27:07 +0000 (21:27 +0200)]
[CMAKE] MSVC RUNTIME_CHECKS is a 'Debug'-only feature

"cl : Command line error D8016 : '/Ox' and '/RTC1' command-line options are incompatible"

Addendum to 92dfec219d8c53a84c68ca069abbc170fc8bdb49.