You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
47f77594ab | ||
|
4adf613941 | ||
|
b3fc3b367a | ||
|
0b9581fa6a | ||
|
06a7d6349e | ||
|
86a7c93cdd | ||
|
abf4b4db07 | ||
|
b4d8b2f64f | ||
|
092b56c39c | ||
|
2cd8221624 | ||
|
e855d43a60 | ||
|
f95009bb3e | ||
|
edfe4935ff | ||
|
b8110be095 | ||
|
42a307df67 | ||
|
c89fe8069e | ||
|
eff3de6ad2 | ||
|
9f89b77e8f | ||
|
74dd8bdd2a | ||
|
f01e66252c | ||
|
353a868136 | ||
|
ee5092247c | ||
|
e54c70a009 | ||
|
1b8ab6cb68 | ||
|
81425de332 | ||
|
c2d96a3c91 | ||
|
292830fa82 | ||
|
6912feaf65 | ||
|
aa0c8391eb | ||
|
36020b4a0e | ||
|
4fa7fcd631 | ||
|
ebf36e4717 | ||
|
835c92a298 | ||
|
708eb528c0 | ||
|
77a24c72b8 | ||
|
8924ee42d8 | ||
|
e1b2c45272 | ||
|
9b43d37fd1 | ||
|
5b64f435e9 | ||
|
441fd5f422 | ||
|
c103bbb0b6 | ||
|
d88d44f1d9 | ||
|
5e84688c5f |
@@ -1,231 +0,0 @@
|
||||
From e6c1c1fe3fe2f4fe7d3e421b94d925c40063af22 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
dlls/cryptext/Makefile.in | 3 +-
|
||||
dlls/cryptext/cryptext.spec | 4 +--
|
||||
dlls/cryptext/cryptext_main.c | 64 +++++++++++++++++++++++++++++++++
|
||||
dlls/cryptext/tests/Makefile.in | 4 +++
|
||||
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++++++++
|
||||
7 files changed, 135 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/cryptext/tests/Makefile.in
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ca6e87d4740..7033499399f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21660,6 +21660,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
+wine_fn_config_makefile dlls/cryptext/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptnet enable_cryptnet
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptowinrt enable_cryptowinrt
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cba55126869..57064a05fe5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2477,6 +2477,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/cryptext/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptowinrt)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 5598bfb78e0..acda4e4ac6d 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
+++ b/dlls/cryptext/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
-MODULE = cryptext.dll
|
||||
+MODULE = cryptext.dll
|
||||
+IMPORTS = crypt32 cryptui user32
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
|
||||
index ee3e155f457..24b4794c198 100644
|
||||
--- a/dlls/cryptext/cryptext.spec
|
||||
+++ b/dlls/cryptext/cryptext.spec
|
||||
@@ -12,8 +12,8 @@
|
||||
@ stub CryptExtAddSPCW
|
||||
@ stub CryptExtOpenCAT
|
||||
@ stub CryptExtOpenCATW
|
||||
-@ stub CryptExtOpenCER
|
||||
-@ stub CryptExtOpenCERW
|
||||
+@ stdcall CryptExtOpenCER(long ptr str long)
|
||||
+@ stdcall CryptExtOpenCERW(long ptr wstr long)
|
||||
@ stub CryptExtOpenCRL
|
||||
@ stub CryptExtOpenCRLW
|
||||
@ stub CryptExtOpenCTL
|
||||
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
|
||||
index 537ba66cd3b..a4314518eac 100644
|
||||
--- a/dlls/cryptext/cryptext_main.c
|
||||
+++ b/dlls/cryptext/cryptext_main.c
|
||||
@@ -22,10 +22,29 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
+#include "winnls.h"
|
||||
+#include "wincrypt.h"
|
||||
+#include "winuser.h"
|
||||
+#include "cryptuiapi.h"
|
||||
+
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cryptext);
|
||||
|
||||
+static WCHAR *heap_strdupAtoW(const char *str)
|
||||
+{
|
||||
+ WCHAR *ret;
|
||||
+ INT len;
|
||||
+
|
||||
+ if (!str) return NULL;
|
||||
+ len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
+ ret = heap_alloc(len * sizeof(WCHAR));
|
||||
+ if (ret)
|
||||
+ MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* CryptExtAddPFX (CRYPTEXT.@)
|
||||
*/
|
||||
@@ -43,3 +62,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
|
||||
FIXME("stub: %s\n", debugstr_w(filename));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * CryptExtOpenCERW (CRYPTEXT.@)
|
||||
+ */
|
||||
+HRESULT WINAPI CryptExtOpenCERW(HWND hwnd, HINSTANCE hinst, LPCWSTR filename, DWORD showcmd)
|
||||
+{
|
||||
+ PCCERT_CONTEXT ctx;
|
||||
+ CRYPTUI_VIEWCERTIFICATE_STRUCTW info;
|
||||
+
|
||||
+ TRACE("(%p, %p, %s, %lu)\n", hwnd, hinst, debugstr_w(filename), showcmd);
|
||||
+
|
||||
+ if (!CryptQueryObject(CERT_QUERY_OBJECT_FILE, filename, CERT_QUERY_CONTENT_FLAG_CERT,
|
||||
+ CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
+ (const void **)&ctx))
|
||||
+ {
|
||||
+ /* FIXME: move to the resources */
|
||||
+ static const WCHAR msg[] = {'T','h','i','s',' ','i','s',' ','n','o','t',' ','a',' ','v','a','l','i','d',' ','c','e','r','t','i','f','i','c','a','t','e',0};
|
||||
+ MessageBoxW(NULL, msg, filename, MB_OK | MB_ICONERROR);
|
||||
+ return S_OK; /* according to the tests */
|
||||
+ }
|
||||
+
|
||||
+ memset(&info, 0, sizeof(info));
|
||||
+ info.dwSize = sizeof(info);
|
||||
+ info.pCertContext = ctx;
|
||||
+ CryptUIDlgViewCertificateW(&info, NULL);
|
||||
+ CertFreeCertificateContext(ctx);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * CryptExtOpenCER (CRYPTEXT.@)
|
||||
+ */
|
||||
+HRESULT WINAPI CryptExtOpenCER(HWND hwnd, HINSTANCE hinst, LPCSTR filename, DWORD showcmd)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ LPWSTR filenameW;
|
||||
+
|
||||
+ TRACE("(%p, %p, %s, %lu)\n", hwnd, hinst, debugstr_a(filename), showcmd);
|
||||
+
|
||||
+ filenameW = heap_strdupAtoW(filename);
|
||||
+ hr = CryptExtOpenCERW(hwnd, hinst, filenameW, showcmd);
|
||||
+ heap_free(filenameW);
|
||||
+ return hr;
|
||||
+}
|
||||
diff --git a/dlls/cryptext/tests/Makefile.in b/dlls/cryptext/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..c3f4551fc00
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+TESTDLL = cryptext.dll
|
||||
+
|
||||
+SOURCES = \
|
||||
+ cryptext.c
|
||||
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
|
||||
new file mode 100644
|
||||
index 00000000000..ab1007dbd82
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/cryptext.c
|
||||
@@ -0,0 +1,61 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include <assert.h>
|
||||
+#include <windef.h>
|
||||
+#include <winbase.h>
|
||||
+#include <winuser.h>
|
||||
+#include <winerror.h>
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+static HRESULT (WINAPI *pCryptExtOpenCER)(HWND,HINSTANCE,LPCSTR,DWORD);
|
||||
+
|
||||
+static void test_CryptExtOpenCER(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (!pCryptExtOpenCER)
|
||||
+ {
|
||||
+ win_skip("CryptExtOpenCER is not available on this platform\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!winetest_interactive)
|
||||
+ {
|
||||
+ skip("CryptExtOpenCER test needs user interaction\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ hr = pCryptExtOpenCER(0, 0, "dead.beef", SW_HIDE);
|
||||
+ ok(hr == S_OK, "got %#lx\n", hr);
|
||||
+
|
||||
+ hr = pCryptExtOpenCER(0, 0, "VeriSign Class 3 Public Primary Certification Authority - G4.txt", SW_SHOW);
|
||||
+ ok(hr == S_OK, "got %#lx\n", hr);
|
||||
+}
|
||||
+
|
||||
+START_TEST(cryptext)
|
||||
+{
|
||||
+ HMODULE hmod = LoadLibraryA("cryptext.dll");
|
||||
+
|
||||
+ pCryptExtOpenCER = (void *)GetProcAddress(hmod, "CryptExtOpenCER");
|
||||
+
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# Taken from the mailing list - July 2019.
|
||||
Fixes: cryptext: Implement CryptExtOpenCER.
|
@@ -1,118 +0,0 @@
|
||||
From 71d1c176af87bdc48326d5883fbea608314ee0a4 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
texture to dds file.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_private.h | 2 ++
|
||||
dlls/d3dx9_36/surface.c | 63 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +--
|
||||
3 files changed, 66 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 6a9b3e12b7b..0c6374f35ca 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -316,6 +316,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write);
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update);
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette);
|
||||
HRESULT d3dx_pixels_init(const void *data, uint32_t row_pitch, uint32_t slice_pitch,
|
||||
const PALETTEENTRY *palette, enum d3dx_pixel_format_id format, uint32_t left, uint32_t top, uint32_t right,
|
||||
uint32_t bottom, uint32_t front, uint32_t back, struct d3dx_pixels *pixels);
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 9d2dc96a979..912a3e3c849 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -628,6 +628,69 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT get_surface(D3DRESOURCETYPE type, struct IDirect3DBaseTexture9 *tex,
|
||||
+ int face, UINT level, struct IDirect3DSurface9 **surf)
|
||||
+{
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case D3DRTYPE_TEXTURE:
|
||||
+ return IDirect3DTexture9_GetSurfaceLevel((IDirect3DTexture9*) tex, level, surf);
|
||||
+ case D3DRTYPE_CUBETEXTURE:
|
||||
+ return IDirect3DCubeTexture9_GetCubeMapSurface((IDirect3DCubeTexture9*) tex, face, level, surf);
|
||||
+ default:
|
||||
+ ERR("Unexpected texture type\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ D3DRESOURCETYPE type;
|
||||
+ UINT mip_levels;
|
||||
+ IDirect3DSurface9 *surface;
|
||||
+
|
||||
+ type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
+
|
||||
+ if ((type != D3DRTYPE_TEXTURE) && (type != D3DRTYPE_CUBETEXTURE) && (type != D3DRTYPE_VOLUMETEXTURE))
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ if (type == D3DRTYPE_CUBETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Cube texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+ else if (type == D3DRTYPE_VOLUMETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Volume texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ mip_levels = IDirect3DTexture9_GetLevelCount(src_texture);
|
||||
+
|
||||
+ if (mip_levels > 1)
|
||||
+ {
|
||||
+ FIXME("Mipmap not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ if (src_palette)
|
||||
+ {
|
||||
+ FIXME("Saving surfaces with palettized pixel formats not implemented yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ hr = get_surface(type, src_texture, D3DCUBEMAP_FACE_POSITIVE_X, 0, &surface);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ hr = save_dds_surface_to_memory(dst_buffer, surface, NULL, NULL);
|
||||
+ IDirect3DSurface9_Release(surface);
|
||||
+ }
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
static const uint8_t bmp_file_signature[] = { 'B', 'M' };
|
||||
static const uint8_t jpg_file_signature[] = { 0xff, 0xd8 };
|
||||
static const uint8_t png_file_signature[] = { 0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a };
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 719a2787445..3f76ec209f9 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1866,10 +1866,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
- {
|
||||
- FIXME("DDS file format isn't supported yet\n");
|
||||
- return E_NOTIMPL;
|
||||
- }
|
||||
+ return save_dds_texture_to_memory(dst_buffer, src_texture, src_palette);
|
||||
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [26898] Support for DDS file format in D3DXSaveTextureToFileInMemory
|
||||
Disabled: True
|
@@ -1,4 +1,4 @@
|
||||
From 914fe97f7dc20348ec3e1a2e18bcefa9b7cab463 Mon Sep 17 00:00:00 2001
|
||||
From 16f5ebca082d65ca9abeddb857f30ef58f590ea3 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 18:51:40 -0500
|
||||
Subject: [PATCH] server: Add an object operation to grab the esync file
|
||||
@@ -44,7 +44,7 @@ Split off to decrease patch size.
|
||||
35 files changed, 71 insertions(+)
|
||||
|
||||
diff --git a/server/async.c b/server/async.c
|
||||
index 749c547af4f..2377c737e98 100644
|
||||
index d2d929c9709..9768a4932a6 100644
|
||||
--- a/server/async.c
|
||||
+++ b/server/async.c
|
||||
@@ -78,6 +78,7 @@ static const struct object_ops async_ops =
|
||||
@@ -100,7 +100,7 @@ index 91f159bc7c9..0df7fd2f18e 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/completion.c b/server/completion.c
|
||||
index f9e68c523f1..9093132efac 100644
|
||||
index 99680ae0680..3d750154d1b 100644
|
||||
--- a/server/completion.c
|
||||
+++ b/server/completion.c
|
||||
@@ -92,6 +92,7 @@ static const struct object_ops completion_wait_ops =
|
||||
@@ -120,10 +120,10 @@ index f9e68c523f1..9093132efac 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/console.c b/server/console.c
|
||||
index b64283baf4a..1cc9eea6a50 100644
|
||||
index de6f4e73e31..9bdba479e8c 100644
|
||||
--- a/server/console.c
|
||||
+++ b/server/console.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops console_ops =
|
||||
@@ -84,6 +84,7 @@ static const struct object_ops console_ops =
|
||||
console_add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_signaled, /* signaled */
|
||||
@@ -131,7 +131,7 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_get_fd, /* get_fd */
|
||||
@@ -158,6 +159,7 @@ static const struct object_ops console_server_ops =
|
||||
@@ -161,6 +162,7 @@ static const struct object_ops console_server_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_server_signaled, /* signaled */
|
||||
@@ -139,15 +139,15 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_server_get_fd, /* get_fd */
|
||||
@@ -227,6 +229,7 @@ static const struct object_ops screen_buffer_ops =
|
||||
screen_buffer_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -230,6 +232,7 @@ static const struct object_ops screen_buffer_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
screen_buffer_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
NULL, /* satisfied */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
screen_buffer_get_fd, /* get_fd */
|
||||
@@ -276,6 +279,7 @@ static const struct object_ops console_device_ops =
|
||||
@@ -279,6 +282,7 @@ static const struct object_ops console_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -155,23 +155,23 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -313,6 +317,7 @@ static const struct object_ops console_input_ops =
|
||||
console_input_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -318,6 +322,7 @@ static const struct object_ops console_input_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_input_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_input_get_fd, /* get_fd */
|
||||
@@ -370,6 +375,7 @@ static const struct object_ops console_output_ops =
|
||||
console_output_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -377,6 +382,7 @@ static const struct object_ops console_output_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
console_output_signaled, /* signaled */
|
||||
+ NULL, /* get_esync_fd */
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
console_output_get_fd, /* get_fd */
|
||||
@@ -428,6 +434,7 @@ static const struct object_ops console_connection_ops =
|
||||
@@ -435,6 +441,7 @@ static const struct object_ops console_connection_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -180,7 +180,7 @@ index b64283baf4a..1cc9eea6a50 100644
|
||||
no_signal, /* signal */
|
||||
console_connection_get_fd, /* get_fd */
|
||||
diff --git a/server/debugger.c b/server/debugger.c
|
||||
index c59a0abea77..ca04d4c71ce 100644
|
||||
index 39a740e07e5..0c01ec1c0d3 100644
|
||||
--- a/server/debugger.c
|
||||
+++ b/server/debugger.c
|
||||
@@ -86,6 +86,7 @@ static const struct object_ops debug_event_ops =
|
||||
@@ -200,7 +200,7 @@ index c59a0abea77..ca04d4c71ce 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/device.c b/server/device.c
|
||||
index 436dac6bfe9..f730fa81afa 100644
|
||||
index 1f93cca437d..a0608aa6164 100644
|
||||
--- a/server/device.c
|
||||
+++ b/server/device.c
|
||||
@@ -66,6 +66,7 @@ static const struct object_ops irp_call_ops =
|
||||
@@ -236,7 +236,7 @@ index 436dac6bfe9..f730fa81afa 100644
|
||||
no_signal, /* signal */
|
||||
device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/directory.c b/server/directory.c
|
||||
index b37ec969a9e..a6c0e292071 100644
|
||||
index fd689c561bc..2894f7669db 100644
|
||||
--- a/server/directory.c
|
||||
+++ b/server/directory.c
|
||||
@@ -69,6 +69,7 @@ static const struct object_ops object_type_ops =
|
||||
@@ -268,7 +268,7 @@ index 6a63c0dd5e9..f95dc5a391f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/event.c b/server/event.c
|
||||
index f1b79b1b35e..c727bfdd1ba 100644
|
||||
index ad7c09acc99..16cea16e9c2 100644
|
||||
--- a/server/event.c
|
||||
+++ b/server/event.c
|
||||
@@ -72,6 +72,7 @@ static const struct object_ops event_ops =
|
||||
@@ -288,7 +288,7 @@ index f1b79b1b35e..c727bfdd1ba 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 16328063df6..4ce78db5b33 100644
|
||||
index dde92beb664..b0c28e54360 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -172,6 +172,7 @@ static const struct object_ops fd_ops =
|
||||
@@ -336,7 +336,7 @@ index 2a839968c25..cbef0c63383 100644
|
||||
no_signal, /* signal */
|
||||
file_get_fd, /* get_fd */
|
||||
diff --git a/server/handle.c b/server/handle.c
|
||||
index e65831b3b22..e6c5707556f 100644
|
||||
index 8968df73647..3d36af360c2 100644
|
||||
--- a/server/handle.c
|
||||
+++ b/server/handle.c
|
||||
@@ -126,6 +126,7 @@ static const struct object_ops handle_table_ops =
|
||||
@@ -348,7 +348,7 @@ index e65831b3b22..e6c5707556f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/hook.c b/server/hook.c
|
||||
index c2d2823cd61..ab4d0e9dd31 100644
|
||||
index ffe7206369e..921aa8aba2e 100644
|
||||
--- a/server/hook.c
|
||||
+++ b/server/hook.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops hook_table_ops =
|
||||
@@ -360,7 +360,7 @@ index c2d2823cd61..ab4d0e9dd31 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/mailslot.c b/server/mailslot.c
|
||||
index 61eceec94e2..92fe938d3b9 100644
|
||||
index c54281c2101..e4c24459f22 100644
|
||||
--- a/server/mailslot.c
|
||||
+++ b/server/mailslot.c
|
||||
@@ -81,6 +81,7 @@ static const struct object_ops mailslot_ops =
|
||||
@@ -396,7 +396,7 @@ index 61eceec94e2..92fe938d3b9 100644
|
||||
no_signal, /* signal */
|
||||
mailslot_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index 2bf45780375..b84bb08a77b 100644
|
||||
index 247b28cf6f5..d8498b65054 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -67,6 +67,7 @@ static const struct object_ops ranges_ops =
|
||||
@@ -436,7 +436,7 @@ index af0efe72132..4785a830e92 100644
|
||||
mutex_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index dd8c14b30a9..5880b601d3a 100644
|
||||
index 6e4ae371a1b..0eebd68abe6 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -119,6 +119,7 @@ static const struct object_ops named_pipe_ops =
|
||||
@@ -480,7 +480,7 @@ index dd8c14b30a9..5880b601d3a 100644
|
||||
no_signal, /* signal */
|
||||
named_pipe_device_file_get_fd, /* get_fd */
|
||||
diff --git a/server/object.c b/server/object.c
|
||||
index b1665fb5372..0a4d1bede06 100644
|
||||
index cd368ef724a..4d8fcc5a774 100644
|
||||
--- a/server/object.c
|
||||
+++ b/server/object.c
|
||||
@@ -108,6 +108,7 @@ static const struct object_ops apc_reserve_ops =
|
||||
@@ -500,7 +500,7 @@ index b1665fb5372..0a4d1bede06 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/object.h b/server/object.h
|
||||
index 6222e3352ed..0a65d0e3892 100644
|
||||
index 1058f9bfb0a..4acf6f03572 100644
|
||||
--- a/server/object.h
|
||||
+++ b/server/object.h
|
||||
@@ -78,6 +78,8 @@ struct object_ops
|
||||
@@ -513,7 +513,7 @@ index 6222e3352ed..0a65d0e3892 100644
|
||||
void (*satisfied)(struct object *,struct wait_queue_entry *);
|
||||
/* signal an object */
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 49f5c75005f..dc83a089655 100644
|
||||
index b161e3394ba..b3676936317 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -105,6 +105,7 @@ static const struct object_ops process_ops =
|
||||
@@ -541,7 +541,7 @@ index 49f5c75005f..dc83a089655 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 984d466b66e..8a95055db40 100644
|
||||
index 2d23fb0def8..19486a745be 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -165,6 +165,7 @@ static const struct object_ops msg_queue_ops =
|
||||
@@ -561,7 +561,7 @@ index 984d466b66e..8a95055db40 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index cc9a33fff1d..c19e92c9750 100644
|
||||
index c60c737feff..34c422dcc6f 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -180,6 +180,7 @@ static const struct object_ops key_ops =
|
||||
@@ -573,10 +573,10 @@ index cc9a33fff1d..c19e92c9750 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/request.c b/server/request.c
|
||||
index dabcea68309..832a33917b4 100644
|
||||
index 2254315b79e..f4f5e713935 100644
|
||||
--- a/server/request.c
|
||||
+++ b/server/request.c
|
||||
@@ -90,6 +90,7 @@ static const struct object_ops master_socket_ops =
|
||||
@@ -89,6 +89,7 @@ static const struct object_ops master_socket_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -621,10 +621,10 @@ index 19b76d44c16..55cd6aa037e 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index d2ec882554f..44a4e3b7b15 100644
|
||||
index e064f867ff4..e9e81d9ecd0 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -471,6 +471,7 @@ static const struct object_ops sock_ops =
|
||||
@@ -486,6 +486,7 @@ static const struct object_ops sock_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
default_fd_signaled, /* signaled */
|
||||
@@ -632,7 +632,7 @@ index d2ec882554f..44a4e3b7b15 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
sock_get_fd, /* get_fd */
|
||||
@@ -3599,6 +3600,7 @@ static const struct object_ops ifchange_ops =
|
||||
@@ -3695,6 +3696,7 @@ static const struct object_ops ifchange_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -640,7 +640,7 @@ index d2ec882554f..44a4e3b7b15 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
ifchange_get_fd, /* get_fd */
|
||||
@@ -3820,6 +3822,7 @@ static const struct object_ops socket_device_ops =
|
||||
@@ -3916,6 +3918,7 @@ static const struct object_ops socket_device_ops =
|
||||
no_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
@@ -649,7 +649,7 @@ index d2ec882554f..44a4e3b7b15 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/symlink.c b/server/symlink.c
|
||||
index dd28efd3a75..c7f34412317 100644
|
||||
index 74b60162c01..2dd9c6a798d 100644
|
||||
--- a/server/symlink.c
|
||||
+++ b/server/symlink.c
|
||||
@@ -71,6 +71,7 @@ static const struct object_ops symlink_ops =
|
||||
@@ -661,10 +661,10 @@ index dd28efd3a75..c7f34412317 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 506adfc0a6f..339cdfec1fa 100644
|
||||
index c7d1c6c55c8..ac000826599 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -96,6 +96,7 @@ static const struct object_ops thread_apc_ops =
|
||||
@@ -106,6 +106,7 @@ static const struct object_ops thread_apc_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_apc_signaled, /* signaled */
|
||||
@@ -672,7 +672,7 @@ index 506adfc0a6f..339cdfec1fa 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -138,6 +139,7 @@ static const struct object_ops context_ops =
|
||||
@@ -148,6 +149,7 @@ static const struct object_ops context_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
context_signaled, /* signaled */
|
||||
@@ -680,7 +680,7 @@ index 506adfc0a6f..339cdfec1fa 100644
|
||||
no_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -187,6 +189,7 @@ static const struct object_ops thread_ops =
|
||||
@@ -197,6 +199,7 @@ static const struct object_ops thread_ops =
|
||||
add_queue, /* add_queue */
|
||||
remove_queue, /* remove_queue */
|
||||
thread_signaled, /* signaled */
|
||||
@@ -689,7 +689,7 @@ index 506adfc0a6f..339cdfec1fa 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/timer.c b/server/timer.c
|
||||
index 96dc9d00ca1..f59902d5607 100644
|
||||
index b0b6ec81535..883f30fa97e 100644
|
||||
--- a/server/timer.c
|
||||
+++ b/server/timer.c
|
||||
@@ -76,6 +76,7 @@ static const struct object_ops timer_ops =
|
||||
@@ -701,7 +701,7 @@ index 96dc9d00ca1..f59902d5607 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 48ee1eca8fe..479596bdbfa 100644
|
||||
index 7e20c670a16..b638ed192cb 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -145,6 +145,7 @@ static const struct object_ops token_ops =
|
||||
@@ -713,7 +713,7 @@ index 48ee1eca8fe..479596bdbfa 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/window.c b/server/window.c
|
||||
index 412592fbc71..94a70ce890f 100644
|
||||
index f7f9d5e517f..8c416d8c88f 100644
|
||||
--- a/server/window.c
|
||||
+++ b/server/window.c
|
||||
@@ -107,6 +107,7 @@ static const struct object_ops window_ops =
|
||||
@@ -725,7 +725,7 @@ index 412592fbc71..94a70ce890f 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
diff --git a/server/winstation.c b/server/winstation.c
|
||||
index e5f4bfec357..50fe34aa9ce 100644
|
||||
index b3746090ccf..126b70d625a 100644
|
||||
--- a/server/winstation.c
|
||||
+++ b/server/winstation.c
|
||||
@@ -76,6 +76,7 @@ static const struct object_ops winstation_ops =
|
||||
@@ -745,5 +745,5 @@ index e5f4bfec357..50fe34aa9ce 100644
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 27e2bc1b0d098abce9168ea46589024054817e25 Mon Sep 17 00:00:00 2001
|
||||
From 52be83d9a557eec924a964944e6b926fb1e347ad Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:01:56 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for message queues.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] server: Create eventfd file descriptors for message queues.
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index ee575724e4e..60f0c043257 100644
|
||||
index a3479055ed4..08635c047b2 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -44,6 +44,7 @@
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "process.h"
|
||||
#include "request.h"
|
||||
#include "user.h"
|
||||
@@ -19,15 +19,15 @@ index ee575724e4e..60f0c043257 100644
|
||||
|
||||
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
|
||||
#define WM_NCMOUSELAST (WM_NCMOUSEFIRST+(WM_MOUSELAST-WM_MOUSEFIRST))
|
||||
@@ -144,6 +145,7 @@ struct msg_queue
|
||||
@@ -135,6 +136,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
queue_shm_t *shared; /* queue in session shared memory */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
+ int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -160,6 +162,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
|
||||
@@ -151,6 +153,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
|
||||
static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void msg_queue_remove_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
@@ -35,7 +35,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void msg_queue_destroy( struct object *obj );
|
||||
static void msg_queue_poll_event( struct fd *fd, int event );
|
||||
@@ -175,7 +178,7 @@ static const struct object_ops msg_queue_ops =
|
||||
@@ -166,7 +169,7 @@ static const struct object_ops msg_queue_ops =
|
||||
msg_queue_add_queue, /* add_queue */
|
||||
msg_queue_remove_queue, /* remove_queue */
|
||||
msg_queue_signaled, /* signaled */
|
||||
@@ -44,7 +44,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
msg_queue_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -313,6 +316,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -317,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->last_get_msg = current_time;
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
@@ -52,7 +52,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -335,6 +339,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -339,6 +343,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
}
|
||||
SHARED_WRITE_END;
|
||||
|
||||
@@ -62,7 +62,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
thread->queue = queue;
|
||||
|
||||
if ((desktop = get_thread_desktop( thread, 0 )))
|
||||
@@ -685,6 +692,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
|
||||
@@ -753,6 +760,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
|
||||
if (queue->keystate_lock) unlock_input_keystate( queue->input );
|
||||
queue->keystate_lock = 0;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
|
||||
/* check if message is matched by the filter */
|
||||
@@ -1227,6 +1237,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
|
||||
@@ -1335,6 +1345,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
|
||||
return ret || is_signaled( queue );
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry )
|
||||
{
|
||||
struct msg_queue *queue = (struct msg_queue *)obj;
|
||||
@@ -1278,6 +1295,7 @@ static void msg_queue_destroy( struct object *obj )
|
||||
@@ -1391,6 +1408,7 @@ static void msg_queue_destroy( struct object *obj )
|
||||
if (queue->hooks) release_object( queue->hooks );
|
||||
if (queue->fd) release_object( queue->fd );
|
||||
if (queue->shared) free_shared_object( queue->shared );
|
||||
@@ -94,7 +94,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
|
||||
static void msg_queue_poll_event( struct fd *fd, int event )
|
||||
@@ -3000,6 +3018,9 @@ DECL_HANDLER(set_queue_mask)
|
||||
@@ -3181,6 +3199,9 @@ DECL_HANDLER(set_queue_mask)
|
||||
}
|
||||
else wake_up( &queue->obj, 0 );
|
||||
}
|
||||
@@ -104,7 +104,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3020,6 +3041,9 @@ DECL_HANDLER(get_queue_status)
|
||||
@@ -3201,6 +3222,9 @@ DECL_HANDLER(get_queue_status)
|
||||
shared->changed_bits &= ~req->clear_bits;
|
||||
}
|
||||
SHARED_WRITE_END;
|
||||
@@ -114,7 +114,7 @@ index ee575724e4e..60f0c043257 100644
|
||||
}
|
||||
else reply->wake_bits = reply->changed_bits = 0;
|
||||
}
|
||||
@@ -3286,6 +3310,10 @@ DECL_HANDLER(get_message)
|
||||
@@ -3469,6 +3493,10 @@ DECL_HANDLER(get_message)
|
||||
SHARED_WRITE_END;
|
||||
|
||||
set_error( STATUS_PENDING ); /* FIXME */
|
||||
@@ -126,5 +126,5 @@ index ee575724e4e..60f0c043257 100644
|
||||
|
||||
found_msg:
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7522f4cf4bb29413bce97be5e61ebaefb5276c77 Mon Sep 17 00:00:00 2001
|
||||
From c9d64a429d4343f4ceb53ae28ecc380aaa42b09e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:11:23 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
3 files changed, 77 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 399930c444b..06d7d8babc6 100644
|
||||
index b2204d44ed9..3af79a2de15 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -474,12 +474,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -476,12 +476,13 @@ static void update_grabbed_object( struct esync *obj )
|
||||
|
||||
/* A value of STATUS_NOT_IMPLEMENTED returned from this function means that we
|
||||
* need to delegate to server_select(). */
|
||||
@@ -28,7 +28,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
LONGLONG timeleft;
|
||||
LARGE_INTEGER now;
|
||||
ULONGLONG end;
|
||||
@@ -507,6 +508,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -509,6 +510,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
if (has_esync && has_server)
|
||||
FIXME("Can't wait on esync and server objects at the same time!\n");
|
||||
else if (has_server)
|
||||
@@ -518,6 +522,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -520,6 +524,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
for (i = 0; i < count; i++)
|
||||
TRACE(" %p", handles[i]);
|
||||
|
||||
@@ -48,7 +48,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
else
|
||||
@@ -557,7 +564,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -559,7 +566,9 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
int64_t value;
|
||||
ssize_t size;
|
||||
|
||||
@@ -59,7 +59,7 @@ index 399930c444b..06d7d8babc6 100644
|
||||
{
|
||||
/* Don't grab the object, just check if it's signaled. */
|
||||
if (fds[i].revents & POLLIN)
|
||||
@@ -602,6 +611,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
@@ -604,6 +613,44 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index 399930c444b..06d7d8babc6 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 56f2d263100..46cdbbed9b7 100644
|
||||
index 86040d5b619..c2fdec93b8d 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3968,6 +3968,10 @@ enum esync_type
|
||||
@@ -4121,6 +4121,10 @@ enum esync_type
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
|
||||
@@ -120,18 +120,18 @@ index 56f2d263100..46cdbbed9b7 100644
|
||||
@REQ(set_keyboard_repeat)
|
||||
int enable; /* whether to enable auto-repeat */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 60f0c043257..d6b6f2f20aa 100644
|
||||
index 08635c047b2..8f1a68acd7f 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -146,6 +146,7 @@ struct msg_queue
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
@@ -137,6 +137,7 @@ struct msg_queue
|
||||
queue_shm_t *shared; /* queue in session shared memory */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
+ int esync_in_msgwait; /* our thread is currently waiting on us */
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -317,6 +318,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -321,6 +322,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
queue->esync_fd = -1;
|
||||
@@ -139,7 +139,7 @@ index 60f0c043257..d6b6f2f20aa 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1183,6 +1185,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1291,6 +1293,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
if (get_wait_queue_thread(entry)->queue == queue)
|
||||
return 0; /* thread is waiting on queue -> not hung */
|
||||
}
|
||||
@@ -150,7 +150,7 @@ index 60f0c043257..d6b6f2f20aa 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4079,6 +4085,23 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
@@ -4281,6 +4287,23 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,11 +174,11 @@ index 60f0c043257..d6b6f2f20aa 100644
|
||||
DECL_HANDLER(set_keyboard_repeat)
|
||||
{
|
||||
struct desktop *desktop;
|
||||
@@ -4097,3 +4120,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
@@ -4299,3 +4322,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
|
||||
release_object( desktop );
|
||||
}
|
||||
+
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,27 +1,28 @@
|
||||
From 1de2ab4f1d48391f112897c2c89d4c1d77d4ac3f Mon Sep 17 00:00:00 2001
|
||||
From 05dfee93e261b38037c370611ab0f63a2785a08c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Feb 2016 00:04:10 +0100
|
||||
Subject: krnl386.exe16: Emulate GDT and LDT access.
|
||||
Subject: [PATCH] krnl386.exe16: Emulate GDT and LDT access.
|
||||
|
||||
---
|
||||
dlls/krnl386.exe16/instr.c | 64 +++++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 55 insertions(+), 9 deletions(-)
|
||||
dlls/krnl386.exe16/instr.c | 65 ++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 56 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c
|
||||
index b0de30f..865d944 100644
|
||||
index 666ef71363f..c6d05b7a0c9 100644
|
||||
--- a/dlls/krnl386.exe16/instr.c
|
||||
+++ b/dlls/krnl386.exe16/instr.c
|
||||
@@ -67,7 +67,7 @@ static inline void *get_stack( CONTEXT *context )
|
||||
@@ -60,7 +60,8 @@ static inline void *get_stack( CONTEXT *context )
|
||||
}
|
||||
|
||||
#include "pshpack1.h"
|
||||
#pragma pack(push,1)
|
||||
-struct idtr
|
||||
+
|
||||
+struct dtr
|
||||
{
|
||||
WORD limit;
|
||||
BYTE *base;
|
||||
@@ -75,19 +75,41 @@ struct idtr
|
||||
#include "poppack.h"
|
||||
@@ -68,19 +69,41 @@ struct idtr
|
||||
#pragma pack(pop)
|
||||
|
||||
static LDT_ENTRY idt[256];
|
||||
+static LDT_ENTRY gdt[8192];
|
||||
@@ -35,6 +36,18 @@ index b0de30f..865d944 100644
|
||||
+ struct dtr ret;
|
||||
__asm__( "sidtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static BOOL emulate_gdtr( BYTE *data, unsigned int data_size, unsigned int *offset )
|
||||
+{
|
||||
+#if defined(__i386__) && defined(__GNUC__)
|
||||
+ struct dtr ret;
|
||||
+ __asm__( "sgdtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
#else
|
||||
- ret.base = (BYTE *)idt;
|
||||
@@ -44,18 +57,6 @@ index b0de30f..865d944 100644
|
||||
- return ret;
|
||||
}
|
||||
|
||||
+static BOOL emulate_gdtr( BYTE *data, unsigned int data_size, unsigned int *offset )
|
||||
+{
|
||||
+#if defined(__i386__) && defined(__GNUC__)
|
||||
+ struct dtr ret;
|
||||
+ __asm__( "sgdtl %0" : "=m" (ret) );
|
||||
+ *offset = data - ret.base;
|
||||
+ return (*offset <= ret.limit + 1 - data_size);
|
||||
+#else
|
||||
+ return FALSE;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static inline WORD get_ldt(void)
|
||||
+{
|
||||
+ WORD seg = 1;
|
||||
@@ -67,7 +68,7 @@ index b0de30f..865d944 100644
|
||||
|
||||
/***********************************************************************
|
||||
* INSTR_ReplaceSelector
|
||||
@@ -711,10 +733,9 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
@@ -705,10 +728,9 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
BYTE *data = INSTR_GetOperandAddr(context, instr + 1, long_addr,
|
||||
segprefix, &len);
|
||||
unsigned int data_size = (*instr == 0x8b) ? (long_op ? 4 : 2) : 1;
|
||||
@@ -80,7 +81,7 @@ index b0de30f..865d944 100644
|
||||
{
|
||||
idt[1].LimitLow = 0x100; /* FIXME */
|
||||
idt[2].LimitLow = 0x11E; /* FIXME */
|
||||
@@ -728,6 +749,31 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
@@ -722,6 +744,31 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||
context->Eip += prefixlen + len + 1;
|
||||
return ExceptionContinueExecution;
|
||||
}
|
||||
@@ -113,5 +114,5 @@ index b0de30f..865d944 100644
|
||||
break; /* Unable to emulate it */
|
||||
|
||||
--
|
||||
2.7.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 33961353f1d7e0590c83927e632a6d43b2a81fa2 Mon Sep 17 00:00:00 2001
|
||||
From a955d4d49edc6bbd44ee168f42cd1773f4868533 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 14 Jan 2020 21:39:23 +0300
|
||||
Subject: [PATCH] ntdll: Increase step after failed map attempt in
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Increase step after failed map attempt in
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 75e6319c007..9ddd9a3a218 100644
|
||||
index 4b952b765d7..6a24eb0fa8e 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -1306,6 +1306,7 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
@@ -1382,6 +1382,7 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
step == 0)
|
||||
break;
|
||||
start = (char *)start + step;
|
||||
@@ -21,5 +21,5 @@ index 75e6319c007..9ddd9a3a218 100644
|
||||
|
||||
return NULL;
|
||||
--
|
||||
2.43.0
|
||||
2.49.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d853eba76fd849e21b5cb4ce0a3f113ba9beea87 Mon Sep 17 00:00:00 2001
|
||||
From c86b01cc0809af60b05bcc8ce66a6001cd4b993b Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Thu, 23 Jul 2020 18:40:39 +0300
|
||||
Subject: [PATCH] ntdll: Increase free ranges view block size on 64 bit.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] ntdll: Increase free ranges view block size on 64 bit.
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 9ddd9a3a218..30d0df85fba 100644
|
||||
index 6a24eb0fa8e..a36c919d47f 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -210,7 +210,11 @@ static BYTE *pages_vprot;
|
||||
@@ -221,7 +221,11 @@ static BYTE *pages_vprot;
|
||||
#endif
|
||||
|
||||
static struct file_view *view_block_start, *view_block_end, *next_free_view;
|
||||
@@ -24,5 +24,5 @@ index 9ddd9a3a218..30d0df85fba 100644
|
||||
static void *preload_reserve_end;
|
||||
static BOOL force_exec_prot; /* whether to force PROT_EXEC on all PROT_READ mmaps */
|
||||
--
|
||||
2.43.0
|
||||
2.49.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 4c246e61f0de05a8b80e7a5d5ff2edcd21036fec Mon Sep 17 00:00:00 2001
|
||||
From e5c4a6bd332d7d125e9db79fa29b14e55e3a1ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Mon, 25 Nov 2019 12:19:20 +0300
|
||||
Subject: [PATCH] ntdll: Force virtual memory allocation order.
|
||||
@@ -12,14 +12,14 @@ are from higher memory than they expect.
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48175
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46568
|
||||
---
|
||||
dlls/ntdll/unix/virtual.c | 410 +++++++++++++++-----------------------
|
||||
1 file changed, 164 insertions(+), 246 deletions(-)
|
||||
dlls/ntdll/unix/virtual.c | 402 +++++++++++++++-----------------------
|
||||
1 file changed, 162 insertions(+), 240 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 1a3d527f186..ec72d692c3a 100644
|
||||
index a36c919d47f..2f682e70ec2 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -1269,43 +1269,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
|
||||
@@ -1324,43 +1324,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
|
||||
/***********************************************************************
|
||||
* try_map_free_area
|
||||
@@ -1338,112 +1310,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
@@ -1393,112 +1365,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
/***********************************************************************
|
||||
* remove_reserved_area
|
||||
*
|
||||
@@ -1553,8 +1419,7 @@ static void free_view( struct file_view *view )
|
||||
@@ -1613,8 +1479,7 @@ static void free_view( struct file_view *view )
|
||||
*/
|
||||
static void unregister_view( struct file_view *view )
|
||||
{
|
||||
@@ -194,7 +194,7 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
wine_rb_remove( &views_tree, &view->entry );
|
||||
}
|
||||
|
||||
@@ -1582,8 +1447,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
|
||||
@@ -1642,8 +1507,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
|
||||
static void register_view( struct file_view *view )
|
||||
{
|
||||
wine_rb_put( &views_tree, view->base, &view->entry );
|
||||
@@ -204,7 +204,7 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -1855,89 +1719,176 @@ static inline void *unmap_extra_space( void *ptr, size_t total_size, size_t want
|
||||
@@ -1919,89 +1783,176 @@ static inline void *unmap_extra_space( void *ptr, size_t total_size, size_t want
|
||||
return ptr;
|
||||
}
|
||||
|
||||
@@ -362,8 +362,8 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
-
|
||||
- if (start >= limit_high) continue;
|
||||
- if (end <= limit_low) return NULL;
|
||||
- if (start < limit_low) start = limit_low;
|
||||
- if (end > limit_high) end = limit_high;
|
||||
- if (start < limit_low) start = (void *)ROUND_SIZE( 0, limit_low, host_page_mask );
|
||||
- if (end > limit_high) end = ROUND_ADDR( limit_high, host_page_mask );
|
||||
- ptr = find_reserved_free_area_outside_preloader( start, end, size, top_down, align_mask );
|
||||
- if (ptr) break;
|
||||
- }
|
||||
@@ -396,8 +396,8 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
+
|
||||
+ TRACE("range %p-%p.\n", base, end);
|
||||
+
|
||||
+ if (base < limit_low) base = limit_low;
|
||||
+ if (end > limit_high) end = limit_high;
|
||||
+ if (base < limit_low) base = (void *)ROUND_SIZE( 0, limit_low, host_page_mask );
|
||||
+ if (end > limit_high) end = ROUND_ADDR( limit_high, host_page_mask );
|
||||
+ if (base > end || end - base < size) continue;
|
||||
+
|
||||
+ if (reserve_end >= base)
|
||||
@@ -407,8 +407,8 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
-
|
||||
- if (start >= limit_high) return NULL;
|
||||
- if (end <= limit_low) continue;
|
||||
- if (start < limit_low) start = limit_low;
|
||||
- if (end > limit_high) end = limit_high;
|
||||
- if (start < limit_low) start = (void *)ROUND_SIZE( 0, limit_low, host_page_mask );
|
||||
- if (end > limit_high) end = ROUND_ADDR( limit_high, host_page_mask );
|
||||
- ptr = find_reserved_free_area_outside_preloader( start, end, size, top_down, align_mask );
|
||||
- if (ptr) break;
|
||||
+ if (reserve_end >= end)
|
||||
@@ -442,31 +442,24 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -2041,48 +1992,13 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
}
|
||||
else
|
||||
{
|
||||
- void *start = address_space_start;
|
||||
- void *end = min( user_space_limit, host_addr_space_limit );
|
||||
- size_t view_size, unmap_size;
|
||||
@@ -2112,43 +2063,12 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
void *start = address_space_start;
|
||||
void *end = min( user_space_limit, host_addr_space_limit );
|
||||
size_t host_size = ROUND_SIZE( 0, size, host_page_mask );
|
||||
- size_t unmap_size, view_size = host_size + align_mask + 1;
|
||||
-
|
||||
+ limit_high = limit_high ? min( limit_high + 1, (UINT_PTR)user_space_limit) : (UINT_PTR)user_space_limit;
|
||||
+ if (limit_low < (ULONG_PTR)address_space_start) limit_low = (ULONG_PTR)address_space_start;
|
||||
if (!align_mask) align_mask = granularity_mask;
|
||||
- view_size = size + align_mask + 1;
|
||||
-
|
||||
- if (limit_low && (void *)limit_low > start) start = (void *)limit_low;
|
||||
- if (limit_high && (void *)limit_high < end) end = (char *)limit_high + 1;
|
||||
-
|
||||
- if ((ptr = map_reserved_area( start, end, size, top_down, get_unix_prot(vprot), align_mask )))
|
||||
if (limit_low && (void *)limit_low > start) start = (void *)limit_low;
|
||||
if (limit_high && (void *)limit_high < end) end = (char *)limit_high + 1;
|
||||
|
||||
- if ((ptr = map_reserved_area( start, end, host_size, top_down, get_unix_prot(vprot), align_mask )))
|
||||
- {
|
||||
- TRACE( "got mem in reserved area %p-%p\n", ptr, (char *)ptr + size );
|
||||
- goto done;
|
||||
- }
|
||||
|
||||
-
|
||||
- if (start > address_space_start || end < host_addr_space_limit || top_down)
|
||||
- {
|
||||
- if (!(ptr = map_free_area( start, end, size, top_down, get_unix_prot(vprot), align_mask )))
|
||||
- if (!(ptr = map_free_area( start, end, host_size, top_down, get_unix_prot(vprot), align_mask )))
|
||||
- return STATUS_NO_MEMORY;
|
||||
- TRACE( "got mem with map_free_area %p-%p\n", ptr, (char *)ptr + size );
|
||||
- goto done;
|
||||
@@ -487,15 +480,15 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
- unmap_size = unmap_area_above_user_limit( ptr, view_size );
|
||||
- if (unmap_size) munmap( ptr, unmap_size );
|
||||
- }
|
||||
- ptr = unmap_extra_space( ptr, view_size, size, align_mask );
|
||||
+ if (!(ptr = alloc_free_area( (void *)limit_low, (void *)limit_high, size, top_down, get_unix_prot( vprot ), align_mask )))
|
||||
- ptr = unmap_extra_space( ptr, view_size, host_size, align_mask );
|
||||
+ if (!(ptr = alloc_free_area( start, end, host_size, top_down, get_unix_prot( vprot ), align_mask )))
|
||||
+ return STATUS_NO_MEMORY;
|
||||
}
|
||||
-done:
|
||||
status = create_view( view_ret, ptr, size, vprot );
|
||||
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
|
||||
return status;
|
||||
@@ -3275,6 +3191,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
|
||||
@@ -3413,6 +3333,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
|
||||
done:
|
||||
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
if (needs_close) close( unix_handle );
|
||||
@@ -503,7 +496,7 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -6394,6 +6311,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
|
||||
@@ -6624,6 +6545,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
|
||||
*ret = (ULONG_PTR)base;
|
||||
*size_ptr = size;
|
||||
}
|
||||
@@ -512,5 +505,5 @@ index 1a3d527f186..ec72d692c3a 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.49.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 844ba5e56a7231f65b65cabf06fe44ee49876aa0 Mon Sep 17 00:00:00 2001
|
||||
From 09d76a4049ee4cc8bce4ffafc349da326fc058e0 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Fri, 1 Dec 2023 14:55:20 -0600
|
||||
Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/virtual.c | 106 ++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 97 insertions(+), 9 deletions(-)
|
||||
dlls/ntdll/unix/virtual.c | 105 ++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 96 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index ec72d692c3a..30d43afc076 100644
|
||||
index 2f682e70ec2..6170363f0a0 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -127,6 +127,7 @@ struct file_view
|
||||
@@ -135,6 +135,7 @@ struct file_view
|
||||
#define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
|
||||
#define VPROT_PLACEHOLDER 0x0400
|
||||
#define VPROT_FREE_PLACEHOLDER 0x0800
|
||||
@@ -19,7 +19,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
|
||||
/* Conversion from VPROT_* to Win32 flags */
|
||||
static const BYTE VIRTUAL_Win32Flags[16] =
|
||||
@@ -175,6 +176,8 @@ static void *working_set_limit = (void *)0x7fff0000;
|
||||
@@ -191,6 +192,8 @@ static void *working_set_limit = (void *)0x7fff0000;
|
||||
static void *host_addr_space_limit; /* top of the host virtual address space */
|
||||
|
||||
static struct file_view *arm64ec_view;
|
||||
@@ -28,7 +28,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
|
||||
ULONG_PTR user_space_wow_limit = 0;
|
||||
struct _KUSER_SHARED_DATA *user_shared_data = (void *)0x7ffe0000;
|
||||
@@ -1157,7 +1160,9 @@ static void dump_view( struct file_view *view )
|
||||
@@ -1212,7 +1215,9 @@ static void dump_view( struct file_view *view )
|
||||
BYTE prot = get_page_vprot( addr );
|
||||
|
||||
TRACE( "View: %p - %p", addr, addr + view->size - 1 );
|
||||
@@ -39,7 +39,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
TRACE( " (builtin image)\n" );
|
||||
else if (view->protect & VPROT_FREE_PLACEHOLDER)
|
||||
TRACE( " (placeholder)\n" );
|
||||
@@ -1277,6 +1282,8 @@ struct alloc_area
|
||||
@@ -1332,6 +1337,8 @@ struct alloc_area
|
||||
int unix_prot;
|
||||
BOOL top_down;
|
||||
UINT_PTR align_mask;
|
||||
@@ -48,7 +48,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
@@ -1285,9 +1292,14 @@ struct alloc_area
|
||||
@@ -1340,9 +1347,13 @@ struct alloc_area
|
||||
* Try mmaping some expected free memory region, eventually stepping and
|
||||
* retrying inside it, and return where it actually succeeded, or NULL.
|
||||
*/
|
||||
@@ -60,12 +60,11 @@ index ec72d692c3a..30d43afc076 100644
|
||||
+ size_t abs_step = step > 0 ? step : -step;
|
||||
+ size_t size = area->size;
|
||||
+ int unix_prot = area->unix_prot;
|
||||
+ void *ptr;
|
||||
+
|
||||
while (start && base <= start && (char*)start + size <= (char*)end)
|
||||
{
|
||||
if (anon_mmap_tryfixed( start, size, unix_prot, 0 ) != MAP_FAILED) return start;
|
||||
@@ -1298,12 +1310,19 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
@@ -1353,12 +1364,19 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
|
||||
strerror(errno), start, (char *)start + size, unix_prot );
|
||||
return NULL;
|
||||
}
|
||||
@@ -86,7 +85,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -1727,11 +1746,11 @@ static void *try_map_free_area_range( struct alloc_area *area, char *start, char
|
||||
@@ -1791,11 +1809,11 @@ static void *try_map_free_area_range( struct alloc_area *area, char *start, char
|
||||
{
|
||||
if (end - start < area->size) return NULL;
|
||||
alloc_start = ROUND_ADDR( end - area->size, area->align_mask );
|
||||
@@ -100,7 +99,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
}
|
||||
|
||||
static void *alloc_free_area_in_range( struct alloc_area *area, char *base, char *end )
|
||||
@@ -1821,9 +1840,10 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
|
||||
@@ -1885,9 +1903,10 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
|
||||
struct range_entry *range, *ranges_start, *ranges_end;
|
||||
char *reserve_start, *reserve_end;
|
||||
struct alloc_area area;
|
||||
@@ -112,7 +111,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
|
||||
TRACE("limit %p-%p, size %p, top_down %#x.\n", limit_low, limit_high, (void *)size, top_down);
|
||||
|
||||
@@ -1888,6 +1908,50 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
|
||||
@@ -1952,6 +1971,50 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
|
||||
if ((result = alloc_free_area_in_range( &area, base, end )))
|
||||
break;
|
||||
}
|
||||
@@ -163,7 +162,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1947,6 +2011,17 @@ failed:
|
||||
@@ -2012,6 +2075,17 @@ failed:
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -181,10 +180,10 @@ index ec72d692c3a..30d43afc076 100644
|
||||
/***********************************************************************
|
||||
* map_view
|
||||
*
|
||||
@@ -1997,7 +2072,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
if (!align_mask) align_mask = granularity_mask;
|
||||
@@ -2067,7 +2141,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
|
||||
if (limit_high && (void *)limit_high < end) end = (char *)limit_high + 1;
|
||||
|
||||
if (!(ptr = alloc_free_area( (void *)limit_low, (void *)limit_high, size, top_down, get_unix_prot( vprot ), align_mask )))
|
||||
if (!(ptr = alloc_free_area( start, end, host_size, top_down, get_unix_prot( vprot ), align_mask )))
|
||||
- return STATUS_NO_MEMORY;
|
||||
+ {
|
||||
+ WARN("Allocation failed, clearing native views.\n");
|
||||
@@ -198,7 +197,7 @@ index ec72d692c3a..30d43afc076 100644
|
||||
}
|
||||
status = create_view( view_ret, ptr, size, vprot );
|
||||
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
|
||||
@@ -4346,7 +4429,12 @@ void virtual_set_force_exec( BOOL enable )
|
||||
@@ -4503,7 +4585,12 @@ void virtual_set_force_exec( BOOL enable )
|
||||
WINE_RB_FOR_EACH_ENTRY( view, &views_tree, struct file_view, entry )
|
||||
{
|
||||
/* file mappings are always accessible */
|
||||
@@ -213,5 +212,5 @@ index ec72d692c3a..30d43afc076 100644
|
||||
mprotect_range( view->base, view->size, commit, 0 );
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
2.49.0
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
From 03c96b5a2e215a7aa7d8c74ca3fbb5794fdcc95f Mon Sep 17 00:00:00 2001
|
||||
From afd4ad0f6725f49daaa0fe2351c98faa6a57519a Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 12:52:51 -0700
|
||||
Subject: kernelbase: Add support for deleting reparse points with DeleteFile.
|
||||
Subject: [PATCH] kernelbase: Add support for deleting reparse points with
|
||||
DeleteFile.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@@ -10,11 +11,11 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index 6214f549406..17c25eb5858 100644
|
||||
index 36b43d345d6..b7d16410d75 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -993,7 +993,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW( LPCWSTR path )
|
||||
|
||||
@@ -1002,7 +1002,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW( LPCWSTR path )
|
||||
InitializeObjectAttributes( &attr, &nameW, OBJ_CASE_INSENSITIVE, 0, NULL );
|
||||
status = NtCreateFile(&hFile, SYNCHRONIZE | DELETE, &attr, &io, NULL, 0,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
- FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0);
|
||||
@@ -24,10 +25,10 @@ index 6214f549406..17c25eb5858 100644
|
||||
|
||||
RtlFreeUnicodeString( &nameW );
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index f3aad01ee93..4e3f0f04a3e 100644
|
||||
index d4833d84906..598fdc77830 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5367,7 +5367,7 @@ static void test_reparse_points(void)
|
||||
@@ -6007,7 +6007,7 @@ static void test_reparse_points(void)
|
||||
REPARSE_GUID_DATA_BUFFER guid_buffer;
|
||||
static const WCHAR dotW[] = {'.',0};
|
||||
REPARSE_DATA_BUFFER *buffer = NULL;
|
||||
@@ -36,7 +37,7 @@ index f3aad01ee93..4e3f0f04a3e 100644
|
||||
IO_STATUS_BLOCK iosb;
|
||||
UNICODE_STRING nameW;
|
||||
HANDLE handle;
|
||||
@@ -5532,7 +5532,14 @@ static void test_reparse_points(void)
|
||||
@@ -6172,7 +6172,14 @@ static void test_reparse_points(void)
|
||||
bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
ok(bret, "Failed to create junction point! (0x%lx)\n", GetLastError());
|
||||
CloseHandle(handle);
|
||||
@@ -53,5 +54,5 @@ index f3aad01ee93..4e3f0f04a3e 100644
|
||||
cleanup:
|
||||
/* Cleanup */
|
||||
--
|
||||
2.17.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 762d7992e4a328d9fd94e3960c98951ead0e1a0a Mon Sep 17 00:00:00 2001
|
||||
From a34c3f550b16e84f907c637514f0645456420d65 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
|
||||
Date: Sat, 6 Feb 2021 12:46:30 -0700
|
||||
Subject: [PATCH] kernelbase: Add support for moving reparse points with
|
||||
@@ -13,11 +13,11 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
4 files changed, 36 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index abec5367512..d7c3797d4a9 100644
|
||||
index b7d16410d75..dccae6cb565 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -2580,7 +2580,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const
|
||||
|
||||
@@ -2514,7 +2514,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH MoveFileWithProgressW( const WCHAR *source, const
|
||||
InitializeObjectAttributes( &attr, &nt_name, OBJ_CASE_INSENSITIVE, 0, NULL );
|
||||
status = NtOpenFile( &source_handle, DELETE | SYNCHRONIZE, &attr, &io,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
- FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
@@ -26,10 +26,10 @@ index abec5367512..d7c3797d4a9 100644
|
||||
if (!set_ntstatus( status )) goto error;
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index a25b6820291..70b10c56ea0 100644
|
||||
index 8b561e162e8..7b6e2776947 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -5666,7 +5666,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags,
|
||||
@@ -6021,7 +6021,8 @@ static INT build_reparse_buffer(const WCHAR *filename, ULONG tag, ULONG flags,
|
||||
|
||||
static void test_reparse_points(void)
|
||||
{
|
||||
@@ -39,7 +39,7 @@ index a25b6820291..70b10c56ea0 100644
|
||||
static const WCHAR reparseW[] = {'\\','r','e','p','a','r','s','e',0};
|
||||
static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0};
|
||||
static const WCHAR parentW[] = {'\\','.','.','\\',0};
|
||||
@@ -6037,6 +6038,15 @@ static void test_reparse_points(void)
|
||||
@@ -6392,6 +6393,15 @@ static void test_reparse_points(void)
|
||||
wine_dbgstr_w(dest), wine_dbgstr_w(rel_target));
|
||||
CloseHandle(handle);
|
||||
|
||||
@@ -56,10 +56,10 @@ index a25b6820291..70b10c56ea0 100644
|
||||
/* Cleanup */
|
||||
pRtlFreeUnicodeString(&nameW);
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index 1b35463e069..d2e57f5a127 100644
|
||||
index d3045c6c936..49afb57b2b6 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -5395,8 +5395,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -5556,8 +5556,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
{
|
||||
FILE_RENAME_INFORMATION *info = ptr;
|
||||
unsigned int flags;
|
||||
@@ -70,7 +70,7 @@ index 1b35463e069..d2e57f5a127 100644
|
||||
char *unix_name;
|
||||
|
||||
if (class == FileRenameInformation)
|
||||
@@ -5413,6 +5415,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -5574,6 +5576,19 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
InitializeObjectAttributes( &attr, &name_str, OBJ_CASE_INSENSITIVE, info->RootDirectory, NULL );
|
||||
get_redirect( &attr, &redir );
|
||||
|
||||
@@ -90,7 +90,7 @@ index 1b35463e069..d2e57f5a127 100644
|
||||
status = nt_to_unix_file_name( &attr, &unix_name, FILE_OPEN_IF );
|
||||
if (status == STATUS_SUCCESS || status == STATUS_NO_SUCH_FILE)
|
||||
{
|
||||
@@ -5429,9 +5444,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
@@ -5590,9 +5605,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
@@ -106,10 +106,10 @@ index 1b35463e069..d2e57f5a127 100644
|
||||
else status = STATUS_INVALID_PARAMETER_3;
|
||||
break;
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index b0cbf28d543..5f1b4ac3114 100644
|
||||
index dd6a61c557d..dde92beb664 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2695,7 +2695,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2724,7 +2724,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
goto failed;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ index b0cbf28d543..5f1b4ac3114 100644
|
||||
{
|
||||
if (!fstat( fd->unix_fd, &st2 ) && st.st_ino == st2.st_ino && st.st_dev == st2.st_dev)
|
||||
{
|
||||
@@ -2711,7 +2711,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2740,7 +2740,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
}
|
||||
|
||||
/* can't replace directories or special files */
|
||||
@@ -127,7 +127,7 @@ index b0cbf28d543..5f1b4ac3114 100644
|
||||
{
|
||||
set_error( STATUS_ACCESS_DENIED );
|
||||
goto failed;
|
||||
@@ -2769,6 +2769,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
@@ -2806,6 +2806,8 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr, da
|
||||
fd->nt_name = dup_nt_name( root, nt_name, &fd->nt_namelen );
|
||||
free( fd->unix_name );
|
||||
fd->closed->unix_name = fd->unix_name = realpath( name, NULL );
|
||||
@@ -137,5 +137,5 @@ index b0cbf28d543..5f1b4ac3114 100644
|
||||
if (!fd->unix_name)
|
||||
set_error( STATUS_NO_MEMORY );
|
||||
--
|
||||
2.42.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 2cf5a014dcd6f85a1afa76ad8ca6c65f2c17db39 Mon Sep 17 00:00:00 2001
|
||||
From e941585d942942f7b97b73ae24b9a0a486a855e4 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 14 Jul 2020 15:00:34 +0300
|
||||
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/ntdll/unix/signal_x86_64.c | 195 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 196 insertions(+)
|
||||
dlls/ntdll/unix/signal_x86_64.c | 203 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 204 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ef21a4313d4..db709285f79 100644
|
||||
index 8192c067e4c..d4abbdb3f37 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -384,6 +384,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -391,6 +391,7 @@ AC_CHECK_HEADERS(\
|
||||
linux/ioctl.h \
|
||||
linux/major.h \
|
||||
linux/param.h \
|
||||
@@ -21,7 +21,7 @@ index ef21a4313d4..db709285f79 100644
|
||||
linux/types.h \
|
||||
linux/ucdrom.h \
|
||||
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
|
||||
index 537e4e1f60e..58397374ea4 100644
|
||||
index fb5259d8714..93020158d0b 100644
|
||||
--- a/dlls/ntdll/unix/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/unix/signal_x86_64.c
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -41,8 +41,8 @@ index 537e4e1f60e..58397374ea4 100644
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_MACHINE_SYSARCH_H
|
||||
# include <machine/sysarch.h>
|
||||
@@ -65,6 +68,14 @@
|
||||
# include <mach/mach.h>
|
||||
@@ -73,6 +76,14 @@
|
||||
extern void _thread_set_tsd_base(uint64_t);
|
||||
#endif
|
||||
|
||||
+#if defined(HAVE_LINUX_FILTER_H) && defined(HAVE_LINUX_SECCOMP_H) && defined(HAVE_SYS_PRCTL_H)
|
||||
@@ -56,7 +56,7 @@ index 537e4e1f60e..58397374ea4 100644
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
@@ -1824,6 +1835,186 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
@@ -1857,6 +1868,194 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -146,14 +146,22 @@ index 537e4e1f60e..58397374ea4 100644
|
||||
+
|
||||
+ static struct sock_filter filter[] =
|
||||
+ {
|
||||
+ BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, instruction_pointer) + 4),
|
||||
+ /* Native libs are loaded at high addresses. */
|
||||
+ BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, NATIVE_SYSCALL_ADDRESS_START >> 32, 0, 1),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ /* Allow i386. */
|
||||
+ BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, arch)),
|
||||
+ BPF_JUMP (BPF_JMP | BPF_JEQ | BPF_K, AUDIT_ARCH_X86_64, 1, 0),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ /* Native libs are loaded at high addresses. */
|
||||
+ BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, instruction_pointer) + 4),
|
||||
+ BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, NATIVE_SYSCALL_ADDRESS_START >> 32, 0, 8),
|
||||
+ /* High addresses may be top-down allocations, trap those */
|
||||
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x7fff, 1, 0),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, instruction_pointer)),
|
||||
+ BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0xfe000000, 1, 0),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0xffff0000, 0, 1),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
|
||||
+ BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_TRAP),
|
||||
+ /* Allow wine64-preloader */
|
||||
+ BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, instruction_pointer)),
|
||||
+ BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0x7d400000, 1, 0),
|
||||
@@ -243,7 +251,7 @@ index 537e4e1f60e..58397374ea4 100644
|
||||
|
||||
/***********************************************************************
|
||||
* handle_interrupt
|
||||
@@ -2560,10 +2751,14 @@ void signal_init_process(void)
|
||||
@@ -2567,10 +2766,14 @@ void signal_init_process(void)
|
||||
if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error;
|
||||
if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error;
|
||||
@@ -259,5 +267,5 @@ index 537e4e1f60e..58397374ea4 100644
|
||||
|
||||
error:
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
From cace313e628d0edd434f6f30c911f7bd91062adb Mon Sep 17 00:00:00 2001
|
||||
From cbca8076ac6f6efe8d6832775b56cdd40fe8108b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:44:43 +1000
|
||||
Subject: [PATCH 07/15] odbc32: Load function pointer for SQLBindParam
|
||||
Subject: [PATCH] odbc32: Load function pointer for SQLBindParam
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index c4e1c046edc..6eb15687f92 100644
|
||||
index d11b4122776..9a079175d42 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -50,6 +50,7 @@ struct win32_funcs
|
||||
@@ -28,5 +28,5 @@ index c4e1c046edc..6eb15687f92 100644
|
||||
LOAD_FUNCPTR( SQLBrowseConnect )
|
||||
LOAD_FUNCPTR( SQLBrowseConnectW )
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,21 +1,23 @@
|
||||
From 1b2068b8f8adc036d0c2b9cda00c37cd55330b41 Mon Sep 17 00:00:00 2001
|
||||
From 1a1b88dd5a0a23c64bf4aee2e64f30c418181be0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:40:32 +1000
|
||||
Subject: [PATCH] odbc32: SQLBindParameter handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
dlls/odbc32/proxyodbc.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 8f53fa71668..7099027c2b4 100644
|
||||
index 9a079175d42..aa886d01e33 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -5242,6 +5242,29 @@ static SQLRETURN bind_parameter_win32( struct statement *stmt, SQLUSMALLINT para
|
||||
if (stmt->hdr.win32_funcs->SQLBindParameter)
|
||||
return stmt->hdr.win32_funcs->SQLBindParameter( stmt->hdr.win32_handle, param, io_type, value_type,
|
||||
param_type, size, digits, value, buflen, len );
|
||||
+ else if(stmt->hdr.win32_funcs->SQLBindParam)
|
||||
@@ -5524,9 +5524,37 @@ static SQLRETURN bind_parameter_win32( struct statement *stmt, SQLUSMALLINT para
|
||||
SQLSMALLINT value_type, SQLSMALLINT param_type, SQLULEN size,
|
||||
SQLSMALLINT digits, SQLPOINTER value, SQLLEN buflen, SQLLEN *len )
|
||||
{
|
||||
+ struct environment *env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+
|
||||
+ if (env && env->attr_version == SQL_OV_ODBC3 && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ /* TODO: Make function */
|
||||
@@ -32,8 +34,14 @@ index 8f53fa71668..7099027c2b4 100644
|
||||
+ else if (param_type == SQL_DATE)
|
||||
+ param_type = SQL_TYPE_DATE;
|
||||
+ else if (param_type == SQL_TIMESTAMP)
|
||||
+ param_type = SQL_TYPE_TIMESTAMP;;;
|
||||
+ param_type = SQL_TYPE_TIMESTAMP;
|
||||
+ }
|
||||
+
|
||||
if (stmt->hdr.win32_funcs->SQLBindParameter)
|
||||
return stmt->hdr.win32_funcs->SQLBindParameter( stmt->hdr.win32_handle, param, io_type, value_type,
|
||||
param_type, size, digits, value, buflen, len );
|
||||
+ else if(stmt->hdr.win32_funcs->SQLBindParam)
|
||||
+ {
|
||||
+ return stmt->hdr.win32_funcs->SQLBindParam( stmt->hdr.win32_handle, param, value_type, param_type,
|
||||
+ size, digits, value, len);
|
||||
+ }
|
||||
@@ -42,5 +50,5 @@ index 8f53fa71668..7099027c2b4 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1b5f6b996f8a1f314e935657f5e205717ace23b4 Mon Sep 17 00:00:00 2001
|
||||
From 987b50c3a705029e222f444caa453729483eac67 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:55:47 +1000
|
||||
Subject: [PATCH] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 7099027c2b4..632738b9533 100644
|
||||
index aa886d01e33..4fdd242f3b5 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -6334,6 +6334,11 @@ static SQLRETURN set_connect_attr_win32_w( struct connection *con, SQLINTEGER at
|
||||
@@ -6713,6 +6713,11 @@ static SQLRETURN set_connect_attr_win32_w( struct connection *con, SQLINTEGER at
|
||||
if (con->hdr.win32_funcs->SQLSetConnectAttrW)
|
||||
return con->hdr.win32_funcs->SQLSetConnectAttrW( con->hdr.win32_handle, attr, value, len );
|
||||
if (con->hdr.win32_funcs->SQLSetConnectAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
|
||||
@@ -24,5 +24,5 @@ index 7099027c2b4..632738b9533 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 02836ce54a6a32a72cc696f783f6241da23fa385 Mon Sep 17 00:00:00 2001
|
||||
From 7d25d7fa0ee65c209e8c58f6ce276416931d8052 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 18 Jul 2024 07:13:48 +1000
|
||||
Subject: [PATCH] odbc32: Record loaded driver SQL_ATTR_ODBC_VERSION
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] odbc32: Record loaded driver SQL_ATTR_ODBC_VERSION
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index d48c3d822fa..1977e766950 100644
|
||||
index 4fdd242f3b5..c0ab9db9879 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -463,6 +463,7 @@ static struct environment *create_environment( void )
|
||||
@@ -464,6 +464,7 @@ static struct environment *create_environment( void )
|
||||
if (!(ret = calloc( 1, sizeof(*ret) ))) return NULL;
|
||||
init_object( &ret->hdr, SQL_HANDLE_ENV, NULL );
|
||||
ret->attr_version = SQL_OV_ODBC2;
|
||||
@@ -20,7 +20,7 @@ index d48c3d822fa..1977e766950 100644
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1173,6 +1174,9 @@ static SQLRETURN set_env_attr( struct environment *env, SQLINTEGER attr, SQLPOIN
|
||||
@@ -1265,6 +1266,9 @@ static SQLRETURN set_env_attr( struct environment *env, SQLINTEGER attr, SQLPOIN
|
||||
}
|
||||
else if (env->hdr.win32_handle)
|
||||
{
|
||||
@@ -31,10 +31,10 @@ index d48c3d822fa..1977e766950 100644
|
||||
ret = env->hdr.win32_funcs->SQLSetEnvAttr( env->hdr.win32_handle, attr, value, len );
|
||||
}
|
||||
diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h
|
||||
index c771e16f9e3..05ee89c57db 100644
|
||||
index c865a83711d..4ff13a68add 100644
|
||||
--- a/dlls/odbc32/unixlib.h
|
||||
+++ b/dlls/odbc32/unixlib.h
|
||||
@@ -211,6 +211,7 @@ struct environment
|
||||
@@ -205,6 +205,7 @@ struct environment
|
||||
UINT32 sources_idx;
|
||||
void *sources_key;
|
||||
BOOL sources_system;
|
||||
@@ -43,5 +43,5 @@ index c771e16f9e3..05ee89c57db 100644
|
||||
|
||||
struct connection
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2d897946980e67f742b9f39f5f548cf0e2340510 Mon Sep 17 00:00:00 2001
|
||||
From bf0ca6561dde86d00f9362e07c2ceb4fb7001c5f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 21:55:20 +1000
|
||||
Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 3b3b198eaa8..c2748cd33d7 100644
|
||||
index c0ab9db9879..64740bd5169 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2450,11 +2450,35 @@ static SQLRETURN get_data_unix( struct statement *stmt, SQLUSMALLINT column, SQL
|
||||
@@ -2468,11 +2468,35 @@ static SQLRETURN get_data_unix( struct statement *stmt, SQLUSMALLINT column, SQL
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ index 3b3b198eaa8..c2748cd33d7 100644
|
||||
if (stmt->hdr.win32_funcs->SQLGetData)
|
||||
+ {
|
||||
+ struct environment *env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+ if (env && env->attr_version == SQL_OV_ODBC2)
|
||||
+ if (env && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ if (type == SQL_C_TYPE_TIME)
|
||||
+ type = SQL_C_TIME;
|
||||
@@ -48,5 +48,5 @@ index 3b3b198eaa8..c2748cd33d7 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user