Removed patch to use assembly wrapper for TLS callbacks (accepted upstream).

This commit is contained in:
Sebastian Lackner 2014-09-08 21:15:09 +02:00
parent 9a4a7e1cb3
commit 797ead4b3c
6 changed files with 5 additions and 104 deletions

View File

@ -90,7 +90,7 @@ Included bugfixes and improvements
* Support for setcap on wine-preloader ([Wine Bug #26256](http://bugs.winehq.org/show_bug.cgi?id=26256 "wine64-preloader can't handle setcap cap_net_raw+epi"))
* Support for stored file ACLs ([Wine Bug #31858](http://bugs.winehq.org/show_bug.cgi?id=31858 "Netflix on Firefox fails with Internet Connection Problem when loading bar is at 99%"))
* Support for ws2_32.inet_pton ([Wine Bug #36713](http://bugs.winehq.org/show_bug.cgi?id=36713 "Watch_Dogs requires ws2_32.inet_pton"))
* Use assembly wrapper to run TLS callbacks ([Wine Bug #21917](http://bugs.winehq.org/show_bug.cgi?id=21917 "SC2 'LazyLaunch' v2.0 fails with 'Exception frame is not in stack limits => unable to dispatch exception.' (TLS callbacks can taint EBP, needs assembly wrapper)"))
* ~~Use assembly wrapper to run TLS callbacks~~ ([Wine Bug #21917](http://bugs.winehq.org/show_bug.cgi?id=21917 "SC2 'LazyLaunch' v2.0 fails with 'Exception frame is not in stack limits => unable to dispatch exception.' (TLS callbacks can taint EBP, needs assembly wrapper)"))
* Use manual relay for RunDLL_CallEntry16 in shell32 ([Wine Bug #23033](http://bugs.winehq.org/show_bug.cgi?id=23033 "Tages Protection v5.x: games report \"DLL not found shell.dll16.dll\" (Runaway 2: The Dream Of The Turtle, ...)"))
* Workaround for shlwapi URLs with relative paths
* XEMBED support for embedding Wine windows inside Linux applications

4
debian/changelog vendored
View File

@ -1,3 +1,7 @@
wine-compholio (1.7.27) UNRELEASED; urgency=low
* Removed patch to use assembly wrapper for TLS callbacks (accepted upstream).
-- Erich E. Hoover <erich.e.hoover@gmail.com> Mon, 08 Sep 2014 21:14:36 +0200
wine-compholio (1.7.26) unstable; urgency=low
* Added new make targets 'series' and 'install-git'.
* Some improvements in the patch system scripts.

View File

@ -46,7 +46,6 @@ PATCHLIST := \
ntdll-Heap_FreeLists.ok \
ntdll-Junction_Points.ok \
ntdll-Pipe_SpecialCharacters.ok \
ntdll-Save_Regs_Entrypoint.ok \
ntdll-loader_EntryPoint.ok \
quartz-MediaSeeking_Positions.ok \
riched20-IText_Interface.ok \
@ -653,25 +652,6 @@ ntdll-Pipe_SpecialCharacters.ok:
echo '+ { "ntdll-Pipe_SpecialCharacters", "Michael Müller", "Allow special characters in pipe names." },'; \
) > ntdll-Pipe_SpecialCharacters.ok
# Patchset ntdll-Save_Regs_Entrypoint
# |
# | Included patches:
# | * Use assembly wrapper to run TLS callbacks and save EBP. [by Sebastian Lackner]
# |
# | This patchset fixes the following Wine bugs:
# | * [#21917] Use assembly wrapper to run TLS callbacks
# |
# | Modified files:
# | * dlls/ntdll/loader.c
# |
.INTERMEDIATE: ntdll-Save_Regs_Entrypoint.ok
ntdll-Save_Regs_Entrypoint.ok:
$(call APPLY_FILE,ntdll-Save_Regs_Entrypoint/0001-ntdll-Save-more-registers-in-call_dll_entry_point-on.patch)
$(call APPLY_FILE,ntdll-Save_Regs_Entrypoint/0002-ntdll-Use-call_dll_entry_point-to-execute-TLS-callba.patch)
@( \
echo '+ { "ntdll-Save_Regs_Entrypoint", "Sebastian Lackner", "Use assembly wrapper to run TLS callbacks and save EBP." },'; \
) > ntdll-Save_Regs_Entrypoint.ok
# Patchset ntdll-loader_EntryPoint
# |
# | Included patches:

View File

@ -1,54 +0,0 @@
From eaee4cd11725df0a44649ae7ee1a6bdaeeb8dfcc Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 7 Sep 2014 01:46:26 +0200
Subject: ntdll: Save more registers in call_dll_entry_point on i386.
---
dlls/ntdll/loader.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 79aa341..dfe7516 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -142,7 +142,9 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
* call_dll_entry_point
*
* Some brain-damaged dlls (ir32_32.dll for instance) modify ebx in
- * their entry point, so we need a small asm wrapper.
+ * their entry point, so we need a small asm wrapper. Testing indicates
+ * that only modifying esi leads to a crash, so use this one to backup
+ * ebp while running the dll entry proc.
*/
#ifdef __i386__
extern BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module, UINT reason, void *reserved );
@@ -154,13 +156,24 @@ __ASM_GLOBAL_FUNC(call_dll_entry_point,
__ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
"pushl %ebx\n\t"
__ASM_CFI(".cfi_rel_offset %ebx,-4\n\t")
- "subl $8,%esp\n\t"
+ "pushl %esi\n\t"
+ __ASM_CFI(".cfi_rel_offset %esi,-8\n\t")
+ "pushl %edi\n\t"
+ __ASM_CFI(".cfi_rel_offset %edi,-12\n\t")
+ "movl %ebp,%esi\n\t"
+ __ASM_CFI(".cfi_def_cfa_register %esi\n\t")
"pushl 20(%ebp)\n\t"
"pushl 16(%ebp)\n\t"
"pushl 12(%ebp)\n\t"
"movl 8(%ebp),%eax\n\t"
"call *%eax\n\t"
- "leal -4(%ebp),%esp\n\t"
+ "movl %esi,%ebp\n\t"
+ __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
+ "leal -12(%ebp),%esp\n\t"
+ "popl %edi\n\t"
+ __ASM_CFI(".cfi_same_value %edi\n\t")
+ "popl %esi\n\t"
+ __ASM_CFI(".cfi_same_value %esi\n\t")
"popl %ebx\n\t"
__ASM_CFI(".cfi_same_value %ebx\n\t")
"popl %ebp\n\t"
--
2.1.0

View File

@ -1,25 +0,0 @@
From 507cba6fbcec06846ac90e62a76aaa61117f21fd Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 7 Sep 2014 01:46:52 +0200
Subject: ntdll: Use call_dll_entry_point to execute TLS callbacks.
---
dlls/ntdll/loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index dfe7516..bd160d9 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1030,7 +1030,7 @@ static void call_tls_callbacks( HMODULE module, UINT reason )
GetCurrentThreadId(), *callback, module, reason_names[reason] );
__TRY
{
- (*callback)( module, reason, NULL );
+ call_dll_entry_point( (DLLENTRYPROC)(*callback), module, reason, NULL );
}
__EXCEPT_ALL
{
--
2.1.0

View File

@ -1,4 +0,0 @@
Author: Sebastian Lackner
Subject: Use assembly wrapper to run TLS callbacks and save EBP.
Revision: 1
Fixes: [21917] Use assembly wrapper to run TLS callbacks