diff --git a/README.md b/README.md index 7896e4a1..9f16a3b7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/debian/changelog b/debian/changelog index cd527e89..56afbec6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/patches/ntdll-ThreadDescriptorTableEntry/0001-ntdll-Ignore-higher-bits-in-selector-for-ThreadDescr.patch b/patches/ntdll-ThreadDescriptorTableEntry/0001-ntdll-Ignore-higher-bits-in-selector-for-ThreadDescr.patch new file mode 100644 index 00000000..99a8a1e8 --- /dev/null +++ b/patches/ntdll-ThreadDescriptorTableEntry/0001-ntdll-Ignore-higher-bits-in-selector-for-ThreadDescr.patch @@ -0,0 +1,35 @@ +From a8f0b6092f5f1a52ca87bf6fc2822fe0b4edcc84 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +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 + diff --git a/patches/ntdll-ThreadDescriptorTableEntry/definition b/patches/ntdll-ThreadDescriptorTableEntry/definition new file mode 100644 index 00000000..440834ac --- /dev/null +++ b/patches/ntdll-ThreadDescriptorTableEntry/definition @@ -0,0 +1 @@ +Fixes: Ignore higher bits in selector for ThreadDescriptorTableEntry info query diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 1a97093b..a685e6b5 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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: