Commit graph

7082 commits

Author SHA1 Message Date
Paul Gofman 733e4ca06e server: Support FileStandardInformation for pipes. 2023-09-11 13:15:15 +02:00
Alexandre Julliard 615d465bb1 ntdll: Don't save segment registers in the syscall frame on x86-64. 2023-09-11 11:50:58 +02:00
Alexandre Julliard ea640f6cec ntdll: Ignore attempts to change segment registers on x86-64. 2023-09-11 11:46:33 +02:00
Alexandre Julliard 508b8b7279 ntdll: Always fetch the %fs register from the thread data. 2023-09-11 11:18:14 +02:00
Alexandre Julliard 2887be187b ntdll/tests: Use a valid buffer address for misalignment test. 2023-09-09 16:43:44 +02:00
Huw Davies 152924c9e4 ntdll: Store the codepage data addresses in both PEBs.
Spotted by Jactry Zeng.
2023-09-08 17:18:08 +02:00
Alexandre Julliard 04a74bdb50 winebuild: Add SEH information to relay entry points on ARM64. 2023-09-07 17:12:55 +02:00
Jacek Caban b228e3df60 ntdll: Unconditionally forward console events to kernelbase.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-09-06 11:59:18 +02:00
Paul Gofman a602e37069 ntdll/tests: Adjust test_raiseexception_regs() for Win11 results. 2023-09-05 11:36:41 +02:00
Paul Gofman 53bf758a96 ntdll/tests: Adjust test_extended_context() for Win11 results. 2023-09-05 11:36:41 +02:00
Paul Gofman 7eaa5119b7 ntdll/tests: Adjust test_nested_exception() for Win11 results.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55238
2023-09-05 11:36:41 +02:00
Paul Gofman 782b008de9 ntdll/tests: Adjust test_virtual_unwind() for Win11 results. 2023-09-05 11:36:38 +02:00
Paul Gofman 98c929d73e ntdll/tests: Test NtQueryDirectoryFile with wildcards. 2023-09-04 20:41:54 +02:00
Paul Gofman 9e04cd31bc ntdll/tests: Add tests for RtlGetFullPathName_U and RtlDosPathNameToNtPathName_U with mask. 2023-09-04 20:41:54 +02:00
Alexandre Julliard ff1dfb42b9 ntdll/tests: Work around a Windows pointer truncation bug in CPU info. 2023-09-01 18:06:02 +02:00
Alexandre Julliard 5bd5fecbeb ntdll/tests: Allow more invalid length values on Windows. 2023-09-01 16:08:16 +02:00
Alexandre Julliard e33cd0d18a ntdll/tests: Fix alignment issues on 64-bit. 2023-09-01 16:07:10 +02:00
Dmitry Timoshkov a52cf805d2 ntdll: Implement NtCreateToken().
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2023-08-31 19:53:16 +02:00
Alexandre Julliard 1942cc3017 wow64: Also send notifications for failed memory management calls. 2023-08-30 13:54:59 +02:00
Alexandre Julliard b892d12c8c ntdll/tests: Add tests for cross-process notifications. 2023-08-28 17:53:15 +02:00
Alexandre Julliard b521507591 ntdll: Implement RtlOpenCrossProcessEmulatorWorkConnection(). 2023-08-28 11:39:42 +02:00
Alexandre Julliard f6ccadda8a wow64: Create the cross-process work list. 2023-08-28 11:33:59 +02:00
Alexandre Julliard 049fb065c4 ntdll: Implement the cross-process work list functions. 2023-08-28 11:32:18 +02:00
Alexandre Julliard 7ee9c19687 ntdll: Also store syscall id and names following the syscall dispatcher pointer. 2023-08-25 22:52:45 +02:00
Piotr Caban c73bea16eb ntdll: Don't overwrite last byte of RuntimeInfo if odd number of bytes is used.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55287
2023-08-24 20:29:35 +02:00
Eric Pouech 82b0bb3c24 server: Separate console and new group flag (CreateProcess).
We were using bit 1 of RTL_USER_PROCESS_PARAMETERS for two different cases:
- rightfully, as a sign to block ctrl-c events from being processed by
  handlers (and by default, terminating the process)
- But this was also used to request for the creation of a new process group.

This patch properly separates the two use cases, by using the
ProcessGroupId field in RTL_USER_PROCESS_PARAMETERS (checked that Win10
behaves as this patch in RtlCreateUserProcess wrt.
RTL_USER_PROCESS_PARAMETERS ProcessGroupId usage input/output).

Introduce process_group_id in startup_info_t and use it to pass it to
server. ProcessGroupId field in RTL_USER_PROCESS_PARAMETERS is now properly
set.

Note: this will change some external behavior.
- before this patch, a child process created with Ctrl-C disabled
  (ConsoleFlags set), couldn't turn it on as the process was detached
  from unix console.
- now, SIGINT handling is moved to kernelbase (and can be turned on/off at
  application will),
- when creating a new windows group id, the child will be detached from
  unix console, so will no longer receives the SIGINT from ctrl-c in unix
  console (if parent was attached to this unix console).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-08-23 17:38:51 +02:00
