Compare commits

..

26 Commits
v8.18 ... v8.21

Author SHA1 Message Date
Alistair Leslie-Hughes
e546e2f1e3 Release v8.21 2023-11-25 15:29:41 +11:00
Alistair Leslie-Hughes
234289ffd8 Rebase against 13c43cf3d06178dc39d98981f55d27e3cbd79ad0. 2023-11-25 13:08:00 +11:00
Alistair Leslie-Hughes
52219e1eef Rebase against e04c976fa95776300ee5b485a6b65c0071d3bb84.
Sync to latest code - macos issue
2023-11-24 20:06:01 +11:00
Alistair Leslie-Hughes
d5bf5c5e7d Updatred vkd3d-latest patchset
Fix for macos build.  Squished update into one.
2023-11-24 19:40:14 +11:00
Alistair Leslie-Hughes
d1eba8eddd Updated vkd3d-latest patchset 2023-11-24 19:14:11 +11:00
Alistair Leslie-Hughes
8717caf994 Rebase against 9b9f7a007786b32a4c80f69ceb6753acdc8c2091. 2023-11-23 09:53:41 +11:00
Alistair Leslie-Hughes
6278681370 Rebase against c64aa0006e4a33d755a57a693cd81dc1ed95fa9d. 2023-11-17 11:20:22 +11:00
Alistair Leslie-Hughes
a101f89071 Rebase against b0ad8b8cfb6e664cc6cfdd87ddb28af077149417. 2023-11-16 11:07:12 +11:00
Alistair Leslie-Hughes
e278be7a45 Rebase against 137638e185e9302602bcd9cc796d7bcfa03caee5. 2023-11-15 15:40:46 +11:00
Alistair Leslie-Hughes
f32f8c62ac Release v8.20 2023-11-11 22:04:12 +11:00
Alistair Leslie-Hughes
284d054923 Updated vkd3d-latest patchset 2023-11-11 09:57:14 +11:00
Alistair Leslie-Hughes
88c8c3688e Rebase against 3a8d71041c159d76a76856867caa1de8ca297151. 2023-11-11 09:42:35 +11:00
Alistair Leslie-Hughes
e26a92bace Updated vkd3d-latest patchset 2023-11-07 16:14:23 +11:00
Zebediah Figura
0c217b7048 Rebase against b1bd72343e49f68e42b4493055b1f5de9796d335. 2023-11-06 17:23:28 -06:00
Zebediah Figura
c02c8b8c25 patchinstall.py: Force applying with --whitespace=warn. 2023-11-04 12:08:26 -05:00
Alistair Leslie-Hughes
9150a8751e Rebase against cb4939eb0ebfe24d6a818e3de060363a58ef9535. 2023-11-04 14:20:40 +11:00
Alistair Leslie-Hughes
aeddc191a7 Rebase against a3209daea543104fbfac5900bf9ec0c05a0a43fc. 2023-11-02 14:01:32 +11:00
Alistair Leslie-Hughes
753c2c9012 Rebase against 0170cd3a4c67bd99291234dd8e0d638a824d7715. 2023-11-01 12:11:07 +11:00
Alistair Leslie-Hughes
28a14dc978 Rebase against 28210162472459d2afe57e638e2f50ee37f2b63f. 2023-10-31 10:54:56 +11:00
Alistair Leslie-Hughes
c6e61e267a Release v8.19 2023-10-30 08:49:23 +11:00
Alistair Leslie-Hughes
519fde9b1a Updated vkd3d-latest patchset 2023-10-30 07:33:57 +11:00
Alistair Leslie-Hughes
e9a4c9a06f Updated fltmgr.sys-FltBuildDefaultSecurityDescriptor patchset 2023-10-30 07:33:57 +11:00
Alistair Leslie-Hughes
28180a60fd Rebase against 6391b8d5c99c206689c6e55a675b51086d8be821. 2023-10-19 09:21:42 +11:00
Alistair Leslie-Hughes
9486ca2543 Rebase against 0c7a09cb1f92d55d8381ff6460e13ed085d434db. 2023-10-18 08:56:48 +11:00
Alistair Leslie-Hughes
7d2672183d Rebase against de66ea9df6746917cada71d2c27b5cc38cbdd2f0. 2023-10-17 10:12:05 +11:00
Alistair Leslie-Hughes
3dcd383186 Remove Whitespace noise 2023-10-16 11:21:36 +11:00
52 changed files with 23014 additions and 13764 deletions

View File

