Alexandre Julliard
870340ee60
ntdll: Load libwine before the main image.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51018
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 20:08:48 +02:00
Alexandre Julliard
e436a40e80
ntdll: Don't bother setting the preloader range for fake dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 18:28:52 +02:00
Gijs Vermeulen
749f8c25e2
ntdll: Return STATUS_INFO_LENGTH_MISMATCH when len is too small in NtQueryObject(ObjectBasicInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50791
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Alexandre Julliard
828077e3b3
server: Pass the NT process flags to the new_process request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 12:07:51 +02:00
Alexandre Julliard
4e6da5942e
ntdll: Get rid of the rebuild_nt_name() helper.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard
7ef35b3393
ntdll: Reimplement file system redirection using NT pathname comparisons.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard
8e7c6422e5
ntdll: Move create_startup_info() to env.c.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
David Torok
11ae0ade89
ntdll: Add NtCreateThread stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50952
Signed-off-by: David Torok <dt@zeroitlab.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:34:35 +02:00
Alexandre Julliard
35cd411547
ntdll: Always pass object attributes to nt_to_unix_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard
90024e492d
ntdll: Move nt_to_unix_file_name_attr() to avoid forward declarations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard
060b28b9ba
ntdll: Allow a second backslash after the drive letter.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Paul Gofman
3386560057
ntdll: Remove wait timeout in get_thread_context().
...
Fixes hangs during loading or after campaign start in
Mount & Blade II: Bannerlord.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 17:39:13 +02:00
Zhiyi Zhang
14b4492086
ntdll: Initialize nt_name before using it.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50979
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:31 +02:00
Alexandre Julliard
405666b736
ntdll: Reject NT path names that are not in canonical form.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
302d44004e
ntdll: Reuse the Unix name buffer for get_dos_device().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
8ffb9b31d0
ntdll: Initialize version and session id on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
cdb1f3ae55
ntdll: Cleanup the path with collapse_path() in unix_to_nt_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Alexandre Julliard
f1e614027b
ntdll: Take loadorder into account also for a main exe in .so format.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50956
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 09:20:55 +02:00
Alistair Leslie-Hughes
3269da9b46
ntdll: Stub NtQuerySystemInformation(SystemCodeIntegrityInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49192
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 21:37:36 +02:00
Alexandre Julliard
16d70584db
ntdll: Don't close handles in APC requests sent to self.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50904
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 18:16:52 +02:00
Alexandre Julliard
446f7e3aa8
ntdll: Add a WINEBOOTSTRAPMODE environment variable to allow loading non-existent builtins.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50905
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 18:16:00 +02:00
Alexandre Julliard
7512c53b89
ntdll: Cache the main image section information.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50937
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 10:51:32 +02:00
Alexandre Julliard
89db25afda
ntdll: Check for DLL files when creating new processes.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50912
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Alexandre Julliard
7c0d6e8067
ntdll: Also fallback to native if builtin is for the wrong architecture.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:09 +02:00
Alexandre Julliard
2330a5860a
ntdll: Stop exporting wine_server_send_fd() and wine_server_release_fd().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Alexandre Julliard
985bd97c2b
ntdll: Retrieve Wine version strings through NtQuerySystemInformation().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Alexandre Julliard
7a1ed2e121
ntdll: Remove path from application name to open loadorder key.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50914
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-03 13:00:46 +02:00
Alexandre Julliard
7929b21ede
ntdll: Define NtCurrentTeb64() on 64-bit to avoid some #ifdefs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 12:25:21 +02:00
Alexandre Julliard
c00c62bbfd
ntdll: Create the initial stack on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 11:25:48 +02:00
Paul Gofman
51f7c9d15e
ntdll: Close server socket before calling exit().
...
So if a native exit handler hangs the process eventually gets killed by server.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Alexandre Julliard
8bcb44a99b
ntdll: Also check syswow64 to determine if the prefix was initialized.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 19:26:09 +02:00
Alexandre Julliard
afaf35b9e1
include: Add more SYSTEM_INFORMATION_CLASS definitions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Paul Gofman
084519a82b
ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation).
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Alexandre Julliard
c5b0dd5fc2
ntdll: Set the window title to the image name on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Alexandre Julliard
f55f0b8448
ntdll: Remove load_builtin_dll() and get_load_order() from the Unix interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:28 +02:00
Alexandre Julliard
4a10f3a188
ntdll: Allow using the .fake files from the build tree as PE mapping placeholders.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 10:06:44 +02:00
Alexandre Julliard
a3d9c487de
ntdll: Load builtin exe without a corresponding file only before the prefix is fully initialized.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:59:38 +02:00
Alexandre Julliard
726cf9c0eb
ntdll: Make sure the argv array matches the Unicode version, even when launching start.exe.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:56:32 +02:00
Alexandre Julliard
b12bf4d8d8
ntdll: Unmap main image even if not loaded at base address.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50874
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 12:19:59 +02:00
Alexandre Julliard
f17483b936
ntdll: Check the loadorder for .so dlls on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard
e8ec7a8cec
ntdll: Don't pass the application name to get_load_order().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard
4e2bd548b1
ntdll: Make the is_win64 variable global.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 14:48:34 +01:00
Alexandre Julliard
482a26e135
ntdll: Use the same builtin check for process creation and initial image loading.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 11:38:43 +01:00
Alexandre Julliard
9bdfb1f34a
ntdll: Set the initial DllPath to null if it's empty.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:07:04 +01:00
Alexandre Julliard
50e33a213d
ntdll: Use start /exec to support absolute Unix paths.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard
aef821ccbd
ntdll: Add a helper to launch start.exe always as builtin.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard
967100258f
ntdll: Check the main image for Unix path only the first time around.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard
47fed8f5bc
ntdll: Don't set the DllPath parameter by default.
...
Recent Windows versions don't set it either.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard
34884bf5d0
ntdll: Remove the no longer needed exec_process() function.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard
28fe84da45
ntdll: Load the main image from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard
662730a1bf
ntdll: Set the Wow64 environment variables from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Alexandre Julliard
ec5925a8a2
ntdll: Set the additional environment variables from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:50:50 +01:00
Alexandre Julliard
5246f34a3e
ntdll: Return an NT path for the initial current directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 17:42:20 +01:00
Zebediah Figura
d144890c88
ntdll: Hold fd_cache_section while removing and closing handles.
...
Otherwise, it's possible for the old handle to be re-added to the cache between
removing and closing it.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura
64cfcc1c62
ntdll: Remove the source fd from the cache before calling the dup_handle request.
...
If another thread creates and accesses a file between the dup_handle request and
the call to remove_fd_from_cache(), the file may be allocated to the same handle
number, and that thread will then receive the wrong unix fd. Avoid this race by
invalidating the cache first.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura
5df0f5f6fb
ntdll: Use a kernel APC to call NtDuplicateObject() if DUPLICATE_CLOSE_SOURCE is used on another process.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Alexandre Julliard
49f12d65d8
ntdll: Don't return an existing address when mapping a builtin PE dll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
cb14be78ff
ntdll: Move the builtin image checks to virtual_map_builtin_module().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
24a5a10142
ntdll: Replace image mapping by the builtin module directly in NtMapViewOfSection().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
5dcd3c1dd9
ntdll: Return the mapping size in virtual_map_builtin_module().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
20c4ae45ce
ntdll: Add refcounting for .so builtin dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Alexandre Julliard
89340bb762
ntdll: Load the Unix library only when __wine_init_unix_lib() is called.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Alexandre Julliard
cc9446f874
server: Don't change the reported machine for COM+ images.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50826
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 22:09:23 +01:00
Alexandre Julliard
74390cead3
ntdll: Add a global constant for the system directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 19:55:34 +01:00
Alexandre Julliard
86947587d2
server: Remove the redundant cpu field in the PE image information.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 11:49:23 +01:00
Alexandre Julliard
5cc6035284
ntdll: Add the builtin signature in .so file mappings.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard
e0fc8d7acb
ntdll: Call the Unix entry point from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard
22da5bd757
ntdll: Move the loadorder support to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard
9e38a68001
ntdll: Add a helper for mapping a PE image.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 11:01:19 +01:00
Alexandre Julliard
8824474e08
ntdll: Move the builtin dll list to virtual.c.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:58:14 +01:00
Hans Leidekker
e6407c39ba
ntdll: Fall back to reading /dev/urandom if getrandom() is not supported.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50168
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:45:59 +01:00
Alexandre Julliard
6531f262e3
server: Return the file name for image mappings in the get_mapping_info request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 11:02:20 +01:00
Alexandre Julliard
9107f591d3
ntdll: Explicitly reset the PATH variable before reloading the environment.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50786
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Rafał Harabień
77481d36d3
ntdll: Allow getting/setting x86_64 context of x86 processes in wine64.
...
WoW64 process has two separate contexts:
- x86 context used most of the time (e.g. by application code)
- x86_64 context used by system when it quits x86 emulation and jumps to
the kernel code
A notable exception are debug registers - their state is shared. Some
debuggers make use of that fact and sets/gets debug registers of x86
processes using x86_64 thread context.
Add support for setting and getting debug registers using x86_64
thread context. Getting other registers is allowed too and will return
values from x86 thread context.
Fixes hardware breakpoints in IDA 7.0 disassembler (x86_64 app) when
debugging x86 (32 bit) applications.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Rémi Bernon
0eb3258a69
ntdll: Initialize mountmgr_unix_drive before NtDeviceIoControlFile (valgrind).
...
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A1B: send_request (server.c:213)
by 0x46A5A1B: server_call_unlocked (server.c:273)
by 0x46CA54F: virtual_locked_server_call (virtual.c:2993)
by 0x4681C9A: server_ioctl_file (file.c:4789)
by 0x468B326: NtDeviceIoControlFile (file.c:5620)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1986)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1955)
by 0x468FCBB: NtQueryVolumeInformationFile (file.c:6483)
by 0x4677E88: __wine_syscall_dispatcher_xsave (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.so)
by 0x7BC0DEB3: NtQueryVolumeInformationFile (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.dll)
by 0x7B01F127: GetFileInformationByHandle (file.c:2938)
by 0x7096A5C3: _fstat64 (file.c:1791)
by 0x7096A941: _fstat64i32 (file.c:1877)
Address 0x7ffffe30e520 is in a rw- anonymous segment
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Rémi Bernon
c3c4d0c37e
ntdll: Initialize dbg_offset and dbg_size (valgrind).
...
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A0B: send_request (server.c:213)
by 0x46A5A0B: server_call_unlocked (server.c:273)
by 0x46A5B4F: wine_server_call (server.c:289)
by 0x46C996A: virtual_create_builtin_view (virtual.c:2524)
by 0x4692CB4: dlopen_dll (loader.c:1133)
by 0x46931CA: open_builtin_file (loader.c:1373)
by 0x46931CA: open_builtin_file (loader.c:1354)
by 0x4694559: load_builtin_dll (loader.c:1457)
by 0x7BC375F2: load_builtin_dll (loader.c:2348)
by 0x7BC38369: load_dll (loader.c:2705)
by 0x7BC39E46: import_dll (loader.c:782)
by 0x7BC36CEC: fixup_imports (loader.c:1138)
by 0x7BC3BE4B: LdrInitializeThunk (loader.c:3454)
Address 0x32e390 is on thread 1's stack
in frame #5 , created by open_builtin_file (loader.c:1357)
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Roman Pišl
dabba3cc86
ntdll: Don't set error status if volume serial number is missing.
...
Fixes regression from b14eee69c7
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50781
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Alexandre Julliard
0599347e96
ntdll: Launch wineboot from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard
d0a1bddea0
ntdll: Make sure we send valid object attributes in NtCreateUserProcess().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard
9443a7397d
ntdll: Predefine the SystemRoot and SystemDrive variables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard
f6e64c55f2
ntdll: Set environment variables from the registry on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:41:44 +01:00
Alexandre Julliard
e63b8ead43
ntdll: Add support for growing the initial environment dynamically.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:32:26 +01:00
Alexandre Julliard
16b0994412
ntdll: Make the open_hkcu_key() helper available globally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 10:42:35 +01:00
Alexandre Julliard
285830f5ec
ntdll: Add a helper to initialize a UNICODE_STRING on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 10:42:34 +01:00
Jacek Caban
e979ee96b6
ntdll: Use xsave compaction in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Jacek Caban
c715243122
ntdll: Fix a typo in SegSs handling in NtSetContextThread.
...
Spotted by Brendan Shanks.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Paul Gofman
633db76f78
ntdll: Reset YMM state in NtSetContextThread() if that is assumed by the context being set.
...
Fixes test failure on testbot where compaction is not supported
(resetting YMM state if that is implied by the context being set).
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Jacek Caban
af74bd3122
ntdll: Use syscall dispatcher to restore context in NtSetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:39 +01:00
Jacek Caban
e990bd4676
ntdll: Use syscall frame for handling x86 YMM context in NtSetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:08 +01:00
Jacek Caban
8064d9786a
ntdll: Use syscall frame for x86 YMM context in NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:03 +01:00
Jacek Caban
5d228d6fc9
ntdll: Store x86 YMM context insyscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:40:49 +01:00
Jacek Caban
6e03330a21
ntdll: Use syscall frame for FPU and XMM contexts in NtSetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
e5d671bee5
ntdll: Use syscall frame for FPU and XMM contexts in NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
ce5f17c892
ntdll: Store FPU and XMM contexts in x86 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
bbae70bf1e
ntdll: Use syscall frame in x86 call_raise_user_exception_dispatcher implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Alexandre Julliard
ff6a3433c5
ntdll: Store the locales in Wine-specific environment variables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:30:37 +01:00
Alexandre Julliard
65cff86951
ntdll: Remove no longer needed Unix codepage functions from the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:29:46 +01:00
Alexandre Julliard
0d173e5710
ntdll: Store the Unix codepage in a Wine-specific environment variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:24:54 +01:00
Alexandre Julliard
5828d7c136
ntdll: Adjust environment size for dynamic strings.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50732
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-27 17:42:50 +01:00
Jacek Caban
c88b2ed3c0
ntdll: Use cpu_info to check for AVX availability.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 18:26:23 +01:00
Alexandre Julliard
9e01af751e
ntdll: Don't set runtime info at all if it's empty.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:24:21 +01:00
Jacek Caban
35e43ccf1b
ntdll: Use syscall frame in x86 set_full_cpu_context implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:46:14 +01:00
Jacek Caban
b04f2689a2
ntdll: Store all non-volatile i386 registers in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:44:18 +01:00
Jacek Caban
c6d303ca23
ntdll: Reserve space for full i386 context in syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:43:19 +01:00
Alexandre Julliard
4dad4315d5
ntdll: Fix rounding the length of the runtime info parameter.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50723
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:39:21 +01:00
Alexandre Julliard
305cb8af27
ntdll: Initialize the ShowDotFiles option on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 16:15:26 +01:00
Alexandre Julliard
06b729f777
ntdll: Relocate the PE ntdll if necessary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 16:15:26 +01:00
Jacek Caban
aae2e2adf0
ntdll: Fix compacted legacy xsave area handling.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
7b95cdffa6
ntdll: Use the right cpuid for XSAVEC detection.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50713
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
014f249aea
ntdll: Don't use FeatureSet for XSAVE compaction support flag.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
43900dd621
ntdll: Use syscall frame in x86_64 call_raise_user_exception_dispatcher implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
a8856381ed
ntdll: Use xsavec in x86_64 syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:17 +01:00
Jacek Caban
437bef6ac1
ntdll: Use syscall dispatcher for restoring context in x86_64 NtSetContextThread implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:15 +01:00
Jacek Caban
b3dfc903ef
ntdll: Use NtContinue in NtRaiseException.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:10 +01:00
Jacek Caban
3ecd43dc6f
ntdll: Use syscall frames in x86_64 NtSetContextThread implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:07 +01:00
Jacek Caban
4de079bb72
ntdll: Use syscall frame for x86_64 YMM context in NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban
11e3d43c26
ntdll: Store x86_64 YMM context in syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban
a0a62463e3
ntdll: Introduce signal_init_syscalls.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Alexandre Julliard
3f3f673c29
ntdll: Print the version mismatch error from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 22:54:09 +01:00
Alexandre Julliard
37600028fc
ntdll: Check the prefer-native flag in the PE header for default load order.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 11:11:22 +01:00
Zebediah Figura
33a80885ce
ntdll: Fill the object type index in System(Extended)HandleInformation.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:18:51 +01:00
Zebediah Figura
1f1d4da5f6
ntdll: Fill the handle attributes in System(Extended)HandleInformation.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:18:39 +01:00
Michael Müller
835f5fff71
ntdll: Implement NtQuerySystemInformation(SystemExtendedHandleInformation).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:14:38 +01:00
Akihiro Sagawa
d6d99e59e3
ntdll: ObjectName should also be used in NtUnloadKey.
...
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 22:21:13 +01:00
Alexandre Julliard
6f7b56a198
server: Merge the various token information queries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 21:42:18 +01:00
Zebediah Figura
3c677c3f08
ntdll: Implement NtQueryInformationToken(TokenElevation).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 21:42:01 +01:00
Zebediah Figura
ec9244f056
ntdll: Implement NtQueryInformationToken(TokenLinkedToken).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 21:41:59 +01:00
Zebediah Figura
c96749790b
ntdll: Implement NtQueryInformationToken(TokenElevationType).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 16:28:13 +01:00
Jacek Caban
be8729c9f5
winebuild: Restore x86_64 FPU context and nonvolatile registers in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:47:28 +01:00
Jacek Caban
b817eb3ec8
ntdll: Use syscall frame for volatile registers in x64_64 NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:57 +01:00
Jacek Caban
f72940de8e
ntdll: Store segment registers in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:51 +01:00
Jacek Caban
4e5b61bb06
ntdll: Store stack pointer in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:34 +01:00
Jacek Caban
accf7a0908
ntdll: Store instruction pointer register in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:29 +01:00
Jacek Caban
9bdd02de0c
ntdll: Store eflags in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:14 +01:00
Jacek Caban
6d2f08cfcb
ntdll: Reserve space for all registers in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:11 +01:00
Jacek Caban
8f50dde9cd
ntdll: Store entire XMM context in x86_64 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:59:40 +01:00
Alexandre Julliard
58eceff167
ntdll: Don't use wine/server.h from the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:37 +01:00
Alexandre Julliard
c2c57e8dba
ntdll: Use the SECTION_IMAGE_INFORMATION bitfields where possible.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 21:20:47 +01:00
Alexandre Julliard
d3df2b12ce
server: Remove support for process-local handle tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 11:13:41 +01:00
Erich E. Hoover
1b48335762
ntdll: Allow NtQueryVolumeInformationFile to make async volume information queries.
...
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 16:09:08 +01:00
Erich E. Hoover
09c67c4809
ntdll: Use st_rdev for special devices in get_mountmgr_fs_info.
...
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 16:07:09 +01:00
Alexandre Julliard
0a6f070f5e
ntdll: Also set the dynamic environment strings in the initial parameters.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 15:53:14 +01:00
Alexandre Julliard
528f9d3217
ntdll: Set the initial environment and command line in the process parameters on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 15:10:52 +01:00
Alexandre Julliard
0d3972ce8a
ntdll: Allocate the initial process parameters on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 12:30:28 +01:00
Alexandre Julliard
9ce326eea0
server: Store a filename for memory views of .so dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-15 12:24:15 +01:00
Brendan Shanks
b79b158d6b
ntdll: Always use MAP_FAILED as mmap()'s error value.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 14:41:56 +01:00
Alexandre Julliard
3472387777
server: Implement NtQueryVirtualMemory(MemorySectionName).
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 16:30:18 +01:00
Alexandre Julliard
3bb5381587
server: Return the NT name for the ProcessImageFileName query.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 18:15:03 +01:00
Alexandre Julliard
9e255ba4e0
ntdll: Pass the NT name in the set_fd_name_info request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 13:40:56 +01:00
Alexandre Julliard
76b3284388
ntdll: Pass the NT name in the create_file request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 13:29:57 +01:00
Alexandre Julliard
d7bdd5a554
ntdll: Pass the full NT path name to load_builtin_dll().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 13:23:17 +01:00
Alexandre Julliard
a3c92a02cc
server: Get the process entry point from the exe image info.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 12:10:49 +01:00
Alexandre Julliard
52d733b5c4
server: Implement retrieving the debug object of a process.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 12:09:44 +01:00
Zebediah Figura
be98f67f10
ntdll: Check the output buffer length in NtAccessCheck().
...
Based on a patch by Qian Hong.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:09:25 +01:00
Zebediah Figura
d14cf677b5
ntdll: Do not touch the privilege output buffers if access_check fails.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:09:23 +01:00
Zebediah Figura
bdc10c65ca
ntdll: Always return at least sizeof(PRIVILEGE_SET) in NtAccessCheck().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 11:09:21 +01:00
Alexandre Julliard
b6f774df69
server: Add a request to return all object types.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Alexandre Julliard
4d646de90d
server: Add generic mapping masks for all object types.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Sebastian Lackner
43de1407e9
ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Alexandre Julliard
dc4e881834
server: Add support for object counts in the object type information.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 23:11:22 +01:00
Alexandre Julliard
928a22cd02
server: Add a data type for generic access mappings.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 21:25:32 +01:00
Zebediah Figura
690a069918
ntdll: Treat '>' the same as '?' in match_filename().
...
They differ in strange ways, as the tests show, but the basic behaviour of '>' is similar to '?'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22635
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:15:37 +01:00
Alexandre Julliard
d514c64a8c
server: Move the ldt_copy pointer to the init_first_thread request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:26:20 +01:00
Alexandre Julliard
44699c324f
server: Add a separate request to initialize the first thread of a process.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:22:56 +01:00
Alexandre Julliard
7999af8244
ntdll: Implement NtWaitForDebugEvent().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 16:48:09 +01:00
Alexandre Julliard
c8f5cced47
ntdll: Implement NtDebugContinue().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:22:23 +01:00
Alexandre Julliard
7bebf7db8c
ntdll: Implement NtSetInformationDebugObject().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:10:06 +01:00
Alexandre Julliard
46b84e7a83
ntdll: Implement NtDebugActiveProcess() and NtRemoveProcessDebug().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:09:01 +01:00
Alexandre Julliard
11e6f1007c
ntdll: Pass a debug object in the new_process request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:08:44 +01:00
Alexandre Julliard
964772bc8e
ntdll: Support the NtCreateDebugObject() flags.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-29 12:34:46 +01:00
Alexandre Julliard
5ebc20c656
ntdll: Implement NtCreateDebugObject().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 11:23:11 +01:00
Alexandre Julliard
5ff2b7d98f
server: Get rid of the exe_file parameter in the new_process request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 16:38:56 +01:00
Alexandre Julliard
ced3892c65
ntdll: Create a SEC_IMAGE view also for .so builtins.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 16:38:56 +01:00
Alexandre Julliard
6b90b96e21
ntdll: Fill the image information data also for .so builtins.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 16:38:56 +01:00
Alexandre Julliard
5fef775ddf
ntdll: Delay mapping a module until we have found the final one to load.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-23 16:50:35 +01:00
Alexandre Julliard
63b6295368
ntdll: Check for valid architecture before mapping the module.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-23 11:30:55 +01:00
Alexandre Julliard
7250f9a95b
ntdll: Add some more section information data.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 18:33:23 +01:00
Alexandre Julliard
e0dbdaac64
ntdll: Support more Dwarf pointer types.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Alexandre Julliard
fc7c3b51ac
ntdll: Always inline NtCurrentTeb() on ARM.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Daniel Lehman
6a971e8429
ntdll: Check event type on creation.
...
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Jacek Caban
46a81fa966
ntdll: Honour alertable argument in NtContinue.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:24 +01:00
Alexandre Julliard
37c24eabc7
ntdll: Support Thumb mode in signal handling.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 13:25:18 +01:00
Alexandre Julliard
54cd0e9187
ntdll: Make inline asm compatible with Thumb-2.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 13:24:14 +01:00
Gabriel Ivăncescu
22dba3f0fb
ntdll: Do not override existing context's RAX when dispatching user APC on x86_64.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-08 22:02:13 +01:00
Gabriel Ivăncescu
775dac0238
ntdll: Do not override existing context's EAX when dispatching user APC.
...
Fixes a regression introduced by 175a3649ba
,
which caused Winamp's in_wave module to crash when playing a wav file
(the previous behavior only changed EAX when there was no context).
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-08 20:58:30 +01:00
Paul Gofman
8b8ddffa21
ntdll: Preserve syscall frame when calling async IO system APC.
...
The frame can currently be reset from ws2_32.dll async IO callbacks
which are still in the user part and are calling 'syscall' functions.
If the user APC is processed after that during the same call to
server_select(), the call_user_apc_dispatcher() faults.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49782
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-23 22:07:50 +01:00
Paul Gofman
175a3649ba
ntdll: Always copy context in call_user_apc_dispatcher() on x86.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-22 21:25:34 +01:00
Alexandre Julliard
cdaa72c728
ntdll: Only reset the Unix current directory on removable devices.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49545
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-18 15:21:37 +01:00
Paul Gofman
71a43335ab
ntdll: Save unwind information in KiUserApcDispatcher() on x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-17 10:35:46 +01:00
Paul Gofman
c72f52d7cc
ntdll: Always copy context in call_user_apc_dispatcher() on x64.
...
Currently, if call_user_apc_dispatcher() is called with nonzero context,
there is no guarantee that the provided context is stored above the
rsp = context_ptr->Rsp - (sizeof(CONTEXT) + offsetof(frame,ret_addr))
being set.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-17 10:26:52 +01:00
Paul Gofman
0643a4fdce
ntdll: Remove unwind registers save space from struct stack_layout on x64.
...
The unwind space used right below the context's Rsp and can currently
potentially overlap with xstate.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 11:07:07 +01:00
Alex Henrie
7c61b303eb
ntdll: Remove unnecessary call to strlen from get_dos_device.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-11 21:47:15 +01:00
Paul Gofman
0fde203cac
ntdll: Don't set xstate in context if xstate features are not supported.
...
Fixes a regression reproducible on CPUs without XSAVE support introduced
by 419abd49a1
.
The regression commit erroneously assumes that if XSAVE is not supported
then the host signal context won't have xsave data set up.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50271
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-11 21:47:15 +01:00
Alexandre Julliard
6ddd6e836c
ntdll: Support the Android Java %fs register being a GDT selector.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 22:25:59 +01:00
Alexandre Julliard
758e75cc46
libwine: Move the Android JNI initialization to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 22:25:59 +01:00
Alexandre Julliard
99ef6faf76
ntdll: Don't use the main exe path as bindir on Android.
...
The main exe can be the JVM host process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 12:41:20 +01:00
Paul Gofman
183a8cf380
ntdll: Restore non-volatile registers in call_user_exception_dispatcher() on x86_64.
...
Required to correctly restore non-volatile registers during unwind.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-07 22:35:29 +01:00
Akihiro Sagawa
22612bcff5
ntdll: Add a timezone mapping rule for North Korea Standard Time.
...
Otherwise, another UTC+9 timezone matches to the timezone.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50213
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 13:43:07 +01:00
Damjan Jovanovic
6d829f2baf
ntdll: Fix backward compatibility for struct link_map on FreeBSD.
...
Checking for the _rtld_version_laddr_offset symbol only works when
header and library versions match. Checking for the offset of l_addr
instead lets us use the older header with the new library too.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:20 +01:00
Rémi Bernon
141c55a72d
ntdll: Initialize local variable (valgrind).
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 19:01:56 +01:00
Alexandre Julliard
4e6c1dff58
ntdll: Avoid closing an invalid handle on process creation failure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 15:57:07 +01:00
Alexandre Julliard
baec5f1eca
ntdll: Store the syscall dispatcher also in the WOW32Reserved TEB field.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Alexandre Julliard
b636f9816f
krnl386: Move the 16-bit stack out of the WOW32Reserved field.
...
Based on a patch by Sebastian Lackner.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Alexandre Julliard
043489456c
ntdll: Make x86_64 syscall thunks position independent.
...
Based on a patch by Paul Gofman.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:19 +01:00
Erich E. Hoover
773b97bb2b
ntdll: Fix converting large 32-bit time_t when time_t is signed.
...
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 22:09:30 +01:00
Kevin Puetz
029ec25e54
ntdll: Don't access empty IMAGE_FILE_IMPORT_DIRECTORY.
...
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 16:53:52 +01:00
Rémi Bernon
ad24187de8
ntdll: Stub ThreadEnableAlignmentFaultFixup info class.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46216
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Paul Gofman
03cebb22d8
ntdll: Fix SMT CPU flag reporting.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Paul Gofman
2002aa15f4
ntdll: Avoid overwriting parameters with context in call_user_apc_dispatcher() on x86.
...
Fixes crash in 32 bit kernel32 file test. The crash is not always reproducible
as the issue depends on stack layout.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 21:16:43 +01:00
David Torok
74f95d9ff2
ntdll: Add NtDebugActiveProcess stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47198
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 21:06:18 +01:00
Damjan Jovanovic
2f90b17ab2
ntdll: Document a few other filesystem case-sensitivity cases.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
eba4f333b9
ntdll: Treat smbfs as case-insensitive on FreeBSD.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
9ba13fbca6
ntdll: Msdosfs was case-insensitive since FreeBSD 8 or even earlier.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
d1c8611886
ntdll: FAT filesystems are called "msdosfs" on FreeBSD >= 5.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
4e6621f3a6
ntdll: Fix wrong return values in get_dir_case_sensitivity_stat().
...
It should be returning TRUE (= case sensitive) on failure as case
sensitive is the safe assumption, but some returns are FALSE on
failure and even TRUE when case insensitive. Fix that.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
bf8da00ee0
ntdll: Improve character device type detection on FreeBSD and macOS.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Damjan Jovanovic
a563f584f5
ntdll: Implement get_thread_times() on FreeBSD.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Brendan Shanks
f40195cd92
dbghelp: Use PEB->CloudFileFlags instead of PEB->Reserved for debug base address.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50077
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +01:00
Zebediah Figura
ebd92b980a
ntdll: Semi-stub SystemModuleInformationEx.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45666
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:32 +01:00
Zebediah Figura
6257da8b42
ntdll: Don't check "info" for NULL in NtQuerySystemInformation(SystemModuleInformation).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:25 +01:00
Myah Caron
d453db5ba2
ntdll: Stub NtAllocateVirtualMemoryEx.
...
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:34:19 +01:00
Zebediah Figura
ab1469597a
ntdll: Stub NtQuerySystemInformation(SystemExtendedProcessInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46870
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:27:44 +01:00
Joachim Priesner
e533a26dcf
ntdll: Fix read buffer overflow in find_file_in_dir().
...
Signed-off-by: Joachim Priesner <joachim.priesner@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Alexandre Julliard
54c31d5332
ntdll: Make NtGetNlsSectionPtr() into a proper Nt syscall.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:01 +02:00
Paul Gofman
419abd49a1
ntdll: Support AVX registers for other thread in Nt{Get|Set}ContextThread().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:30:05 +02:00
Paul Gofman
53f7cb3c08
ntdll: Always align stack in call_user_apc_dispatcher() on x86_64.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49860
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 11:31:39 +02:00
Sven Baars
973b0e1dfc
ntdll: Fix a memory leak (Valgrind).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49904
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:54:23 +02:00
Martin Storsjo
dcf3874e00
ntdll: Restore the original Lr value when unwinding through raise_func_trampoline on arm64.
...
When a signal is raised in a leaf function (that hasn't backed up
the Lr register itself), we need to restore both Pc and Lr separately.
This doesn't seem to be possible via libunwind, so add a special case
unwinding rule for this function.
As we have a special case for the function, we could also just as well
skip normal dwarf unwinding for this function altogether and just
restore the full context from the stack.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 12:33:31 +02:00
Alexandre Julliard
0167e195e9
ntdll: Fix handle/module confusion in Unix module loading.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 15:38:08 +02:00
Alexandre Julliard
7cec3dc284
ntdll: Use the standard code path to load ntdll.dll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard
20e0fd6e99
ntdll: Delay ntdll.dll loading until more initialization is done.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard
e055a3ee05
configure: Require 64-bit compare-and-swap support from gcc.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49191
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 17:03:57 +02:00
Michael Müller
d0bea3d702
server: Implement support for creating a process with a specified token.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:21:43 +02:00
Michael Müller
8c5638aa5e
ntdll: Implement NtFilterToken.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:58:10 +02:00
Nikolay Sivov
c58a10c163
server: Implement inherited handles list.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 14:04:45 +02:00
Alexandre Julliard
9c8dce2155
ntdll: Don't lock mutexes during process exit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:28:41 +02:00
Alexandre Julliard
d8f7d54573
ntdll: Add inline wrappers for pthread mutex locking.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:28:25 +02:00
Jacek Caban
54e117018c
kernelbase: Use conhost to handle Unix consoles.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban
0957f9302c
ntdll: Fill console size in get_initial_console.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban
6bcc1b9225
ntdll: Pass RTL_USER_PROCESS_PARAMETERS to get_initial_console.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Alexandre Julliard
a014f413d6
ntdll: Add support for loading a Unix helper library from builtin dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 13:41:28 +02:00
Sven Baars
123a4a884f
ntdll: Fix some memory leaks (Valgrind).
...
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 12:57:37 +02:00
Alexandre Julliard
2eed0cdb8f
include: Don't use IsBadStringPtr in debug functions for Unix libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 15:13:42 +02:00
Stefan Dösinger
4d33a0410e
ntdll: Use the MacOS file handle limit workaround from libs/wine/loader.c.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49624
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Alexandre Julliard
3cd3b77522
ntdll: Update argc when changing process name.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49834
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Hans Leidekker
ec02224941
ntdll: Return buffer filled with random values from NtQuerySystemInformation(SystemInterruptInformation).
...
Based on a patch by Sebastian Lackner.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Alexandre Julliard
cc9d69b20b
ntdll: Pop the Unix stack completely in call_user_apc_dispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 21:16:49 +02:00
Martin Storsjo
5bbd8130ad
ntdll: Don't truncate SP in arm64 handle_syscall_fault.
...
This seems to be a copypaste typo from 0b3db9dfa2
.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:42:18 +02:00
Martin Storsjo
d99a454a6b
ntdll: Fix arm64 regression from "Clear the syscall frame on return".
...
The restoring of registers in call_user_exception_dispatcher
was broken in 75e616d52b
.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:42:15 +02:00
Alexandre Julliard
2d91f7def1
ntdll: Load libwine dynamically.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 12:30:41 +02:00
Alexandre Julliard
4e80f2ea5e
ntdll: Add a helper function to try an mmap at a fixed address.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:54:17 +02:00
Alexandre Julliard
72b97eeba0
ntdll: Add a helper function for memory allocations through mmap().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:52:11 +02:00
Alexandre Julliard
74deee7df0
ntdll: Add a helper function for fixed anonymous mmaps.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:51:09 +02:00
Paul Gofman
30e5250622
ntdll: Implement saving AVX registers in NtGetContextThread().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:04 +02:00
Alexandre Julliard
5b4b877488
ntdll: Move the reserved area functions to avoid forward declarations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Alexandre Julliard
7b96e82fd5
ntdll: Make the reserved area functions static.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Alexandre Julliard
4c45348f78
ntdll: Get rid of the exec_process() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:24:01 +02:00
Alexandre Julliard
f51cd0a1b5
ntdll: Use the process parameters directly in exec_process().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:09:33 +02:00
Alexandre Julliard
52e9baddbc
ntdll: Move the NT path conversion for exec process to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 14:46:14 +02:00
Alexandre Julliard
9e973954fd
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
This time without setting Eip to 0.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 18:40:08 +02:00
Alexandre Julliard
c2c330532e
ntdll: Call the process entry point through RtlUserThreadStart().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
2b9a0550bc
Revert "ntdll: Get rid of the server_init_process_done() Unix library callback."
...
This partially reverts commit 1581fb619b
.
Steam wants Eip to be valid even before LdrInitializeThunk.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 21:08:45 +02:00
Alexandre Julliard
75e616d52b
ntdll: Clear the syscall frame on return instead of popping the previous one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:14:35 +02:00
Alexandre Julliard
65c37cee24
ntdll: Use exported APIs instead of virtual_map_section() to load PE modules.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 14:16:54 +02:00
Alexandre Julliard
1581fb619b
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 13:04:09 +02:00
Alexandre Julliard
a8ddcf7dfe
ntdll: Use syscalls for a couple of Wine internal functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Alexandre Julliard
af1a328fa0
ntdll: Use syscalls for the Wine version functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Alexandre Julliard
482b64effd
ntdll: Use syscalls for the file path conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:57:19 +02:00
Alexandre Julliard
4e5811637a
ntdll: Use syscalls for the server functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:55:40 +02:00
Alexandre Julliard
97847eeee8
ntdll: Avoid referencing winecrt0 exception handlers from the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
6844ff8a0b
ntdll: Stop resolving imports for the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
0b3db9dfa2
ntdll: Handle page faults happening during a syscall without dispatching the exception.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:46:22 +02:00
Zebediah Figura
8bd95a80f2
ntdll: Read the condition variable and manipulate the lock on the PE side.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49712
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:17:04 +02:00
Paul Gofman
601175822e
ntdll: Restore AVX registers in NtSetContextThread() on i386.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:39 +02:00
Paul Gofman
9aa885bf37
ntdll: Support AVX context in fault exceptions on Linux i386.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman
2c3719c7a9
ntdll: Restore AVX registers in NtSetContextThread() on x86_64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman
16ed88a952
ntdll: Support AVX context in fault exceptions on Linux x86_64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Martin Storsjo
5b3842451b
include: Update ARM64 context flag definitions to match current SDKs.
...
CONTEXT_FLOATING_POINT should be included in CONTEXT_FULL, and
there's a new flag CONTEXT_ARM64_X18 (not available without
the arch specific prefix) that only is part of CONTEXT_ALL.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:01:56 +02:00
Paul Gofman
de1cb029f6
include: Define _XSAVE_FORMAT structure.
...
The structure is defined for both x86_64 and i386 (along with
M128A) in (newer) Windows SDK.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:38 +02:00
Paul Gofman
25d4c50db3
ntdll: Remove redundant ldmxcsr in set_full_cpu_context() on x86_64.
...
Mxcsr will be overwritten anyway by consequent fxrstor.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:26 +02:00
Alexandre Julliard
77fbf3a9fd
ntdll: Unwind the syscall frame in NtSetContextThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
a686759f1d
ntdll: Unwind the syscall frame when calling KiUserApcDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
53e0bf2f9f
ntdll: Don't expect LdrInitializeThunk() to return to the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Paul Gofman
f332f2e4e2
ntdll: Don't transfer xmm registers explicitly during context save and restore on x64.
...
fxsave / fxrstor already do that.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:16:57 +02:00
Paul Gofman
525e7078a8
ntdll: Report newer vector processor features on x86 / x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:15:45 +02:00
Martin Storsjo
8f3bd63b52
ntdll: Fix arm64 sigcontext access for darwin.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:33:39 +02:00
Martin Storsjo
7f8224411c
ntdll: Fix the arm64 use of libunwind for macOS.
...
MacOS uses the LLVM libunwind, which doesn't expose quite as much
internals of the cursor as GNU libunwind, and uses slightly different
names for the arch specific register enums (for get/set registers).
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:33:34 +02:00
Martin Storsjo
cffd06ea67
ntdll: Trust libunwind's returned pc value on arm64.
...
Use this instead of manually copying LR to PC. With GNU libunwind,
both registers are equal after unw_step.
With the LLVM libunwind (which Apple uses), the return address isn't
reflected at all in LR, only in UNW_REG_IP.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:32:27 +02:00
Martin Storsjo
e8f2c2464a
ntdll: Only call putenv() if we are going to call exec().
...
If we aren't going to exec (if pre_exec() returns zero), we will
continue using the envp pointer we got from the caller. However,
the putenv() call does update the environment, and this can in
some cases overwrite the array that the old (stale, potentially
dangling) envp pointer points to.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:02 +02:00
Alexandre Julliard
9b7f14f1b4
ntdll: Unwind the syscall frame when calling KiRaiseUserExceptionDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Alexandre Julliard
1e7e21534e
ntdll: Unwind the syscall frame when calling KiUserExceptionDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Alexandre Julliard
13abe9e2bd
ntdll/tests: Run exception tests under the debugger on all platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Alexandre Julliard
7a71f98640
ntdll: Use KiUserApcDispatcher() to call user APCs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 19:31:24 +02:00
Mikołaj Zalewski
9014dae8fb
ntdll: Return from Thumb to ARM mode after assembling raise_func_trampoline_thumb.
...
Without it, Raspbian gcc thinks the next function
(raise_func_trampoline_arm) is in Thumb and will create its own
trampoline to to execute it as Thumb (bad).
Signed-off-by: Mikołaj Zalewski <mikolaj@zalewski.pl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:39:48 +02:00
Brendan Shanks
f7895ef25a
ntdll: Generate "system boot information" SMBIOS table.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 22:52:03 +02:00
Brendan Shanks
734a7120b6
ntdll: Add additional fields to generated SMBIOS chassis info table.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 22:52:00 +02:00
Brendan Shanks
d29c33a35c
ntdll: Add additional fields to generated SMBIOS baseboard info table.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 22:51:57 +02:00
Alexandre Julliard
1d3e3a1c8d
ntdll: Avoid importing RtlEnterCriticalSection/RtlLeaveCriticalSection from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-05 15:28:31 +02:00
Brendan Shanks
2b76b9f234
ntdll: End generated SMBIOS tables with the end-of-table structure.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 22:08:13 +02:00
Brendan Shanks
0720c6cfd0
ntdll: Use unique handle numbers in generated SMBIOS tables.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-04 22:08:11 +02:00