Added patch to ignore higher bits in selector for ThreadDescriptorTableEntry info query.

This commit is contained in:
Sebastian Lackner 2015-09-13 23:06:26 +02:00
parent ff9f5115fb
commit 0a96d76b16
5 changed files with 56 additions and 1 deletions

View File

@ -39,8 +39,9 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [1]:**
**Bug fixes and features included in the next upcoming release [2]:**
* Ignore higher bits in selector for ThreadDescriptorTableEntry info query
* Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory

2
debian/changelog vendored
View File

@ -1,6 +1,8 @@
wine-staging (1.7.52) UNRELEASED; urgency=low
* Added patch to return STATUS_INVALID_DEVICE_REQUEST when trying to call
NtReadFile on directory.
* Added patch to ignore higher bits in selector for ThreadDescriptorTableEntry
info query.
* Removed patch to fix possible memory leak in netprofm init_networks (fixed
upstream).
* Removed patch for stub of dwmapi.DwmUpdateThumbnailProperties (accepted

View File

@ -0,0 +1,35 @@
From a8f0b6092f5f1a52ca87bf6fc2822fe0b4edcc84 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 13 Sep 2015 23:03:43 +0200
Subject: ntdll: Ignore higher bits in selector for ThreadDescriptorTableEntry
info query.
---
dlls/ntdll/thread.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 0be5585..5799f27 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -1062,7 +1062,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
status = STATUS_INFO_LENGTH_MISMATCH;
else if (!(tdi->Selector & 4)) /* GDT selector */
{
- unsigned sel = tdi->Selector & ~3; /* ignore RPL */
+ unsigned sel = LOWORD(tdi->Selector) & ~3; /* ignore RPL */
status = STATUS_SUCCESS;
if (!sel) /* null selector */
memset( &tdi->Entry, 0, sizeof(tdi->Entry) );
@@ -1093,7 +1093,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_START_REQ( get_selector_entry )
{
req->handle = wine_server_obj_handle( handle );
- req->entry = tdi->Selector >> 3;
+ req->entry = LOWORD(tdi->Selector) >> 3;
status = wine_server_call( req );
if (!status)
{
--
2.5.1

View File

@ -0,0 +1 @@
Fixes: Ignore higher bits in selector for ThreadDescriptorTableEntry info query

View File

@ -202,6 +202,7 @@ patch_enable_all ()
enable_ntdll_Stack_Fault="$1"
enable_ntdll_Status_Mapping="$1"
enable_ntdll_SystemRoot_Symlink="$1"
enable_ntdll_ThreadDescriptorTableEntry="$1"
enable_ntdll_ThreadTime="$1"
enable_ntdll_Threading="$1"
enable_ntdll_User_Shared_Data="$1"
@ -700,6 +701,9 @@ patch_enable ()
ntdll-SystemRoot_Symlink)
enable_ntdll_SystemRoot_Symlink="$2"
;;
ntdll-ThreadDescriptorTableEntry)
enable_ntdll_ThreadDescriptorTableEntry="$2"
;;
ntdll-ThreadTime)
enable_ntdll_ThreadTime="$2"
;;
@ -4185,6 +4189,18 @@ if test "$enable_ntdll_SystemRoot_Symlink" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-ThreadDescriptorTableEntry
# |
# | Modified files:
# | * dlls/ntdll/thread.c
# |
if test "$enable_ntdll_ThreadDescriptorTableEntry" -eq 1; then
patch_apply ntdll-ThreadDescriptorTableEntry/0001-ntdll-Ignore-higher-bits-in-selector-for-ThreadDescr.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Ignore higher bits in selector for ThreadDescriptorTableEntry info query.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-ThreadTime
# |
# | This patchset fixes the following Wine bugs: