Commit graph

1117 commits

Author SHA1 Message Date
Dmitry Borisov 557306f5c0
[DDK:NDIS] Fix definition of broadcast address macro (#5155)
ff:ff:ff:ff:ff:ff is the broadcast MAC address.

CORE-8724
2023-03-18 16:57:52 +01:00
Hermès Bélusca-Maïto f6c8155239
[SDK] driverspecs.h: Add missing dummy _IRQL_limited_to_() definition (when _PREFAST_ is not defined).
Addendum to commit 8a688204.
2023-03-18 03:42:26 +01:00
Hermès Bélusca-Maïto e241c87eea
[SDK] sdkddkver.h: Add NTDDI_* defines for newest Windows 10 and 11 versions.
And add version descriptions, especially for Windows 10 as it becomes messy.

Information from:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlisntddiversionavailable
- Shared/sdk/extdef.h from https://github.com/Mattiwatti/WinObjEx64
- Descriptions from https://github.com/MiroKaku/Veil
- Cross-checked with headers from https://github.com/microsoft/wil
2023-03-14 00:14:12 +01:00
Hermès Bélusca-Maïto a8b09eddc4
[NTOS:KD] Add some annotations. 2023-03-09 18:32:36 +01:00
Joachim Henze 09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Gabriel Grondin 144e984b40 [ZLIB] Update to v1.2.13. CORE-18752 2023-02-02 02:18:39 +03:00
Victor Perevertkin 1734f29721 [IP][LWIP][TCPIP] Move ip and lwip libraries to drivers/network/tcpip
These libraries are used only inside tcpip.sys driver so move them close
to it.
2023-02-01 02:31:14 +03:00
Timo Kreuzer 2154e259e7 [PSDK] Fix definition of DRVCALLBACK for 64 bit 2023-01-04 10:32:28 +01:00
Hermès Bélusca-Maïto 95e5f07084
🎊 🍾 🥳 Happy New Year 2023 to the ReactOS Community! 🎆 ⚛️ ☢️
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
 __,  ,__)            __,  ,__)       __, ,__)        ░▄████▄░▄███▄░▄████▄░▄█▀▀█▄░