@@ -1,38 +1,17 @@
From 81a36b530261731d6020e09770237ae5bf58166d Mon Sep 17 00:00:00 2001
From ebe00ceb4f2d24f2611dbec87486d6597a3466a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 2 May 2014 20:46:19 +0200
Subject: [PATCH] user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
---
dlls/user32/tests/msg.c | 2 ++
dlls/win32u/message.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
dlls/win32u/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 4519da6962d..304a3b87f46 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -10709,6 +10709,7 @@ static void test_timers(void)
start = GetTickCount();
while (GetTickCount()-start < 1001 && GetMessageA(&msg, info.hWnd, 0, 0))
DispatchMessageA(&msg);
+todo_wine
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|| broken(abs(count-64) <= TIMER_COUNT_TOLERANCE) /* most common */
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w2k3, win8 */,
@@ -10779,6 +10780,7 @@ static void test_timers_no_wnd(void)
start = GetTickCount();
while (GetTickCount()-start < 1001 && GetMessageA(&msg, NULL, 0, 0))
DispatchMessageA(&msg);
+todo_wine
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|| broken(abs(count-64) <= TIMER_COUNT_TOLERANCE) /* most common */
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w1064v1809 */,
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c
index d00178e6aa4..513150a3d61 100644
index d2909339983..337d4a2cc1d 100644
--- a/dlls/win32u/message.c
+++ b/dlls/win32u/message.c
@@ -170,7 +170,7 @@ UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIME
@@ -3975,7 +3975,7 @@ UINT_PTR WINAPI NtUserSetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC
if (proc) winproc = alloc_winproc( (WNDPROC)proc, TRUE );
@@ -42,5 +21,5 @@ index d00178e6aa4..513150a3d61 100644
SERVER_START_REQ( set_win_timer )
{
--
2.35.1
2.42.0

View File

@@ -18,7 +18,7 @@ index 8778b66138b..94d8fd4da00 100644
@@ -1 +1,4 @@
MODULE = d3d12core.dll
+
+C_SRCS = \
+SOURCES = \
+ d3d12core_main.c
diff --git a/dlls/d3d12core/d3d12core.spec b/dlls/d3d12core/d3d12core.spec
index c9c73bd4ee4..3f3e0a0f2e1 100644

View File

@@ -1,4 +1,4 @@
From d51057f7c91016d2c6f5c3b21d201f86d7c085b5 Mon Sep 17 00:00:00 2001
From 9d274e6d152c3f3961212f3cbd71dc8f14641367 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Oct 2014 05:06:06 +0200
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
@@ -9,7 +9,7 @@ Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index 3657fa7db12..c8114677bc6 100644
index 152ef80611a..06ebb65e2af 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -2,7 +2,7 @@ MODULE = dbghelp.dll
@@ -19,10 +19,10 @@ index 3657fa7db12..c8114677bc6 100644
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="L\"${bindir}\""
C_SRCS = \
SOURCES = \
coff.c \
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index a2a60752a68..a2bca11048f 100644
index 5ada8c70c9b..a9a6303c8d7 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1457,6 +1457,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,

View File

@@ -70,7 +70,7 @@ index 80556e96787..b3b63d7b361 100644
}
+ if (This->pick_record_size > 0)
+ heap_free(This->pick_records);
+ free(This->pick_records);
+
TRACE("Releasing render target %p.\n", This->rt_iface);
rt_iface = This->rt_iface;
@@ -353,7 +353,7 @@ index 13e639eda3f..bb050fe16b8 100644
+ {
+ if (device->pick_record_size == 0) device->pick_record_size = 1;
+ device->pick_record_size *= 2;
+ device->pick_records = heap_realloc(device->pick_records,
+ device->pick_records = realloc(device->pick_records,
+ sizeof(*device->pick_records) * device->pick_record_size);
+ }
+

View File

@@ -1,154 +0,0 @@
From d32988c911aae73ec81242cd8f6ae37e078d212f Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 2 Dec 2022 14:41:30 +1100
Subject: [PATCH] dmime: Implement IDirectMusicSegment8 Download
---
dlls/dmime/dmime_private.h | 1 +
dlls/dmime/performance.c | 7 ++++
dlls/dmime/segment.c | 84 +++++++++++++++++++++++++++++++++++++-
3 files changed, 91 insertions(+), 1 deletion(-)
diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h
index c35c52eb066..ca8323fc525 100644
--- a/dlls/dmime/dmime_private.h
+++ b/dlls/dmime/dmime_private.h
@@ -72,6 +72,7 @@ extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSo
extern HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time,
IDirectMusicSegmentState **ret_iface);
+extern IDirectSound *get_dsound_interface(IDirectMusicPerformance8*);
/*****************************************************************************
* Auxiliary definitions
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 9f293358ca6..3658c16c187 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -251,6 +251,13 @@ static inline struct performance *impl_from_IDirectMusicPerformance8(IDirectMusi
return CONTAINING_RECORD(iface, struct performance, IDirectMusicPerformance8_iface);
}
+IDirectSound *get_dsound_interface(IDirectMusicPerformance8* iface)
+{
+ struct performance *This = impl_from_IDirectMusicPerformance8(iface);
+ return This->dsound;
+}
+
+
/* IDirectMusicPerformance8 IUnknown part: */
static HRESULT WINAPI performance_QueryInterface(IDirectMusicPerformance8 *iface, REFIID riid, void **ret_iface)
{
diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
index af7729f34b9..284564749df 100644
--- a/dlls/dmime/segment.c
+++ b/dlls/dmime/segment.c
@@ -54,6 +54,7 @@ struct segment
PCMWAVEFORMAT wave_format;
void *wave_data;
int data_size;
+ IDirectSoundBuffer *buffer;
};
static struct segment *segment_create(void);
@@ -114,6 +115,8 @@ static ULONG WINAPI segment_Release(IDirectMusicSegment8 *iface)
track_entry_destroy(entry);
}
+ if (This->buffer)
+ IDirectSoundBuffer_Release(This->buffer);
if (This->wave_data)
free(This->wave_data);
@@ -533,8 +536,87 @@ static HRESULT WINAPI segment_Compose(IDirectMusicSegment8 *iface, MUSIC_TIME mt
static HRESULT WINAPI segment_Download(IDirectMusicSegment8 *iface, IUnknown *audio_path)
{
struct segment *This = impl_from_IDirectMusicSegment8(iface);
+ IDirectMusicPerformance8 *perf;
+ IDirectMusicAudioPath *audio;
+ IDirectSound *dsound;
+ HRESULT hr;
+ DSBUFFERDESC dsbd = {.dwSize = sizeof(dsbd)};
+ void *data;
+ DWORD size;
+ DWORD buffer = 0;
+
TRACE("(%p, %p)\n", This, audio_path);
- return IDirectMusicSegment8_SetParam(iface, &GUID_DownloadToAudioPath, -1, DMUS_SEG_ALLTRACKS, 0, audio_path);
+
+ if (!audio_path)
+ return E_INVALIDARG;
+
+ hr = IDirectMusicSegment8_SetParam(iface, &GUID_DownloadToAudioPath, -1, DMUS_SEG_ALLTRACKS, 0, audio_path);
+ if (FAILED(hr))
+ return hr;
+
+ if (This->buffer)
+ {
+ TRACE("Using Cached buffer\n");
+ return S_OK;
+ }
+
+ /* pAudioPath can either be IDirectMusicAudioPath or IDirectMusicPerformance */
+ hr = IUnknown_QueryInterface(audio_path, &IID_IDirectMusicPerformance8, (void**)&perf);
+ if (FAILED(hr))
+ {
+ TRACE("Checking for IDirectMusicAudioPath interface\n");
+ hr = IUnknown_QueryInterface(audio_path, &IID_IDirectMusicAudioPath, (void**)&audio);
+ if (FAILED(hr))
+ {
+ WARN("Cannot query for IDirectMusicAudioPath\n");
+ return E_INVALIDARG;
+ }
+
+ IDirectMusicAudioPath_GetObjectInPath(audio, DMUS_PCHANNEL_ALL, DMUS_PATH_PERFORMANCE, buffer, &GUID_NULL,
+ 0, &IID_IDirectMusicPerformance, (void**)&perf);
+ IDirectMusicAudioPath_Release(audio);
+ }
+
+ if (!perf)
+ {
+ ERR("Failed to get IDirectMusicPerformance interface\n");
+ return E_INVALIDARG;
+ }
+
+ dsound = get_dsound_interface(perf);
+ if (!dsound)
+ {
+ ERR("Failed get_dsound_interface\n");
+ return E_INVALIDARG;
+ }
+
+ if (This->data_size == 0)
+ {
+ FIXME("No wave data skipping\n");
+ return S_OK;
+ }
+
+ dsbd.dwBufferBytes = This->data_size;
+ dsbd.lpwfxFormat = (WAVEFORMATEX*)&This->wave_format;
+
+ hr = IDirectSound_CreateSoundBuffer(dsound, &dsbd, &This->buffer, NULL);
+ if (FAILED(hr))
+ {
+ ERR("IDirectSound_CreateSoundBuffer failed 0x%08lx\n", hr);
+ return E_INVALIDARG;
+ }
+
+ TRACE("CreateSoundBuffer successful\n");
+
+ hr = IDirectSoundBuffer_Lock(This->buffer, 0, This->data_size, &data, &size, NULL, 0, 0);
+ TRACE("IDirectSoundBuffer_Lock hr 0x%08lx\n", hr);
+
+ memcpy(data, This->wave_data, This->data_size);
+
+ hr = IDirectSoundBuffer_Unlock(This->buffer, data, This->data_size, NULL, 0);
+ TRACE("IDirectSoundBuffer_Unlock hr 0x%08lx\n", hr);
+
+ return S_OK;
}
static HRESULT WINAPI segment_Unload(IDirectMusicSegment8 *iface, IUnknown *audio_path)
--
2.42.0

View File

@@ -1,67 +0,0 @@
From b9c561a99b7034e3cac64ab85e4d50a6fb0c304c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 12 Dec 2022 15:20:10 +1100
Subject: [PATCH] dmime: Play a sound in IDirectMusicPerformance8 PlaySegmentEx
---
dlls/dmime/dmime_private.h | 1 +
dlls/dmime/performance.c | 6 ++++++
dlls/dmime/segment.c | 6 ++++++
3 files changed, 13 insertions(+)
diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h
index ca8323fc525..2b4537233fc 100644
--- a/dlls/dmime/dmime_private.h
+++ b/dlls/dmime/dmime_private.h
@@ -73,6 +73,7 @@ extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSo
extern HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time,
IDirectMusicSegmentState **ret_iface);
extern IDirectSound *get_dsound_interface(IDirectMusicPerformance8*);
+extern IDirectSoundBuffer *get_segment_buffer(IDirectMusicSegment8 *iface);
/*****************************************************************************
* Auxiliary definitions
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 3658c16c187..14831e72ba3 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -1078,6 +1078,7 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
IDirectMusicSegmentState *state;
IDirectMusicSegment *segment;
HRESULT hr;
+ IDirectSoundBuffer *buffer;
FIXME("(%p, %p, %s, %p, %#lx, %I64d, %p, %p, %p): stub\n", This, source, debugstr_w(segment_name),
transition, segment_flags, start_time, segment_state, from, audio_path);
@@ -1096,6 +1097,11 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
IDirectMusicSegmentState_AddRef(state);
}
+ buffer = get_segment_buffer(segment);
+
+ if (segment)
+ hr = IDirectSoundBuffer_Play(buffer, 0, 0, 0);
+
IDirectMusicSegmentState_Release(state);
IDirectMusicSegment_Release(segment);
return hr;
diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
index 284564749df..af76258c979 100644
--- a/dlls/dmime/segment.c
+++ b/dlls/dmime/segment.c
@@ -64,6 +64,12 @@ static inline struct segment *impl_from_IDirectMusicSegment8(IDirectMusicSegment
return CONTAINING_RECORD(iface, struct segment, IDirectMusicSegment8_iface);
}
+IDirectSoundBuffer *get_segment_buffer(IDirectMusicSegment8 *iface)
+{
+ struct segment *This = impl_from_IDirectMusicSegment8(iface);
+ return This->buffer;
+}
+
static HRESULT WINAPI segment_QueryInterface(IDirectMusicSegment8 *iface, REFIID riid, void **ret_iface)
{
struct segment *This = impl_from_IDirectMusicSegment8(iface);
--
2.42.0

View File

@@ -1,14 +0,0 @@
Fixes: [48220] dmime: Handle basic loading of Wave files and playing them.
Fixes: [61322] dmine: No Sound in Black Rockman Shooter.
Fixes: [34751] dmime: Aura: Fate of the Ages: sounds aren't played, but music works fine
Fixes: [9027] dmime: No sound for rise of nations - all versions.
Disabled: True
# Also
# - Cloning Clyde demo
# Doesnt fix
# The following are known not to work, at the moment.
# [31586] : Myst sounds (Voices)
# [30969] : Tron 2.0 Background music
# [32896] : Serious Sam: The Random Encounter

View File

@@ -1,4 +1,4 @@
From d4094baaba721220b0a81170d1f9e6c276dae4ae Mon Sep 17 00:00:00 2001
From 05ebaac121b440567aa88de7a77d0ef19a8d9242 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 12:09:22 -0500
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
@@ -16,10 +16,10 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
create mode 100644 dlls/ntdll/unix/esync.h
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index f8ca3e689ec..82af2152595 100644
index 74e6da5bb56..a2b498759a9 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -47,6 +47,7 @@ C_SRCS = \
@@ -48,6 +48,7 @@ SOURCES = \
unix/cdrom.c \
unix/debug.c \
unix/env.c \
@@ -345,7 +345,7 @@ index 00000000000..a50a755149a
+
+extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 5b8b6962b4a..92855f7cccc 100644
index 42b5aa9d84e..974a3624a28 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -87,6 +87,7 @@
@@ -354,9 +354,9 @@ index 5b8b6962b4a..92855f7cccc 100644
#include "unix_private.h"
+#include "esync.h"
#include "wine/list.h"
#include "ntsyscalls.h"
#include "wine/debug.h"
@@ -2055,6 +2056,7 @@ static void start_main_thread(void)
@@ -1811,6 +1812,7 @@ static void start_main_thread(void)
signal_alloc_thread( teb );
dbg_init();
startup_info_size = server_init_process();
@@ -365,7 +365,7 @@ index 5b8b6962b4a..92855f7cccc 100644
init_cpu_info();
init_files();
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
index 227784448d3..99563e43cc3 100644
index 7211457387c..cd8dbbdcc10 100644
--- a/dlls/ntdll/unix/server.c
+++ b/dlls/ntdll/unix/server.c
@@ -103,7 +103,7 @@ sigset_t server_block_set; /* signals to block during server calls */
@@ -377,7 +377,7 @@ index 227784448d3..99563e43cc3 100644
/* atomically exchange a 64-bit value */
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
@@ -907,7 +907,7 @@ void wine_server_send_fd( int fd )
@@ -918,7 +918,7 @@ void wine_server_send_fd( int fd )
*
* Receive a file descriptor passed from the server.
*/
@@ -387,7 +387,7 @@ index 227784448d3..99563e43cc3 100644
struct iovec vec;
struct msghdr msghdr;
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index d1e4e5ee111..b5299c323e3 100644
index bfbcaf4a851..f21ceb80298 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -63,6 +63,7 @@
@@ -421,5 +421,5 @@ index 35b4833fd4c..75ef586df30 100644
int do_esync(void)
{
--
2.40.1
2.42.0

View File

@@ -1,7 +1,7 @@
From 2a8ffcea70c41f013660d2b6168ab694c70246c0 Mon Sep 17 00:00:00 2001
From 8caf8262a8ae8b5f0275172a62d807240d86968d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 29 Aug 2021 13:26:53 +1000
Subject: [PATCH] fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor
Subject: [PATCH 1/3] fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
@@ -45,7 +45,7 @@ index 39ce6798178..8943b9f85cf 100644
@ stub FltGetBottomInstance
@ stub FltGetContexts
diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c
index e1016a4989c..68f242ab8e8 100644
index e1016a4989c..9a85f4b6c82 100644
--- a/dlls/fltmgr.sys/main.c
+++ b/dlls/fltmgr.sys/main.c
@@ -23,7 +23,6 @@
@@ -132,9 +132,8 @@ index e1016a4989c..68f242ab8e8 100644
+
+void WINAPI FltFreeSecurityDescriptor(PSECURITY_DESCRIPTOR descriptor)
+{
+ RtlFreeHeap(GetProcessHeap(), 0, descriptor);
+ ExFreePool(descriptor);
+}
\ No newline at end of file
diff --git a/include/ddk/fltkernel.h b/include/ddk/fltkernel.h
index 49c9d55dbaa..e5483d5a3fa 100644
--- a/include/ddk/fltkernel.h
@@ -150,5 +149,5 @@ index 49c9d55dbaa..e5483d5a3fa 100644
NTSTATUS WINAPI FltRegisterFilter(PDRIVER_OBJECT, const FLT_REGISTRATION *, PFLT_FILTER *);
NTSTATUS WINAPI FltStartFiltering(PFLT_FILTER);
--
2.40.1
2.42.0

View File

@@ -1,4 +1,4 @@
From 9cb5114cbf5af7c360ffb653fc286b8bf9e21db3 Mon Sep 17 00:00:00 2001
From c1af142bac149b296b2dea06cd99c13e0f8814c9 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 30 Aug 2021 15:15:35 +1000
Subject: [PATCH 2/3] fltmgr.sys: Create import library
@@ -9,7 +9,7 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
1 file changed, 1 insertion(+)
diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in
index bb1f34b4896..5540df35d6a 100644
index ae0e812cb22..ae02da9b5d6 100644
--- a/dlls/fltmgr.sys/Makefile.in
+++ b/dlls/fltmgr.sys/Makefile.in
@@ -1,4 +1,5 @@
@@ -19,5 +19,5 @@ index bb1f34b4896..5540df35d6a 100644
IMPORTS = ntoskrnl
--
2.40.1
2.42.0

View File

@@ -1,4 +1,4 @@
From 8d12d4dac0cbc7194d11e398b4d3371bef8a1952 Mon Sep 17 00:00:00 2001
From c69247afcbd83af223f471342c67bc06deeffda0 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 30 Aug 2021 15:16:06 +1000
Subject: [PATCH] ntoskrnl.exe: Add FltBuildDefaultSecurityDescriptor test
@@ -6,11 +6,11 @@ Subject: [PATCH] ntoskrnl.exe: Add FltBuildDefaultSecurityDescriptor test
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/ntoskrnl.exe/tests/Makefile.in | 2 +-
dlls/ntoskrnl.exe/tests/driver.c | 65 +++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 1 deletion(-)
dlls/ntoskrnl.exe/tests/driver.c | 81 +++++++++++++++++++++++++++++
2 files changed, 82 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/tests/Makefile.in b/dlls/ntoskrnl.exe/tests/Makefile.in
index ab1db85adbb..9c89e44e70a 100644
index f610df6a947..97dee8b25cf 100644
--- a/dlls/ntoskrnl.exe/tests/Makefile.in
+++ b/dlls/ntoskrnl.exe/tests/Makefile.in
@@ -1,7 +1,7 @@
@@ -23,10 +23,10 @@ index ab1db85adbb..9c89e44e70a 100644
driver2_IMPORTS = winecrt0 ntoskrnl hal
driver2_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index c8797e8d8e0..168b47941e8 100644
index ea4bd03ee44..844a181472c 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -32,6 +32,7 @@
@@ -36,6 +36,7 @@
#include "ddk/ntddk.h"
#include "ddk/ntifs.h"
#include "ddk/wdm.h"
@@ -34,7 +34,7 @@ index c8797e8d8e0..168b47941e8 100644
#include "driver.h"
@@ -2372,6 +2373,69 @@ static void test_default_modules(void)
@@ -2393,6 +2394,85 @@ static void test_default_modules(void)
ok(dxgmms1, "Failed to find dxgmms1.sys\n");
}
@@ -47,10 +47,17 @@ index c8797e8d8e0..168b47941e8 100644
+ PACL acl = NULL;
+ PACCESS_ALLOWED_ACE ace;
+ SID_IDENTIFIER_AUTHORITY auth = { SECURITY_NULL_SID_AUTHORITY };
+ PSID sid1, sid2;
+ SID_IDENTIFIER_AUTHORITY authwine7 = { SECURITY_NT_AUTHORITY };
+ PSID sid1, sid2, sidwin7;
+ BOOL ret;
+
+ status = FltBuildDefaultSecurityDescriptor(&sd, STANDARD_RIGHTS_ALL);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ if (status != STATUS_SUCCESS)
+ {
+ win_skip("Skipping FltBuildDefaultSecurityDescriptor tests\n");
+ return;
+ }
+ ok(sd != NULL, "Failed to return descriptor\n");
+
+ status = RtlGetGroupSecurityDescriptor(sd, &group, &isdefault);
@@ -67,10 +74,17 @@ index c8797e8d8e0..168b47941e8 100644
+ ok(acl->AceCount == 2, "got %d\n", acl->AceCount);
+
+ sid1 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(2));
+ RtlInitializeSid(sid1, &auth, 2);
+ status = RtlInitializeSid(sid1, &auth, 2);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ *RtlSubAuthoritySid(sid1, 0) = SECURITY_BUILTIN_DOMAIN_RID;
+ *RtlSubAuthoritySid(sid1, 1) = DOMAIN_GROUP_RID_ADMINS;
+
+ sidwin7 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(2));
+ status = RtlInitializeSid(sidwin7, &authwine7, 2);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ *RtlSubAuthoritySid(sidwin7, 0) = SECURITY_BUILTIN_DOMAIN_RID;
+ *RtlSubAuthoritySid(sidwin7, 1) = DOMAIN_ALIAS_RID_ADMINS;
+
+ sid2 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(1));
+ RtlInitializeSid(sid2, &auth, 1);
+ *RtlSubAuthoritySid(sid2, 0) = SECURITY_LOCAL_SYSTEM_RID;
@@ -83,7 +97,8 @@ index c8797e8d8e0..168b47941e8 100644
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
+
+ ok(RtlEqualSid(sid1, (PSID)&ace->SidStart), "SID not equal\n");
+ ret = RtlEqualSid(sid1, (PSID)&ace->SidStart) || RtlEqualSid(sidwin7, (PSID)&ace->SidStart);
+ ok(ret, "SID not equal\n");
+
+ /* SECURITY_LOCAL_SYSTEM_RID */
+ status = RtlGetAce(acl, 1, (void**)&ace);
@@ -93,7 +108,8 @@ index c8797e8d8e0..168b47941e8 100644
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
+
+ ok(RtlEqualSid(sid2, (PSID)&ace->SidStart), "SID not equal\n");
+ ret = RtlEqualSid(sid2, (PSID)&ace->SidStart) || RtlEqualSid(sidwin7, (PSID)&ace->SidStart);
+ ok(ret, "SID not equal\n");
+
+ ExFreePool(sid1);
+ ExFreePool(sid2);
@@ -104,7 +120,7 @@ index c8797e8d8e0..168b47941e8 100644
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
{
void *buffer = irp->AssociatedIrp.SystemBuffer;
@@ -2417,6 +2481,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
@@ -2438,6 +2518,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_process_memory(test_input);
test_permanence();
test_driver_object_extension();
@@ -113,5 +129,5 @@ index c8797e8d8e0..168b47941e8 100644
IoMarkIrpPending(irp);
IoQueueWorkItem(work_item, main_test_task, DelayedWorkQueue, irp);
--
2.40.1
2.42.0

View File

@@ -1,40 +1,38 @@
From c62655b9d54ce8b692bd84d41abe09cc40ae10e1 Mon Sep 17 00:00:00 2001
From f76d5c65c07a184d56a9be4e8f77fa92886bb309 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 5 Sep 2016 15:31:29 +0200
Subject: [PATCH] inseng: Implement CIF reader and download functions.
FIXME: Needs splitting.
---
dlls/inseng/Makefile.in | 7 +-
dlls/inseng/Makefile.in | 4 +-
dlls/inseng/icif.c | 1745 ++++++++++++++++++++++++++++++++++
dlls/inseng/inf.c | 443 +++++++++
dlls/inseng/inseng.spec | 4 +-
dlls/inseng/inseng_main.c | 990 ++++++++++++++++++-
dlls/inseng/inseng_main.c | 989 ++++++++++++++++++-
dlls/inseng/inseng_private.h | 79 ++
include/inseng.idl | 276 +++++-
7 files changed, 3490 insertions(+), 54 deletions(-)
7 files changed, 3488 insertions(+), 52 deletions(-)
create mode 100644 dlls/inseng/icif.c
create mode 100644 dlls/inseng/inf.c
create mode 100644 dlls/inseng/inseng_private.h
diff --git a/dlls/inseng/Makefile.in b/dlls/inseng/Makefile.in
index 0217203791a..ba2388c97ed 100644
index 40eda55661a..72fa3533930 100644
--- a/dlls/inseng/Makefile.in
+++ b/dlls/inseng/Makefile.in
@@ -1,8 +1,11 @@
@@ -1,8 +1,10 @@
MODULE = inseng.dll
-IMPORTS = uuid ole32 advapi32
+IMPORTS = uuid ole32 advapi32 urlmon shlwapi
EXTRADLLFLAGS = -Wb,--prefer-native
-C_SRCS = inseng_main.c
+C_SRCS = \
SOURCES = \
+ icif.c \
+ inf.c \
+ inseng_main.c
IDL_SRCS = inseng_classes.idl
inseng_classes.idl \
inseng_main.c
diff --git a/dlls/inseng/icif.c b/dlls/inseng/icif.c
new file mode 100644
index 00000000000..27f6f6dfd93
@@ -2249,7 +2247,7 @@ index 82c0b4d5fe1..7ae46fad3a7 100644
+@ stdcall GetICifRWFileFromFile(ptr str)
@ stub PurgeDownloadDirectory
diff --git a/dlls/inseng/inseng_main.c b/dlls/inseng/inseng_main.c
index c72a12955b8..87d11472ff0 100644
index f7ce3f173c2..81eb1ec4f13 100644
--- a/dlls/inseng/inseng_main.c
+++ b/dlls/inseng/inseng_main.c
@@ -2,6 +2,7 @@
@@ -2260,7 +2258,7 @@ index c72a12955b8..87d11472ff0 100644
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -28,17 +29,68 @@
@@ -28,16 +29,68 @@
#include "winuser.h"
#include "ole2.h"
#include "rpcproxy.h"
@@ -2272,7 +2270,6 @@ index c72a12955b8..87d11472ff0 100644
+#include "inseng_private.h"
+
#include "wine/debug.h"
-#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(inseng);
@@ -2330,7 +2327,7 @@ index c72a12955b8..87d11472ff0 100644
};
static inline InstallEngine *impl_from_IInstallEngine2(IInstallEngine2 *iface)
@@ -46,6 +98,250 @@ static inline InstallEngine *impl_from_IInstallEngine2(IInstallEngine2 *iface)
@@ -45,6 +98,250 @@ static inline InstallEngine *impl_from_IInstallEngine2(IInstallEngine2 *iface)
return CONTAINING_RECORD(iface, InstallEngine, IInstallEngine2_iface);
}
@@ -2581,7 +2578,7 @@ index c72a12955b8..87d11472ff0 100644
static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFIID riid, void **ppv)
{
InstallEngine *This = impl_from_IInstallEngine2(iface);
@@ -59,13 +355,16 @@ static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFII
@@ -58,13 +355,16 @@ static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFII
}else if(IsEqualGUID(&IID_IInstallEngine2, riid)) {
TRACE("(%p)->(IID_IInstallEngine2 %p)\n", This, ppv);
*ppv = &This->IInstallEngine2_iface;
@@ -2600,7 +2597,7 @@ index c72a12955b8..87d11472ff0 100644
return S_OK;
}
@@ -86,181 +385,726 @@ static ULONG WINAPI InstallEngine_Release(IInstallEngine2 *iface)
@@ -85,181 +385,726 @@ static ULONG WINAPI InstallEngine_Release(IInstallEngine2 *iface)
TRACE("(%p) ref=%ld\n", This, ref);
@@ -2610,9 +2607,9 @@ index c72a12955b8..87d11472ff0 100644
+ if (This->icif)
+ ICifFile_Release(This->icif);
+
+ heap_free(This->baseurl);
+ heap_free(This->downloaddir);
heap_free(This);
+ free(This->baseurl);
+ free(This->downloaddir);
free(This);
+ }
return ref;
@@ -3363,7 +3360,7 @@ index c72a12955b8..87d11472ff0 100644
InstallEngine_QueryInterface,
InstallEngine_AddRef,
InstallEngine_Release,
@@ -290,6 +1134,70 @@ static const IInstallEngine2Vtbl InstallEngine2Vtbl = {
@@ -289,6 +1134,70 @@ static const IInstallEngine2Vtbl InstallEngine2Vtbl = {
InstallEngine2_GetICifFile
};
@@ -3434,12 +3431,12 @@ index c72a12955b8..87d11472ff0 100644
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
{
*ppv = NULL;
@@ -334,12 +1242,14 @@ static HRESULT WINAPI InstallEngineCF_CreateInstance(IClassFactory *iface, IUnkn
@@ -333,12 +1242,14 @@ static HRESULT WINAPI InstallEngineCF_CreateInstance(IClassFactory *iface, IUnkn
TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
- engine = heap_alloc(sizeof(*engine));
+ engine = heap_alloc_zero(sizeof(*engine));
- engine = malloc(sizeof(*engine));
+ engine = calloc(1, sizeof(*engine));
if(!engine)
return E_OUTOFMEMORY;
@@ -3862,5 +3859,5 @@ index 8a3f4c4d270..82927418a99 100644
+cpp_quote("HRESULT WINAPI GetICifFileFromFile(ICifFile **, const char *);")
+cpp_quote("HRESULT WINAPI GetICifRWFileFromFile(ICifRWFile **, const char *);")
--
2.34.1
2.42.0

View File

@@ -1,4 +1,4 @@
From 281a1753e7a075b7b3bdbba2692a1da5bec081f3 Mon Sep 17 00:00:00 2001
From b98e363f0809d5f5092854eb3ab207a908bf6bd8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 30 Mar 2015 04:01:51 +0200
Subject: [PATCH] mountmgr.sys: Write usable device paths into
@@ -11,14 +11,14 @@ Based on a patch by Bernhard Ăśbelacker.
---
dlls/mountmgr.sys/device.c | 4 ++--
dlls/mountmgr.sys/mountmgr.c | 11 +++++++++--
dlls/mountmgr.sys/mountmgr.h | 3 ++-
3 files changed, 13 insertions(+), 5 deletions(-)
dlls/mountmgr.sys/mountmgr.h | 2 +-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index 8fd9dc0757e..f40f70b06d7 100644
index 1ee82e92c97..58db9284ff3 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -1045,8 +1045,8 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive,
@@ -1051,8 +1051,8 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive,
id = disk_device->unix_mount;
id_len = strlen( disk_device->unix_mount ) + 1;
}
@@ -30,10 +30,10 @@ index 8fd9dc0757e..f40f70b06d7 100644
return STATUS_SUCCESS;
}
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 9f72eedb33b..19cb71b4eb6 100644
index ad3c034fe0f..52bc6536693 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -46,14 +46,21 @@ struct mount_point
@@ -44,14 +44,21 @@ struct mount_point
static struct list mount_points_list = LIST_INIT(mount_points_list);
static HKEY mount_key;
@@ -58,18 +58,17 @@ index 9f72eedb33b..19cb71b4eb6 100644
else mount->id_len = 0;
}
diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h
index 143401e3b9b..bad875dd9bc 100644
index b1de312dffb..d7b7fad5c76 100644
--- a/dlls/mountmgr.sys/mountmgr.h
+++ b/dlls/mountmgr.sys/mountmgr.h
@@ -108,6 +108,7 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD
@@ -108,6 +108,6 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD
extern struct mount_point *add_volume_mount_point( DEVICE_OBJECT *device, UNICODE_STRING *device_name,
const GUID *guid ) DECLSPEC_HIDDEN;
extern void delete_mount_point( struct mount_point *mount ) DECLSPEC_HIDDEN;
-extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len ) DECLSPEC_HIDDEN;
+
+extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len, int drive ) DECLSPEC_HIDDEN;
const GUID *guid );
extern void delete_mount_point( struct mount_point *mount );
-extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len );
+extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len, int drive );
#endif /* __WINE_MOUNTMGR_H */
--
2.38.1
2.42.0