Eric Pouech e09dde5c94 kernelbase: Implement WaitForDebugEventEx().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-08-22 10:39:18 +02:00
Eric Pouech 090fb2cc19 kernelbase: Emit DBG_PRINTEXCEPTION_WIDE_C from OutputDebugStringW.
Also modifying WaitForDebugEvent() to force resending the ansi
DBG_PRINTEXCEPTION_C exception instead.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-08-22 10:37:10 +02:00
Eric Pouech 514f63f3b5 ntdll/tests: Add tests for debuggee and new Win10 unicode debug strings.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-08-22 10:37:10 +02:00
Eric Pouech 33db5b78bc ntdll/tests: Introduce enumeration to handle stages in test_debugger().
It'll be easier to add stages.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-08-22 10:37:10 +02:00
Eric Pouech b7004335c5 ntdll/tests: Add test for Win10 OutputDebugStringW evolution.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2023-08-22 10:37:10 +02:00
Etaash Mathamsetty 948412f0fe ntdll: Add semi-stub for NtOpenKeyTransactedEx. 2023-08-21 22:47:42 +02:00
Etaash Mathamsetty 4d6d580b66 ntdll: Allow NULL timeout in NtCreateNamedPipeFile. 2023-08-21 22:47:42 +02:00
Tim Clem 9d6aabb202 ntdll: Add error and warning logs in more cases of memory exhaustion. 2023-08-18 18:44:05 +02:00
Alexandre Julliard 572cc841a6 ntdll/tests: Add some more tests for the contents of the WOW64INFO structure. 2023-08-17 23:26:13 +02:00
Alexandre Julliard 3ac808e46e ntdll: Set Wow64 user space limit based on LARGE_ADDRESS_AWARE.
Based on a patch by Billy Laws.
2023-08-16 15:31:54 +02:00
Stefan Dösinger de7604b6c6 ntdll: Try to raise the file limit above OPEN_MAX on MacOS.
OPEN_MAX is 10240, which is usually lower than the kern.maxfilesperproc sysctl
value. Said value from sysctl works on Mojave to Monterey (and most likely
earlier Mac OS versions, but I can't test). Since Big Sur we can successfully
set the reported rlim_max value.
2023-08-14 18:11:23 +02:00
Vitaly Lipatov ee1d3a19a4 ntdll: Use COMPRESSION_FORMAT_MASK instead of ~COMPRESSION_ENGINE_MAXINUM. 2023-08-08 21:13:29 +09:00
Vitaly Lipatov 115403dc5b include: Update COMPRESSION_ defines and move it to ddk/ntifs.h. 2023-08-08 21:13:29 +09:00
Jinoh Kang 14d4a896bd ntdll: Avoid relying on linux/ipx.h to define SOL_IPX.
musl libc doesn't supply any definitions for IPX, such as the SOL_IPX
macro.  However, it still provides linux/ipx.h from Linux uAPI header
files if it exists.

Linux kernel wouldn't drop linux/ipx.h from uAPI headers until 5.15,
although IPX support has already been marked obsolete since 2018.

Fix this by not defining HAS_IPX if linux/ipx.h has been included but
nothing defines the SOL_IPX macro.

Status of IPX support from other libcs are noted below:

- bionic: netipx/ipx.h does not exist.  linux/ipx.h may or may not
  exist.  Note that sys/socket.h defines SOL_IPX even if linux/ipx.h is
  missing.

- glibc: netipx/ipx.h exists.  In this case, Wine assumes IPX support
  even if the operating system does not support it in runtime.

- BSD variants: netipx/ipx.h may or may not exist.  linux/ipx.h does not
  exist.  Some BSDs supply SO_DEFAULT_HEADERS instead of SOL_IPX.

Fixes: 954bf9e050
2023-08-05 10:45:04 +09:00
Francois Gouget abdca2f74b ntdll/tests: Fix the basic file informations failure messages.
Set the messages to accurately reflect what is being tested, make them
unique and trace bad values.
2023-07-31 18:26:50 +09:00
Francois Gouget 541695ae00 ntdll/tests: Fix the spelling of some exception ok() messages. 2023-07-27 16:36:09 +09:00
Francois Gouget 2f57803114 ntdll/tests: Fix the NtSetInformationFile() test on Windows 10 <= 1709.
It does not support FileDispositionInformationEx and returns various
error codes.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55331
2023-07-27 13:12:06 +09:00
Paul Gofman c77642ec52 ntdll: Match Windows used block filling.
Test rewritten by Rémi Bernon.
2023-07-27 13:12:06 +09:00
Zebediah Figura 0a33ac4a53 server: Move the implementation of IOCTL_AFD_GET_EVENTS to a dedicated server call. 2023-07-24 22:51:00 +02:00
Billy Laws a9d0988d01 ntdll: Avoid storing a second ctx copy in the aarch64 raise trampoline.
CFI directives allow the context that was stored on the stack by
raise_func_trampoline to be used to unwind to any exception handlers as
required when dispatching an exception. However, as the dispatcher may change
its input context in e.g. BTCpuResetToConsistentState and these changes also
need to be used when unwinding, have the trampoline CFI directly refer to the
input context rather than a copy of it.
2023-07-21 21:27:44 +02:00
Billy Laws b7d6e0a416 ntdll: Add aarch64 DWARF register definitions. 2023-07-21 21:27:44 +02:00
Alexandre Julliard 59ee798d51 ntdll/tests: Use nameless unions/structs. 2023-07-20 21:48:39 +02:00
Paul Gofman 03c1930b74 server: Cancel pipe asyncs when the last handle in process is closed. 2023-07-20 21:48:39 +02:00
Paul Gofman f311bb5fba ntdll/tests: Add test for async cancel on pipe's last process handle close. 2023-07-20 21:48:39 +02:00