(--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_   ░▀▀░▄██░██░██░▀▀░▄██░░░░▄█▀░
  _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||    ░░▄██▀░░██░██░░▄██▀░░▄░▀▀█▄░
 (        |  |  ,_|   (                (__|           ░██████░▀███▀░██████░▀█▄▄█▀░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
2023-01-01 00:00:00 +03:00
Timo Kreuzer 3b437b8a1c [NDK] Fix definition of RTL_DEBUG_INFORMATION
Fixes ntdll_aiptest RtlDebugInformation on x64
2022-12-30 11:19:26 +01:00
Timo Kreuzer 918c98a239 [NDK] Fix definition of LDR_ENUM_RESOURCE_INFO
This fixes ntdll_apitest LdrEnumResources on x64 Windows
2022-12-30 11:19:26 +01:00
Timo Kreuzer 081c637c06 [XDK] Silence some GCC x64 warnings 2022-12-01 15:21:59 +02:00
Timo Kreuzer 06f1ac5fa4 [CRT] Add a workaround for CORE-18255 2022-12-01 15:21:59 +02:00
Hermès Bélusca-Maïto 8398b28ae4
[PSDK] Fix x64 incompatibilities in ***Box_GetItemData(). Addendum to 6572dd7f4. 2022-11-28 15:02:39 +01:00
Thomas Faber 991e2bd45b
[LIBPNG] Update to version 1.6.39. CORE-18670 2022-11-27 10:10:53 -05:00
Thomas Faber c5febe93f0
[LIBPNG] Update to version 1.6.38. CORE-18670 2022-11-27 10:10:51 -05:00
Hermès Bélusca-Maïto 3c95c95369
[NDK] Fix description for PIO_APC_ROUTINE.
[RTL] Typo fix.
2022-11-26 02:38:52 +01:00
Thomas Faber 19da1718e5
[LIBXSLT] Update to version 1.1.37. CORE-17766 2022-11-25 09:30:40 -05:00
Thomas Faber 0d5a4166a4
[LIBXML2] Update to version 2.10.1. CORE-17766 2022-11-25 09:30:36 -05:00
Timo Kreuzer 20a6cff4dd [CRT] Implement _InterlockedCompareExchange128 intrinsic for GCC 2022-11-24 21:17:58 +02:00
Hermès Bélusca-Maïto f7024d6c72
[PSDK][NTOS:KD64] Turns out, that even Clang in MSVC mode needs the 64-bits pointer extension hack!
Addendum to commit de81021ba.
Otherwise, we get the following build error:

 \ntoskrnl\kd64\kddata.c(532,5): error: initializer element is not a compile-time constant
      PtrToUL64(RtlpBreakWithStatusInstruction),
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \ntoskrnl\kd64\kddata.c(526,26): note: expanded from macro 'PtrToUL64'
 #define PtrToUL64(x)    ((ULPTR64)(x))
                          ^~~~~~~~~~~~
2022-11-24 13:30:43 +01:00
Thomas Faber 911153da10
[LIBXML2] Update to version 2.10.0. CORE-17766 2022-11-23 22:02:47 -05:00
Thomas Faber 21ab4d93c7
[LIBXSLT] Update to version 1.1.36. CORE-17766
This version was released after libxml2 2.10.0, but it removes
usage of some now-deprecated functions that would break the build.
2022-11-23 22:02:43 -05:00
Hermès Bélusca-Maïto de81021bab
[PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity.
But the underlying GCC stupidity is still there (15 years later).

However, enable it only in 32-bit GCC builds, not in 64-bits nor with MSVC.
See commit b9cd3f2d9 (r25845) for some details.

GCC is indeed still incapable of casting 32-bit pointers up to 64-bits,
when static-initializing arrays (**outside** a function) without emitting
the error:

  "error: initializer element is not constant"

(which might somehow indicate it actually tries to generate executable
code for casting the pointers, instead of doing it at compile-time).

Going down the rabbit hole, other stupidities show up:

Our PVOID64 type and the related POINTER_64 (in 32-bit archs), or the
PVOID32 and POINTER_32 (in 64-bit archs), are all silently broken in
GCC builds, because the pointer size attributes __ptr64 and __ptr32,
which are originally MSVC-specific, are defined to nothing in _mingw.h.
(And similarly for the __uptr and __sptr sign-extension attributes.)

Clang and other sane ompilers has since then implemented those (enabled
with -fms-extensions), but not GCC. The closest thing that could exist
for GCC is to do:

  #define __ptr64 __attribute__((mode(DI)))

in order to get a 64-bit-sized pointer type with

  typedef void* __ptr64 PVOID64;

but even this does not work, with the error:

  "error: invalid pointer mode 'DI'"
2022-11-24 01:18:16 +01:00
Hermès Bélusca-Maïto 1c0950b557
[PSDK][NTOS:KD64] Update the KDDEBUGGER_DATA64 structure with new fields.
Information from the Windows 10 SDK and from
https://github.com/DarthTon/Blackbone/blob/master/src/BlackBoneDrv/NativeStructs.h
2022-11-24 01:18:15 +01:00
Hermès Bélusca-Maïto 1847474aaa
[PSDK] Clarify the FIXME comment about this mysterious warning.h (here for WDK compatibility). 2022-11-24 01:18:11 +01:00
Thomas Faber 8940614a78
[LIBXML2] Update to version 2.9.14. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber 7244e0c5c6
[LIBXML2] Update to version 2.9.13. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber f7671c1be8
[LIBXSLT] Update to version 1.1.35. CORE-17766 2022-11-21 19:46:11 -05:00
Thomas Faber e524b1bcf6
[LIBXSLT] Improve sync with upstream. CORE-17766
Makefile.am: this hasn't been updated in a while
security.c: WIN32 -> _WIN32 to keep the ROS-diff consistent with the rest
win32config.h/libxslt.h: remove unnecessary ROS-diff
xsltwin32config.h: this was missed in the 1.1.34 sync
xsltexports.h: mark a ROS-diff as such
2022-11-21 19:46:08 -05:00
Hermès Bélusca-Maïto 56be4eafd5
[NTOS:IO][NDK] Add the exported IoDeleteDriver to the NDK headers. 2022-11-18 18:11:26 +01:00
Hermès Bélusca-Maïto 2dddbd5c54
[SMSS] Fix three SmpLoadSubSystem bugs related to the SB_CREATE_SESSION callback.
This fixes starting the Windows 2000 POSIX subsystem in ReactOS.

- The CreateSession pointer was initialized against the SbApiMsg variable, but
  it was the other SbApiMsg2 that was being initialized and sent through LPC.

- Do not overwrite the MuSessionId (Terminal Services session ID) variable with
  the generated environment subsystem session ID from SmpAllocateSessionId().

- Actually initialize the SbApiMsg ApiNumber for the CreateSession LPC call.

(dll\win32\kernel32\client\proc.c:3690) Retrying with: POSIX /P C:\ReactOS\system32\posix\ls.exe /C ls
Breakpoint 1 hit
csrsrv!CsrSbApiRequestThread+0x64:
001b:1000ac34 837dfc00        cmp     dword ptr [ebp-4],0
kd> ??ReceiveMsg
struct _SB_API_MSG
   +0x000 h                : _PORT_MESSAGE
   +0x018 ConnectionInfo   : _SB_CONNECTION_INFO
   +0x018 ApiNumber        : 0xcccccccc (No matching name)
   +0x01c ReturnValue      : 0n0
   +0x020 u                : <unnamed-tag>
kd> p
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 2
...
<Retrying>
...
(base\system\smss\smsubsys.c:393) SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with  Status c0000002 for sessionid 3

All those bugs could have been avoided *IF*, rather than (badly) duplicating
its code, the existing SmpSbCreateSession() function had been used instead.

- "Not sure these field mean what I think they do -- but clear them" ... ◔_◔
  Those fields are related to the debug client interface (DbgUi) and session
  in case the subsystem being started is going to be debugged. These have
  nothing to do with the MuSessionId. Clarify this in the SB_CREATE_SESSION_MSG
  structure and in the SmpSbCreateSession() function.
2022-11-14 00:10:35 +01:00
Hermès Bélusca-Maïto 06a0451415
[SMSS][CSRSRV] Undefine CreateProcess symbol. Name the union inside SB_API_MSG.
Undefine CreateProcess because it can be #define'd (to CreateProcessA/W)
if winbase.h is included prior (as it is in SMSS).
2022-11-14 00:10:32 +01:00
Katayama Hirofumi MZ e1f8b32c3d [INCLUDE][USER32] Add WM_FINALDESTROY and improve ImeWndProcA/W
CORE-11700
2022-11-13 09:59:17 +09:00
Hermès Bélusca-Maïto 9f48c69231
[SMLIB][SMSS] Implement SmLoadDeferedSubsystem() client and server-side. (#4821)
Loosely based on the deprecated ReactOS-specific SmExecuteProgram().
On server-side, we lookup into the list of deferred subsystems that
has been initialized at init time.

Dedicated to Justin Miller (The_DarkFire) work on reviving the
POSIX subsystem!
2022-11-08 17:41:02 +01:00
Hermès Bélusca-Maïto 0e14378d3e
[SMDLL][SMLIB] Deprecate the legacy ROS-specific SMDLL and improve SM client functions. (#4821)
This DLL was exporting legacy NT-incompatible or ROS-specific SM client
functions, that have been since 10 years now (2012) replaced by the new
NT-compatible SM:

- SmConnectApiPort(): was just SmConnectToSm().

- SmCompleteSession():
  The legacy SMSS used it for when a subsystem initialization was finished.
  Now (NT-compatible) this function is called by subsystems **only** when a
  subsystem session **terminates**: SmSessionComplete().

- SmExecuteProgram(): was just the client side of SmLoadDeferedSubSystem()
  (whose server side is not implemented yet). The legacy SM "old" SmExecPgm
  implementation actually was "SmLoadDeferedSubSystem"...

- SmLookupSubsystem(): is a utility-only function to read any registry value
  inside "Session Manager\SubSystems".

Move SMDLL's readme into SMLIB and update its contents.

Collect some residual useful functions into smutils.c (and moved in SMLIB,
though not compiled yet):
- SmExecuteProgram(), now implemented as a wrapper around SmExecPgm();
- SmLookupSubsystem(), described above;
- SmQueryInformation(), that retrieves a list of currently-running subsystems.

[SMLIB] Validate SbApiPortName's length in SmConnectToSm().
Fix CommandLine length validation in SmStartCsr().

Add documentation (+ SAL annotations) to the NT-compatible SMSS client functions.

smmsg.h: Add both Win32 and Win64 struct sizes C_ASSERTs for those whose size
change between these two processor architecture sizes.

[SMLIB] Introduce SmSendMsgToSm() as helper to send data into the SM LPC port.
+ Make the other API functions use it.

It should be observed that in Vista+, both functions SmConnectToSm() and this
new SmSendMsgToSm() are exported by NTDLL under the names RtlConnectToSm()
and RtlSendMsgToSm() (and use the same signature).
See: https://www.geoffchappell.com/studies/windows/win32/ntdll/history/names60.htm

[NTDLL] Correctly stub RtlConnectToSm() and RtlSendMsgToSm().
[NTDLL_VISTA] Link to SMLIB and simply export RtlConnectToSm() and RtlSendMsgToSm().
2022-11-08 17:40:53 +01:00
Katayama Hirofumi MZ 140aa11c36
[SHELL32] shlexec: Initial support of App Paths (#4850)
- Fix SHELL_TryAppPathW helper function by using SHRegQueryValueExW function.
- Fix SHRegQueryValueExA/W functions.
CORE-11335
2022-11-08 09:23:06 +09:00
Katayama Hirofumi MZ 1a1a8a8303
[SHELL32][INCLUDE] Fix PathResolve for double-backslash (#4833)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>

Fix shell32!PathResolve and shell32!PathQualifyExW functions for double-backslash. However it doesn't fix CORE-15204.
CORE-18080, CORE-15204
2022-11-04 21:44:46 +09:00
Hermès Bélusca-Maïto e944dfa75f
Remove '.html' from spdx.org license page URLs. (#4845) 2022-11-03 18:25:37 +01:00
Hermès Bélusca-Maïto 4ac263c93a
[NTOS][NTDLL][NDK] Nt/ZwCreatePagingFile: Fix parameter names + use SAL; fix NTDLL spec file. 2022-11-03 02:55:50 +01:00
Mark Jansen e3ac541360
[RTL] Use RtlApplicationVerifierStop for DPH 2022-11-01 21:26:05 +01:00
Mark Jansen d82185f104
[SDK] Define CCoInit in shellutils 2022-11-01 21:24:14 +01:00
Serge Gautherie b5fcf9fe07
[PSDK] SECURITY_ATTRIBUTES: Remove size_is(nLength) (#4832)
nLength is the size of the struct itself, not a number of descriptors.
Addendum to 1f12113 (r26428).
2022-11-01 03:14:09 +01:00
Hermès Bélusca-Maïto d8cc88ca80
[KERNEL32][BASESRV] Fix interoperability with Win2k3 regarding NLS section security. (#4828)
Partially revert some aspects of commits 5696e4ba4 and bf40c7a31.
(See PR #4340.)

In order for Win2k3 kernel32.dll to operate with our basesrv.dll (or our
kernel32.dll to operate with Win2k3 basesrv.dll), we need in particular
to have the CreateNlsSecurityDescriptor() helper to exactly take the
expected parameters. Namely, a pointer to a **user-allocated**
SECURITY_DESCRIPTOR buffer, its size (and an access mask).

The function expects its caller to provide all this, and the caller expects
the function to initialize the security descriptor buffer. Note that the
function does *NOT* allocate a new descriptor buffer to be returned!

Indeed, with the way it currently is in master, using Win2k3 kernel32
with our basesrv is now failing with the errors:
```
NLSAPI: Could NOT Create ACL - c0000023.
(subsystems/win/basesrv/nls.c:279) NLS: CreateNlsSecurityDescriptor FAILED!: c0000023
NLSAPI: Could NOT initialize Server - c0000023.
(dll/ntdll/ldr/ldrinit.c:867) LDR: DLL_PROCESS_ATTACH for dll "kernel32.dll" (InitRoutine: 77E40D95) failed
```
(and, if we ever attempted to increase the so-claimed "dummy parameter"
descriptor size in the basesrv call, we would end up with its stack
corrupted and a crash).
Conversely, using our kernel32 with Win2k3 basesrv, would end up with
basesrv receiving a wrongly-initialized descriptor that would not work
(the buffer not being initialized with the contents of a descriptor, but
instead receiving some address to a descriptor allocated somewhere else).
2022-11-01 02:34:04 +01:00
Hermès Bélusca-Maïto b4dfef73e5
[PSDK] Formatting for COPY_FILE_* and FILE_FLAG_* defines.
As flags it's easier to see hex values than decimal numbers.
Also I wonder who made those headers, it's as if they "unformatted" them
on purpose (looks like some autodump from somewhere). Just ugly smh...
2022-11-01 02:29:23 +01:00
Hermès Bélusca-Maïto 8cd01eaf25
[CSRLIB] Add SAL annotations to the CSR client functions. 2022-10-29 17:17:30 +02:00
Hermès Bélusca-Maïto d2aeaba5f8
[CSR][NTDLL] Move the CSR subsystem into its own "csr" sub-directory. (#4802)
Move CSRSS, CSRSRV there, as well as CSR client calls from NTDLL into a "CSRLIB" library.
2022-10-29 17:17:29 +02:00
Mark Jansen 122423238a
[PSDK] Add arguments for SearchPathW 2022-10-19 19:39:29 +02:00
Katayama Hirofumi MZ dff4579bd6 [NTUSER][USER32][INCLUDE] s/SETIMEHOTKEY_DELETEALL/SETIMEHOTKEY_INITIALIZE/
CORE-11700
2022-10-19 12:15:11 +09:00
Katayama Hirofumi MZ 26caef2336 [INCLUDE] immdev.h: Adapt INPUTCONTEXTDX to C++
CORE-11700
2022-10-15 08:13:22 +09:00