View File

@@ -1,4 +1,4 @@
From e11874a28a68cd3cd9c031f475d59435d94aa3fc Mon Sep 17 00:00:00 2001
From b26ba4d86df312d28bc2422ed1e544b058e4aacd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 8 Sep 2020 18:43:52 +0200
Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60.
@@ -16,7 +16,7 @@ Update from Gijs Vermeulen <gijsvrm@gmail.com>
8 files changed, 915 insertions(+), 16 deletions(-)
diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in
index 2bf789732da..e2d737599b1 100644
index 7e59a223143..5044c4e2c79 100644
--- a/dlls/msxml3/Makefile.in
+++ b/dlls/msxml3/Makefile.in
@@ -1,5 +1,5 @@
@@ -25,7 +25,7 @@ index 2bf789732da..e2d737599b1 100644
+IMPORTS = $(XSLT_PE_LIBS) $(XML2_PE_LIBS) uuid urlmon shlwapi oleaut32 ole32 user32 advapi32 rtworkq
EXTRAINCL = $(XSLT_PE_CFLAGS) $(XML2_PE_CFLAGS)
C_SRCS = \
SOURCES = \
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
index 243ee379712..323c7b49848 100644
--- a/dlls/msxml3/factory.c
@@ -1101,5 +1101,5 @@ index 7396826a1f6..b2d8bd3b337 100644
helpstring("XML DOM Document 6.0"),
progid("Msxml2.DOMDocument.6.0"),
--
2.41.0
2.42.0

