From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AEA9D138D11 for ; Fri, 10 Jul 2015 23:42:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3616214025; Fri, 10 Jul 2015 23:42:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B66E614025 for ; Fri, 10 Jul 2015 23:42:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 93FAD3408BE for ; Fri, 10 Jul 2015 23:42:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B944773C for ; Fri, 10 Jul 2015 23:42:24 +0000 (UTC) From: "Evan Teran" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Evan Teran" Message-ID: <1436154463.b5fe5509592d54689ed4c4eb0633507bcda8219b.eteran@gentoo> Subject: [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-modules/files/, app-emulation/vmware-modules/ X-VCS-Repository: proj/vmware X-VCS-Files: app-emulation/vmware-modules/files/304-apic.patch app-emulation/vmware-modules/files/304-hardened.patch app-emulation/vmware-modules/files/304-netdevice.patch app-emulation/vmware-modules/vmware-modules-304.0.ebuild X-VCS-Directories: app-emulation/vmware-modules/ app-emulation/vmware-modules/files/ X-VCS-Committer: eteran X-VCS-Committer-Name: Evan Teran X-VCS-Revision: b5fe5509592d54689ed4c4eb0633507bcda8219b X-VCS-Branch: master Date: Fri, 10 Jul 2015 23:42:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: df3de766-fce8-426d-a36a-cdf783537a6a X-Archives-Hash: 70458ebf015e39f41b93912426885810 commit: b5fe5509592d54689ed4c4eb0633507bcda8219b Author: Evan Teran gmail com> AuthorDate: Mon Jul 6 03:47:43 2015 +0000 Commit: Evan Teran gmail com> CommitDate: Mon Jul 6 03:47:43 2015 +0000 URL: https://gitweb.gentoo.org/proj/vmware.git/commit/?id=b5fe5509 adding some minor patches that were applied to previous versions probably not 100% necessary, but they don't hurt either Package-Manager: portage-2.2.20 app-emulation/vmware-modules/files/304-apic.patch | 12 +++ .../vmware-modules/files/304-hardened.patch | 113 +++++++++++++++++++++ .../vmware-modules/files/304-netdevice.patch | 24 +++++ .../vmware-modules/vmware-modules-304.0.ebuild | 4 + 4 files changed, 153 insertions(+) diff --git a/app-emulation/vmware-modules/files/304-apic.patch b/app-emulation/vmware-modules/files/304-apic.patch new file mode 100644 index 0000000..66cd459 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-apic.patch @@ -0,0 +1,12 @@ +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index f1f4b10..c43242f 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -55,6 +55,7 @@ + #include + #include + ++#include + + #include "vmware.h" + #include "x86apic.h" diff --git a/app-emulation/vmware-modules/files/304-hardened.patch b/app-emulation/vmware-modules/files/304-hardened.patch new file mode 100644 index 0000000..cc3e041 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-hardened.patch @@ -0,0 +1,113 @@ +diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c +index b21dd44..960c2aa 100644 +--- a/vmmon-only/linux/driver.c ++++ b/vmmon-only/linux/driver.c +@@ -178,7 +178,22 @@ static struct vm_operations_struct vmuser_mops = { + #endif + }; + +-static struct file_operations vmuser_fops; ++static struct file_operations vmuser_fops = { ++ .owner = THIS_MODULE, ++ .poll = LinuxDriverPoll, ++#ifdef HAVE_UNLOCKED_IOCTL ++ .unlocked_ioctl = LinuxDriver_UnlockedIoctl, ++#else ++ .ioctl = LinuxDriver_Ioctl, ++#endif ++#ifdef HAVE_COMPAT_IOCTL ++ .compat_ioctl = LinuxDriver_UnlockedIoctl, ++#endif ++ .open = LinuxDriver_Open, ++ .release = LinuxDriver_Close, ++ .mmap = LinuxDriverMmap ++}; ++ + static struct timer_list tscTimer; + + /* +@@ -357,27 +372,6 @@ init_module(void) + spin_lock_init(&linuxState.pollListLock); + #endif + +- /* +- * Initialize the file_operations structure. Because this code is always +- * compiled as a module, this is fine to do it here and not in a static +- * initializer. +- */ +- +- memset(&vmuser_fops, 0, sizeof vmuser_fops); +- vmuser_fops.owner = THIS_MODULE; +- vmuser_fops.poll = LinuxDriverPoll; +-#ifdef HAVE_UNLOCKED_IOCTL +- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl; +-#else +- vmuser_fops.ioctl = LinuxDriver_Ioctl; +-#endif +-#ifdef HAVE_COMPAT_IOCTL +- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl; +-#endif +- vmuser_fops.open = LinuxDriver_Open; +- vmuser_fops.release = LinuxDriver_Close; +- vmuser_fops.mmap = LinuxDriverMmap; +- + #ifdef VMX86_DEVEL + devel_init_module(); + linuxState.minor = 0; +diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c +index b12b982..40bd4cf 100644 +--- a/vmnet-only/driver.c ++++ b/vmnet-only/driver.c +@@ -165,7 +165,22 @@ static long VNetFileOpUnlockedIoctl(struct file * filp, + unsigned int iocmd, unsigned long ioarg); + #endif + +-static struct file_operations vnetFileOps; ++static struct file_operations vnetFileOps = { ++ .owner = THIS_MODULE, ++ .read = VNetFileOpRead, ++ .write = VNetFileOpWrite, ++ .poll = VNetFileOpPoll, ++#ifdef HAVE_UNLOCKED_IOCTL ++ .unlocked_ioctl = VNetFileOpUnlockedIoctl, ++#else ++ .ioctl = VNetFileOpIoctl, ++#endif ++#ifdef HAVE_COMPAT_IOCTL ++ .compat_ioctl = VNetFileOpUnlockedIoctl, ++#endif ++ .open = VNetFileOpOpen, ++ .release = VNetFileOpClose ++}; + + /* + * Utility functions +@@ -476,28 +491,6 @@ init_module(void) + goto err_proto; + } + +- /* +- * Initialize the file_operations structure. Because this code is always +- * compiled as a module, this is fine to do it here and not in a static +- * initializer. +- */ +- +- memset(&vnetFileOps, 0, sizeof vnetFileOps); +- vnetFileOps.owner = THIS_MODULE; +- vnetFileOps.read = VNetFileOpRead; +- vnetFileOps.write = VNetFileOpWrite; +- vnetFileOps.poll = VNetFileOpPoll; +-#ifdef HAVE_UNLOCKED_IOCTL +- vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl; +-#else +- vnetFileOps.ioctl = VNetFileOpIoctl; +-#endif +-#ifdef HAVE_COMPAT_IOCTL +- vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl; +-#endif +- vnetFileOps.open = VNetFileOpOpen; +- vnetFileOps.release = VNetFileOpClose; +- + retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps); + if (retval) { + LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n", diff --git a/app-emulation/vmware-modules/files/304-netdevice.patch b/app-emulation/vmware-modules/files/304-netdevice.patch new file mode 100644 index 0000000..35231a3 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-netdevice.patch @@ -0,0 +1,24 @@ +diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h +index 7a56304..9ff4548 100644 +--- a/vmnet-only/compat_netdevice.h ++++ b/vmnet-only/compat_netdevice.h +@@ -47,6 +47,19 @@ + # define net_device device + #endif + ++/* it looks like these have been removed from the kernel 3.1 ++ * probably because the "transition" is considered complete. ++ * so to keep this source compatible we just redefine them like they were ++ * previously ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) ++#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev ++ functions are available. */ ++#define HAVE_FREE_NETDEV /* free_netdev() */ ++#define HAVE_NETDEV_PRIV /* netdev_priv() */ ++#define HAVE_NETIF_QUEUE ++#define HAVE_NET_DEVICE_OPS ++#endif + + /* + * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting diff --git a/app-emulation/vmware-modules/vmware-modules-304.0.ebuild b/app-emulation/vmware-modules/vmware-modules-304.0.ebuild index 9ac25d9..8be7242 100644 --- a/app-emulation/vmware-modules/vmware-modules-304.0.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-304.0.ebuild @@ -74,6 +74,10 @@ src_unpack() { src_prepare() { epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch" epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch" + epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch" + use pax_kernel && epatch "${FILESDIR}/${PV_MAJOR}-hardened.patch" + epatch "${FILESDIR}/${PV_MAJOR}-apic.patch" + kernel_is ge 3 10 0 && epatch "${FILESDIR}/304-3.10-00-dentry.patch" kernel_is ge 3 10 0 && epatch "${FILESDIR}/304-3.10-01-inode.patch" kernel_is ge 3 10 0 && epatch "${FILESDIR}/304-3.10-02-control.patch"