summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-emulation/open-vm-tools/ChangeLog6
-rw-r--r--app-emulation/open-vm-tools/files/checkvm-pie-safety.patch60
-rw-r--r--app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild4
3 files changed, 67 insertions, 3 deletions
diff --git a/app-emulation/open-vm-tools/ChangeLog b/app-emulation/open-vm-tools/ChangeLog
index ad94d754203e..5ca9bc498ed9 100644
--- a/app-emulation/open-vm-tools/ChangeLog
+++ b/app-emulation/open-vm-tools/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-emulation/open-vm-tools
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/ChangeLog,v 1.26 2009/10/29 14:14:51 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/ChangeLog,v 1.27 2009/11/07 13:46:16 vadimk Exp $
+
+ 07 Nov 2009; Vadim Kuznetsov vadimk@gentoo.org
+ open-vm-tools-0.0.20091015.201664.ebuild, +files/checkvm-pie-safety.patch:
+ Bug 200376. Thanks to Gordon Malm and Anthony Basile.
*open-vm-tools-0.0.20091015.201664 (29 Oct 2009)
diff --git a/app-emulation/open-vm-tools/files/checkvm-pie-safety.patch b/app-emulation/open-vm-tools/files/checkvm-pie-safety.patch
new file mode 100644
index 000000000000..ec46c5e2b347
--- /dev/null
+++ b/app-emulation/open-vm-tools/files/checkvm-pie-safety.patch
@@ -0,0 +1,60 @@
+--- a/checkvm/checkvm.c
++++ b/checkvm/checkvm.c
+@@ -79,8 +79,16 @@
+ {
+ uint32 eax, ebx, ecx, edx;
+
+- __asm__ volatile("inl (%%dx)" :
+- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
++ __asm__ volatile(
++#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler.
++ "movl %%ebx, %3 \n\t"
++ "inl (%%dx) \n\t"
++ "xchgl %%ebx, %3 \n\t" :
++ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) :
++#else
++ "inl (%%dx)" :
++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
++#endif
+ "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION),
+ "2"(BDOOR_PORT) : "memory");
+ version[0] = eax;
+@@ -96,8 +104,16 @@
+ {
+ uint32 eax, ebx, ecx, edx;
+
+- __asm__ volatile("inl (%%dx)" :
+- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
++ __asm__ volatile(
++#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler.
++ "movl %%ebx, %3 \n\t"
++ "inl (%%dx) \n\t"
++ "xchgl %%ebx, %3 \n\t" :
++ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) :
++#else
++ "inl (%%dx)" :
++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
++#endif
+ "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION),
+ "2"(BDOOR_PORT) : "memory");
+ *hwVersion = eax;
+@@ -112,8 +128,16 @@
+ {
+ uint32 eax, ebx, ecx, edx;
+
+- __asm__ volatile("inl (%%dx)" :
+- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
++ __asm__ volatile(
++#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler.
++ "movl %%ebx, %3 \n\t"
++ "inl (%%dx) \n\t"
++ "xchgl %%ebx, %3 \n\t" :
++ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) :
++#else
++ "inl (%%dx)" :
++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) :
++#endif
+ "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETSCREENSIZE),
+ "2"(BDOOR_PORT) : "memory");
+ *screensize = eax;
+
diff --git a/app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild b/app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild
index cc0501252cc2..b41ef8007349 100644
--- a/app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild
+++ b/app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild,v 1.1 2009/10/29 14:14:51 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/open-vm-tools-0.0.20091015.201664.ebuild,v 1.2 2009/11/07 13:46:16 vadimk Exp $
EAPI="2"
@@ -60,7 +60,7 @@ pkg_setup() {
src_prepare() {
epatch "${FILESDIR}/default-scripts1.patch"
- #epatch "${FILESDIR}/checkvm-pie-safety.patch"
+ epatch "${FILESDIR}/checkvm-pie-safety.patch"
sed -i -e 's/proc-3.2.7/proc/g' configure || die "sed configure failed"
sed -i -e 's/CFLAGS=.*Werror/#&/g' configure || die "sed comment out Werror failed"
}