View File

@@ -1,4 +1,4 @@
From af5cd4a865337f9e37ad3e8548e325fcb0f51d54 Mon Sep 17 00:00:00 2001
From 4dd82c635bcf8c2c7d070d6c5786787ff2d7d887 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 5 Aug 2017 03:38:38 +0200
Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection /
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection /
1 file changed, 34 insertions(+)
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 34af6b780cf..27de37d5b88 100644
index a7967a6c242..8b088f9d3c3 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -26,6 +26,7 @@
@@ -28,6 +28,7 @@
#include "winnt.h"
#include "winternl.h"
#include "unixlib.h"
@@ -20,9 +20,9 @@ index 34af6b780cf..27de37d5b88 100644
#include "wine/asm.h"
#define DECLARE_CRITICAL_SECTION(cs) \
@@ -88,6 +89,39 @@ extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, va_list args ) DECLSPEC_HIDDEN;
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, va_list args ) DECLSPEC_HIDDEN;
@@ -94,6 +95,39 @@ extern struct _KUSER_SHARED_DATA *user_shared_data;
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, va_list args );
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, va_list args );
+/* inline version of RtlEnterCriticalSection */
+static inline void enter_critical_section( RTL_CRITICAL_SECTION *crit )
@@ -61,5 +61,5 @@ index 34af6b780cf..27de37d5b88 100644
{
ULONG size;
--
2.33.0
2.42.0

View File

@@ -1,4 +1,4 @@
From 5f029b7fcffc7b537a02523dc793ec2b4069390a Mon Sep 17 00:00:00 2001
From a97f56374e65a2c1edb0d9b2bbd6ca433e598aca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:30:27 +0200
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
2 files changed, 117 insertions(+)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 2c9e97d7fc7..9a538edf7ab 100644
index ec6f2d5c6a7..654a83c92f9 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -28,6 +28,7 @@
@@ -20,7 +20,7 @@ index 2c9e97d7fc7..9a538edf7ab 100644
#include "wine/test.h"
#include "delayloadhandler.h"
@@ -4205,6 +4206,79 @@ static void test_Wow64Transition(void)
@@ -4207,6 +4208,79 @@ static void test_Wow64Transition(void)
debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR)));
}
@@ -100,7 +100,7 @@ index 2c9e97d7fc7..9a538edf7ab 100644
START_TEST(loader)
{
int argc;
@@ -4286,6 +4360,7 @@ START_TEST(loader)
@@ -4288,6 +4362,7 @@ START_TEST(loader)
test_InMemoryOrderModuleList();
test_LoadPackagedLibrary();
test_wow64_redirection();
@@ -109,10 +109,10 @@ index 2c9e97d7fc7..9a538edf7ab 100644
test_dll_file( "kernel32.dll" );
test_dll_file( "advapi32.dll" );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index d548ecea944..95ed846dc10 100644
index f1ec6848f56..60e219e9f6b 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -132,6 +132,9 @@ struct file_id
@@ -133,6 +133,9 @@ struct file_id
BYTE ObjectId[16];
};
@@ -122,7 +122,7 @@ index d548ecea944..95ed846dc10 100644
/* internal representation of loaded modules */
typedef struct _wine_modref
{
@@ -501,6 +504,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
@@ -548,6 +551,33 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
}
}
@@ -156,7 +156,7 @@ index d548ecea944..95ed846dc10 100644
/*************************************************************************
* get_modref
*
@@ -1475,7 +1505,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1522,7 +1552,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
@@ -169,7 +169,7 @@ index d548ecea944..95ed846dc10 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -2153,6 +2188,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
@@ -2214,6 +2249,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -177,7 +177,7 @@ index d548ecea944..95ed846dc10 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3830,6 +3866,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3896,6 +3932,7 @@ static void free_modref( WINE_MODREF *wm )
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -185,15 +185,15 @@ index d548ecea944..95ed846dc10 100644
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -4205,6 +4242,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
ANSI_STRING ctrl_routine = RTL_CONSTANT_STRING( "CtrlRoutine" );
@@ -4275,6 +4312,7 @@ void loader_init( CONTEXT *context, void **entry )
MEMORY_BASIC_INFORMATION meminfo;
WINE_MODREF *kernel32;
PEB *peb = NtCurrentTeb()->Peb;
+ unsigned int i;
NtQueryVirtualMemory( GetCurrentProcess(), LdrInitializeThunk, MemoryBasicInformation,
&meminfo, sizeof(meminfo), NULL );
@@ -4223,6 +4261,10 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
@@ -4293,6 +4331,10 @@ void loader_init( CONTEXT *context, void **entry )
RtlSetBits( peb->TlsBitmap, 0, NtCurrentTeb()->WowTebOffset ? WOW64_TLS_MAX_NUMBER : 1 );
RtlSetBits( peb->TlsBitmap, NTDLL_TLS_ERRNO, 1 );
@@ -205,5 +205,5 @@ index d548ecea944..95ed846dc10 100644
load_global_options();
version_init();
--
2.40.1
2.42.0

View File

@@ -1,4 +1,4 @@
From 3242c225381a5beb2690402b8e37179bb9f3e71f Mon Sep 17 00:00:00 2001
From fa493586583e4dd534b01b72812c7ab79c0aecca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 00:50:50 +0100
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
2 files changed, 81 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in
index 90deb5865f8..428ebde23b3 100644
index 3ca77a03053..7508e1ad796 100644
--- a/dlls/ntdll/tests/Makefile.in
+++ b/dlls/ntdll/tests/Makefile.in
@@ -1,5 +1,5 @@
@@ -17,10 +17,10 @@ index 90deb5865f8..428ebde23b3 100644
-IMPORTS = user32 advapi32
+IMPORTS = user32 ole32 advapi32
C_SRCS = \
SOURCES = \
atom.c \
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index 117d9eed067..1255ad93dd8 100644
index 88f62b0b588..8ca339dde0f 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -29,6 +29,9 @@
@@ -53,7 +53,7 @@ index 117d9eed067..1255ad93dd8 100644
pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification");
pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification");
}
@@ -3609,6 +3618,76 @@ static void test_RtlFirstFreeAce(void)
@@ -3611,6 +3620,76 @@ static void test_RtlFirstFreeAce(void)
HeapFree(GetProcessHeap(), 0, acl);
}
@@ -130,7 +130,7 @@ index 117d9eed067..1255ad93dd8 100644
static void test_RtlInitializeSid(void)
{
SID_IDENTIFIER_AUTHORITY sid_ident = { SECURITY_NT_AUTHORITY };
@@ -3688,6 +3767,7 @@ START_TEST(rtl)
@@ -3690,6 +3769,7 @@ START_TEST(rtl)
test_RtlInitializeCriticalSectionEx();
test_RtlLeaveCriticalSection();
test_LdrEnumerateLoadedModules();
@@ -139,5 +139,5 @@ index 117d9eed067..1255ad93dd8 100644
test_LdrRegisterDllNotification();
test_DbgPrint();
--
2.40.1
2.42.0

View File

@@ -182,7 +182,7 @@ index 0204139631f..117c238cf44 100644
+ sigaction(SIGSYS, sig_act, NULL);
+
+ frame->syscall_flags = syscall_flags;
+ frame->syscall_table = KeServiceDescriptorTable;
+
+
+ test_syscall = mmap((void *)0x600000000000, 0x1000, PROT_EXEC | PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON, -1, 0);

View File

@@ -1,4 +1,4 @@
From 3986e2d381e2b78d0bc572b7014f2445aa4bc6fd Mon Sep 17 00:00:00 2001
From 8846243fcf799dc8a439aba399ccbb412c263de8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 4 Oct 2014 02:53:22 +0200
Subject: [PATCH] ntdll: Setup a temporary signal handler during process
@@ -15,10 +15,10 @@ Subject: [PATCH] ntdll: Setup a temporary signal handler during process
7 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 3cde6b726a2..f4a20d052c8 100644
index fdda50575d1..f7afa327391 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -2398,6 +2398,8 @@ void __wine_main( int argc, char *argv[], char *envp[] )
@@ -2129,6 +2129,8 @@ DECLSPEC_EXPORT void __wine_main( int argc, char *argv[], char *envp[] )
#endif
virtual_init();
@@ -28,10 +28,10 @@ index 3cde6b726a2..f4a20d052c8 100644
#ifdef __APPLE__
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c
index 28cb2222809..b3b55a11e4f 100644
index f255328fc73..798f683c5bd 100644
--- a/dlls/ntdll/unix/signal_arm.c
+++ b/dlls/ntdll/unix/signal_arm.c
@@ -1566,6 +1566,12 @@ void signal_init_process(void)
@@ -1605,6 +1605,12 @@ void signal_init_process(void)
exit(1);
}
@@ -45,10 +45,10 @@ index 28cb2222809..b3b55a11e4f 100644
/***********************************************************************
* call_init_thunk
diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c
index d98268bcd54..2b92bbd7ed3 100644
index 0208913010d..188c8fc205c 100644
--- a/dlls/ntdll/unix/signal_arm64.c
+++ b/dlls/ntdll/unix/signal_arm64.c
@@ -1594,6 +1594,12 @@ void signal_init_process(void)
@@ -1654,6 +1654,12 @@ void signal_init_process(void)
exit(1);
}
@@ -62,10 +62,10 @@ index d98268bcd54..2b92bbd7ed3 100644
/***********************************************************************
* syscall_dispatcher_return_slowpath
diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
index 11bdd9c1ea6..f688795ab91 100644
index 67221a4028c..46b298dfc69 100644
--- a/dlls/ntdll/unix/signal_i386.c
+++ b/dlls/ntdll/unix/signal_i386.c
@@ -1839,6 +1839,30 @@ static BOOL handle_syscall_trap( ucontext_t *sigcontext )
@@ -1861,6 +1861,30 @@ static BOOL handle_syscall_trap( ucontext_t *sigcontext )
}
@@ -96,7 +96,7 @@ index 11bdd9c1ea6..f688795ab91 100644
/**********************************************************************
* segv_handler
*
@@ -2408,6 +2432,34 @@ void signal_init_process(void)
@@ -2431,6 +2455,34 @@ void signal_init_process(void)
exit(1);
}
@@ -132,10 +132,10 @@ index 11bdd9c1ea6..f688795ab91 100644
/***********************************************************************
* call_init_thunk
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 0204139631f..f8831b80a2b 100644
index 28841de98f1..4440b60557c 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -2455,6 +2455,12 @@ void signal_init_process(void)
@@ -2644,6 +2644,12 @@ void signal_init_process(void)
exit(1);
}
@@ -149,22 +149,22 @@ index 0204139631f..f8831b80a2b 100644
/***********************************************************************
* call_init_thunk
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index e1cace7ba78..0ea15f48787 100644
index e09d0b41981..b6def005b91 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -268,6 +268,7 @@ extern void signal_init_threading(void) DECLSPEC_HIDDEN;
extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN;
extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN;
extern void signal_init_process(void) DECLSPEC_HIDDEN;
+extern void signal_init_early(void) DECLSPEC_HIDDEN;
@@ -276,6 +276,7 @@ extern void signal_init_threading(void);
extern NTSTATUS signal_alloc_thread( TEB *teb );
extern void signal_free_thread( TEB *teb );
extern void signal_init_process(void);
+extern void signal_init_early(void);
extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE entry, void *arg,
BOOL suspend, TEB *teb ) DECLSPEC_HIDDEN;
extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int), TEB *teb ) DECLSPEC_HIDDEN;
BOOL suspend, TEB *teb );
extern SYSTEM_SERVICE_TABLE KeServiceDescriptorTable[4];
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index b5fdeb5707b..03ce50d0677 100644
index cc446de6250..f93740e9f4f 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -3703,7 +3703,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
@@ -3958,7 +3958,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
}
#endif
@@ -174,5 +174,5 @@ index b5fdeb5707b..03ce50d0677 100644
struct thread_stack_info stack_info;
if (!is_inside_thread_stack( page, &stack_info ))
--
2.40.1
2.42.0

View File

@@ -1,144 +0,0 @@
From ed725c78b5deb6c482a60ac26eda5f5d58ab531c Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 26 Oct 2021 19:07:26 +0300
Subject: [PATCH] ntdll: Don't use Wine frames during exception processing on
x64.
CW-Bug-ID: #19570
---
dlls/ntdll/signal_x86_64.c | 65 +++++++++++++++++++++++++++-----------
1 file changed, 46 insertions(+), 19 deletions(-)
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index ac543338893..f2c7cad5675 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -348,15 +348,32 @@ __ASM_GLOBAL_FUNC( RtlCaptureContext,
"fxsave 0x100(%rcx)\n\t" /* context->FltSave */
"ret" );
-static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
+DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
+ TRACE( "exception flags %#x.\n", rec->ExceptionFlags );
+
if (!(rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))
- rec->ExceptionFlags |= EH_NESTED_CALL;
+ return ExceptionNestedException;
return ExceptionContinueSearch;
}
+/***********************************************************************
+ * exception_handler_call_wrapper
+ */
+DWORD exception_handler_call_wrapper( EXCEPTION_RECORD *rec, void *frame,
+ CONTEXT *context, DISPATCHER_CONTEXT *dispatch );
+__ASM_GLOBAL_FUNC( exception_handler_call_wrapper,
+ __ASM_SEH(".seh_endprologue\n\t")
+ "subq $0x28, %rsp\n\t"
+ __ASM_SEH(".seh_stackalloc 0x28\n\t")
+ __ASM_SEH(".seh_handler nested_exception_handler, @except\n\t")
+ "callq *0x30(%r9)\n\t" /* dispatch->LanguageHandler */
+ "nop\n\t"
+ "addq $0x28, %rsp\n\t"
+ "ret" );
+
/**********************************************************************
* call_handler
*
@@ -365,19 +382,19 @@ static DWORD __cdecl nested_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_
*/
static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch )
{
- EXCEPTION_REGISTRATION_RECORD frame;
DWORD res;
- frame.Handler = nested_exception_handler;
- __wine_push_frame( &frame );
-
TRACE_(seh)( "calling handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n",
dispatch->LanguageHandler, rec, (void *)dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
- res = dispatch->LanguageHandler( rec, (void *)dispatch->EstablisherFrame, context, dispatch );
+ res = exception_handler_call_wrapper( rec, (void *)dispatch->EstablisherFrame, context, dispatch );
TRACE_(seh)( "handler at %p returned %lu\n", dispatch->LanguageHandler, res );
rec->ExceptionFlags &= EH_NONCONTINUABLE;
- __wine_pop_frame( &frame );
+ if (res == ExceptionNestedException)
+ {
+ rec->ExceptionFlags |= EH_NESTED_CALL;
+ res = ExceptionContinueSearch;
+ }
return res;
}
@@ -992,7 +1009,8 @@ PVOID WINAPI RtlVirtualUnwind( ULONG type, ULONG64 base, ULONG64 pc,
struct unwind_exception_frame
{
- EXCEPTION_REGISTRATION_RECORD frame;
+ BYTE dummy[0x28];
+ void *rip;
DISPATCHER_CONTEXT *dispatch;
};
@@ -1001,7 +1019,7 @@ struct unwind_exception_frame
*
* Handler for exceptions happening while calling an unwind handler.
*/
-static DWORD __cdecl unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
+DWORD __cdecl unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
struct unwind_exception_frame *unwind_frame = (struct unwind_exception_frame *)frame;
@@ -1021,27 +1039,36 @@ static DWORD __cdecl unwind_exception_handler( EXCEPTION_RECORD *rec, EXCEPTION_
return ExceptionCollidedUnwind;
}
+/***********************************************************************
+ * exception_handler_call_wrapper
+ */
+DWORD unwind_handler_call_wrapper( EXCEPTION_RECORD *rec, void *frame,
+ CONTEXT *context, DISPATCHER_CONTEXT *dispatch );
+__ASM_GLOBAL_FUNC( unwind_handler_call_wrapper,
+ __ASM_SEH(".seh_endprologue\n\t")
+ "movq %r9, 0x8(%rsp)\n\t"
+ "subq $0x28, %rsp\n\t"
+ __ASM_SEH(".seh_stackalloc 0x28\n\t")
+ __ASM_SEH(".seh_handler unwind_exception_handler, @except, @unwind\n\t")
+ "callq *0x30(%r9)\n\t" /* dispatch->LanguageHandler */
+ "nop\n\t"
+ "addq $0x28, %rsp\n\t"
+ "ret" );
+
/**********************************************************************
* call_unwind_handler
*
* Call a single unwind handler.
*/
-static DWORD call_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch )
+DWORD call_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch )
{
- struct unwind_exception_frame frame;
DWORD res;
- frame.frame.Handler = unwind_exception_handler;
- frame.dispatch = dispatch;
- __wine_push_frame( &frame.frame );
-
TRACE( "calling handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n",
dispatch->LanguageHandler, rec, (void *)dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
- res = dispatch->LanguageHandler( rec, (void *)dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
+ res = unwind_handler_call_wrapper( rec, (void *)dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch );
TRACE( "handler %p returned %lx\n", dispatch->LanguageHandler, res );
- __wine_pop_frame( &frame.frame );
-
switch (res)
{
case ExceptionContinueSearch:
--
2.38.1

Some files were not shown because too many files have changed in this diff Show More