summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Riley <justin.t.riley@gmail.com>2014-05-29 12:42:06 -0400
committerJustin Riley <justin.t.riley@gmail.com>2014-05-29 12:42:06 -0400
commit9018fe0505b59d800f5c56480b2954baa7fe85d3 (patch)
tree50df897d3088acb065fd9f566bee50397941cdb3
parentspotify: fix gcrypt dep again for 0.9.10.17 (diff)
downloadjtriley-9018fe0505b59d800f5c56480b2954baa7fe85d3.tar.gz
jtriley-9018fe0505b59d800f5c56480b2954baa7fe85d3.tar.bz2
jtriley-9018fe0505b59d800f5c56480b2954baa7fe85d3.zip
vmware-modules: use ebuild from gmt overlay (3.14.x support)
-rw-r--r--app-emulation/vmware-modules/ChangeLog67
-rw-r--r--app-emulation/vmware-modules/files/279-3.11.0.patch (renamed from app-emulation/vmware-modules/files/279-vmblock-3.11.patch)2
-rw-r--r--app-emulation/vmware-modules/files/279-3.12.0.patch152
-rw-r--r--app-emulation/vmware-modules/files/279-3.14.0.patch161
-rw-r--r--app-emulation/vmware-modules/files/279-inline-correctly.patch12
-rw-r--r--app-emulation/vmware-modules/files/279-userns.patch37
-rw-r--r--app-emulation/vmware-modules/files/279-vmblock-3.12.patch69
-rw-r--r--app-emulation/vmware-modules/vmware-modules-279.2-r1.ebuild (renamed from app-emulation/vmware-modules/vmware-modules-279.2.ebuild)41
8 files changed, 383 insertions, 158 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog
index d06c985..3adfebd 100644
--- a/app-emulation/vmware-modules/ChangeLog
+++ b/app-emulation/vmware-modules/ChangeLog
@@ -1,46 +1,29 @@
# ChangeLog for app-emulation/vmware-modules
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.114 2013/12/27 16:34:13 dilfridge Exp $
-
- 27 Dec 2013; Andreas K. Huettel <dilfridge@gentoo.org>
- +files/264-newline.patch, vmware-modules-264.5.ebuild:
- Add cosmetic patch for bug 439280
-
- 23 Nov 2013; Magnus Granberg <zorry@gentoo.org> vmware-modules-279.0.ebuild,
- vmware-modules-279.1.ebuild, +files/279-hardened.patch:
- Update hardned patch for 279.X #491342
-
-*vmware-modules-279.1 (06 Nov 2013)
-
- 06 Nov 2013; Andreas K. Huettel <dilfridge@gentoo.org>
- +vmware-modules-279.1.ebuild:
- Version bump
-
- 02 Nov 2013; Andreas K. Huettel <dilfridge@gentoo.org>
- -files/279-3.10.0.patch, vmware-modules-279.0.ebuild:
- Re-add keywords after testing
-
- 02 Nov 2013; Andreas K. Huettel <dilfridge@gentoo.org>
- files/279-vmblock.patch, vmware-modules-279.0.ebuild:
- Apply proper patches. Tested with 3.10.7-gentoo-r1.
-
- 22 Oct 2013; Andreas K. Huettel <dilfridge@gentoo.org>
- -files/238-2.6.39.patch, -files/238-makefile-kernel-dir.patch,
- -files/238-3.2.0.patch, -files/238-d-make-root.patch,
- -files/238-jobserver.patch, -files/238-makefile-include.patch,
- -files/238-netdevice.patch, -files/238-sema.patch,
- -files/238-unlocked_ioctl.patch, -vmware-modules-238.6.ebuild:
- Drop old
-
-*vmware-modules-279.0 (19 Oct 2013)
-
- 19 Oct 2013; Andreas K. Huettel <dilfridge@gentoo.org>
- +files/279-3.10.0.patch, +files/279-apic.patch,
- +files/279-makefile-include.patch, +files/279-makefile-kernel-dir.patch,
- +files/279-netdevice.patch, +files/279-putname.patch,
- +files/279-vmblock.patch, +vmware-modules-279.0.ebuild:
- Version bump, added without keywords for testing. Bug 484098. Thanks to Billy
- DeVincentis for the files.
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 06 May 2014; Gregory M. Turner <gmt@be-evil.net>
+ vmware-modules-279.2-r1.ebuild:
+ Don't let portage dink around with the kernel module binaries.
+
+ 06 May 2014; Gregory M. Turner <gmt@be-evil.net>
+ vmware-modules-279.2-r1.ebuild:
+ Verbose building
+
+ 06 May 2014; Gregory M. Turner <gmt@be-evil.net>
+ vmware-modules-279.2-r1.ebuild:
+ Implement ultra-nazi flag stripping to protect users from themselves
+ (even though it really seems linux-mod.eclass should be doing it for us).
+
+ 06 May 2014; Gregory M. Turner <gmt@be-evil.net>
+ vmware-modules-279.2-r1.ebuild:
+ Update udev entries with correct quoting as required by recent udevd.
+
+ 16 Jan 2014; Greg Turner <gmt@be-evil.net>
+ +vmware-modules-279.1-r1.ebuild, +files/279-3.11.0.patch,
+ +files/279-3.12.0.patch, +files/279-vnet-gcc48.patch:
+ Add contributed and homebrew patches for kernels 3.11.0 and 3.12.0,
+ plus some gcc-4.8 compatibility fixes, bug 488072
11 Aug 2013; Andreas K. Huettel <dilfridge@gentoo.org>
+files/264-3.10.0.patch, +files/271-3.10.0.patch,
diff --git a/app-emulation/vmware-modules/files/279-vmblock-3.11.patch b/app-emulation/vmware-modules/files/279-3.11.0.patch
index fc1f639..3b5b086 100644
--- a/app-emulation/vmware-modules/files/279-vmblock-3.11.patch
+++ b/app-emulation/vmware-modules/files/279-3.11.0.patch
@@ -1,3 +1,5 @@
+diff --git a/linux/file.c b/linux/file.c
+index d7ac1f6..5499169 100644
--- a/vmblock-only/linux/file.c
+++ b/vmblock-only/linux/file.c
@@ -38,46 +38,6 @@ typedef u64 inode_num_t;
diff --git a/app-emulation/vmware-modules/files/279-3.12.0.patch b/app-emulation/vmware-modules/files/279-3.12.0.patch
new file mode 100644
index 0000000..7c14481
--- /dev/null
+++ b/app-emulation/vmware-modules/files/279-3.12.0.patch
@@ -0,0 +1,152 @@
+diff -rpNu vmblock-only.orig/linux/control.c vmblock-only/linux/control.c
+--- vmblock-only.orig/linux/control.c 2014-01-16 00:09:12.000949255 -0800
++++ vmblock-only/linux/control.c 2014-01-16 00:10:46.916483268 -0800
+@@ -279,7 +279,7 @@ ExecuteBlockOp(const char __user *buf,
+ int i;
+ int retval;
+
+- name = getname(buf);
++ name = (char*) getname(buf)->name;
+ if (IS_ERR(name)) {
+ return PTR_ERR(name);
+ }
+diff -rpNu vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
+--- vmblock-only.orig/linux/dentry.c 2013-10-18 10:56:11.000000000 -0700
++++ vmblock-only/linux/dentry.c 2014-01-16 00:10:46.916483268 -0800
+@@ -32,7 +32,7 @@
+ #include "block.h"
+
+
+-static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
++static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags);
+
+ struct dentry_operations LinkDentryOps = {
+ .d_revalidate = DentryOpRevalidate,
+@@ -60,7 +60,7 @@ struct dentry_operations LinkDentryOps =
+
+ static int
+ DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
+- struct nameidata *nd) // IN: lookup flags & intent
++ unsigned int flags) // IN: lookup flags & intent
+ {
+ VMBlockInodeInfo *iinfo;
+ struct nameidata actualNd;
+@@ -101,7 +101,7 @@ DentryOpRevalidate(struct dentry *dentry
+ if (actualDentry &&
+ actualDentry->d_op &&
+ actualDentry->d_op->d_revalidate) {
+- return actualDentry->d_op->d_revalidate(actualDentry, nd);
++ return actualDentry->d_op->d_revalidate(actualDentry, flags);
+ }
+
+ if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
+diff -rpNu vmblock-only.orig/linux/inode.c vmblock-only/linux/inode.c
+--- vmblock-only.orig/linux/inode.c 2014-01-16 00:10:15.046625108 -0800
++++ vmblock-only/linux/inode.c 2014-01-16 00:10:46.916483268 -0800
+@@ -36,7 +36,7 @@
+
+ /* Inode operations */
+ static struct dentry *InodeOpLookup(struct inode *dir,
+- struct dentry *dentry, struct nameidata *nd);
++ struct dentry *dentry, unsigned int flags);
+ static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+ static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
+@@ -75,7 +75,7 @@ static struct inode_operations LinkInode
+ static struct dentry *
+ InodeOpLookup(struct inode *dir, // IN: parent directory's inode
+ struct dentry *dentry, // IN: dentry to lookup
+- struct nameidata *nd) // IN: lookup intent and information
++ unsigned int flags) // IN: lookup intent and information
+ {
+ char *filename;
+ struct inode *inode;
+@@ -135,7 +135,8 @@ InodeOpLookup(struct inode *dir, //
+ inode->i_size = INODE_TO_IINFO(inode)->nameLen;
+ inode->i_version = 1;
+ inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+- inode->i_uid = inode->i_gid = 0;
++ i_uid_write(inode, 0);
++ i_gid_write(inode, 0);
+ inode->i_op = &LinkInodeOps;
+
+ d_add(dentry, inode);
+@@ -221,7 +222,7 @@ InodeOpFollowlink(struct dentry *dentry,
+ goto out;
+ }
+
+- ret = vfs_follow_link(nd, iinfo->name);
++ nd_set_link(nd, iinfo->name);
+
+ out:
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+diff -rpNu vmci-only.orig/linux/driver.c vmci-only/linux/driver.c
+--- vmci-only.orig/linux/driver.c 2013-10-18 10:56:11.000000000 -0700
++++ vmci-only/linux/driver.c 2014-01-08 10:41:27.000000000 -0800
+@@ -51,6 +51,7 @@ sys_ioctl(unsigned int fd, unsigned int
+ #include "compat_slab.h"
+ #include "compat_uaccess.h"
+ #include "compat_version.h"
++#include "compat_cred.h"
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
+ # error "Linux kernels before 2.6.9 are not supported."
+@@ -737,7 +738,7 @@ LinuxDriver_Ioctl(struct inode *inode,
+ goto init_release;
+ }
+
+- user = current_uid();
++ user = CURRENT_UID();
+ retval = VMCIContext_InitContext(initBlock.cid, initBlock.flags,
+ 0 /* Unused */, vmciLinux->userVersion,
+ &user, &vmciLinux->context);
+diff -rpNu vmci-only.orig/shared/compat_cred.h vmci-only/shared/compat_cred.h
+--- vmci-only.orig/shared/compat_cred.h 2013-10-18 10:56:11.000000000 -0700
++++ vmci-only/shared/compat_cred.h 2014-01-08 10:39:22.000000000 -0800
+@@ -35,6 +35,14 @@
+ #define current_fsgid() (current->fsgid)
+ #endif
+
++#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++#define CURRENT_UID() (__kuid_val(current_uid()))
++#define CURRENT_GID() (__kgid_val(current_gid()))
++#else
++#define CURRENT_UID() (current_uid())
++#define CURRENT_GID() (current_gid())
++#endif
++
+ #if !defined(cap_set_full)
+ /* cap_set_full was removed in kernel version 3.0-rc4. */
+ #define cap_set_full(_c) do { (_c) = CAP_FULL_SET; } while (0)
+diff -rpNu vsock-only.orig/shared/compat_cred.h vsock-only/shared/compat_cred.h
+--- vsock-only.orig/shared/compat_cred.h 2013-10-18 10:56:11.000000000 -0700
++++ vsock-only/shared/compat_cred.h 2014-01-08 10:39:22.000000000 -0800
+@@ -35,6 +35,14 @@
+ #define current_fsgid() (current->fsgid)
+ #endif
+
++#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
++#define CURRENT_UID() (__kuid_val(current_uid()))
++#define CURRENT_GID() (__kgid_val(current_gid()))
++#else
++#define CURRENT_UID() (current_uid())
++#define CURRENT_GID() (current_gid())
++#endif
++
+ #if !defined(cap_set_full)
+ /* cap_set_full was removed in kernel version 3.0-rc4. */
+ #define cap_set_full(_c) do { (_c) = CAP_FULL_SET; } while (0)
+
+
+diff -urpN vsock-only.orig/linux/af_vsock.c vsock-only/linux/af_vsock.c
+--- vsock-only.orig/linux/af_vsock.c 2013-10-18 10:56:12.000000000 -0700
++++ vsock-only/linux/af_vsock.c 2014-01-16 12:21:34.594978553 -0800
+@@ -2869,7 +2869,7 @@ __VSockVmciCreate(struct net *net,
+ vsk->connectTimeout = psk->connectTimeout;
+ } else {
+ vsk->trusted = capable(CAP_NET_ADMIN);
+- vsk->owner = current_uid();
++ vsk->owner = CURRENT_UID();
+ vsk->queuePairSize = VSOCK_DEFAULT_QP_SIZE;
+ vsk->queuePairMinSize = VSOCK_DEFAULT_QP_SIZE_MIN;
+ vsk->queuePairMaxSize = VSOCK_DEFAULT_QP_SIZE_MAX;
diff --git a/app-emulation/vmware-modules/files/279-3.14.0.patch b/app-emulation/vmware-modules/files/279-3.14.0.patch
new file mode 100644
index 0000000..f7fd9ba
--- /dev/null
+++ b/app-emulation/vmware-modules/files/279-3.14.0.patch
@@ -0,0 +1,161 @@
+diff -urpN work.orig/vmblock-only/shared/vm_assert.h work/vmblock-only/shared/vm_assert.h
+--- work.orig/vmblock-only/shared/vm_assert.h 2014-04-14 14:41:41.000000000 -0700
++++ work/vmblock-only/shared/vm_assert.h 2014-05-10 18:33:30.113514073 -0700
+@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con
+ #define LOG_ONCE(_s) DO_ONCE(Log _s)
+
+ #ifdef VMX86_DEVEL
+- #define DEPRECATED(_fix) DO_ONCE( \
++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \
+ Warning("%s:%d: %s is DEPRECATED. %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, \
+ _fix))
+ #else
+- #define DEPRECATED(_fix) do {} while (0)
++ #define VMWARE_DEPRECATED(_fix) do {} while (0)
+ #endif
+
+
+diff -urpN work.orig/vmci-only/shared/vm_assert.h work/vmci-only/shared/vm_assert.h
+--- work.orig/vmci-only/shared/vm_assert.h 2014-04-14 14:41:41.000000000 -0700
++++ work/vmci-only/shared/vm_assert.h 2014-05-10 18:31:23.811773455 -0700
+@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con
+ #define LOG_ONCE(_s) DO_ONCE(Log _s)
+
+ #ifdef VMX86_DEVEL
+- #define DEPRECATED(_fix) DO_ONCE( \
++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \
+ Warning("%s:%d: %s is DEPRECATED. %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, \
+ _fix))
+ #else
+- #define DEPRECATED(_fix) do {} while (0)
++ #define VMWARE_DEPRECATED(_fix) do {} while (0)
+ #endif
+
+
+diff -urpN work.orig/vmmon-only/include/vm_assert.h work/vmmon-only/include/vm_assert.h
+--- work.orig/vmmon-only/include/vm_assert.h 2014-04-14 17:06:20.000000000 -0700
++++ work/vmmon-only/include/vm_assert.h 2014-05-10 18:32:38.682026876 -0700
+@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con
+ #define LOG_ONCE(_s) DO_ONCE(Log _s)
+
+ #ifdef VMX86_DEVEL
+- #define DEPRECATED(_fix) DO_ONCE( \
++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \
+ Warning("%s:%d: %s is DEPRECATED. %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, \
+ _fix))
+ #else
+- #define DEPRECATED(_fix) do {} while (0)
++ #define VMWARE_DEPRECATED(_fix) do {} while (0)
+ #endif
+
+
+diff -urpN work.orig/vmnet-only/vm_assert.h work/vmnet-only/vm_assert.h
+--- work.orig/vmnet-only/vm_assert.h 2014-04-14 17:06:21.000000000 -0700
++++ work/vmnet-only/vm_assert.h 2014-05-10 18:31:50.192510386 -0700
+@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con
+ #define LOG_ONCE(_s) DO_ONCE(Log _s)
+
+ #ifdef VMX86_DEVEL
+- #define DEPRECATED(_fix) DO_ONCE( \
++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \
+ Warning("%s:%d: %s is DEPRECATED. %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, \
+ _fix))
+ #else
+- #define DEPRECATED(_fix) do {} while (0)
++ #define VMWARE_DEPRECATED(_fix) do {} while (0)
+ #endif
+
+
+diff -urpN work.orig/vsock-only/shared/vm_assert.h work/vsock-only/shared/vm_assert.h
+--- work.orig/vsock-only/shared/vm_assert.h 2014-04-14 14:41:41.000000000 -0700
++++ work/vsock-only/shared/vm_assert.h 2014-05-10 18:30:51.497095714 -0700
+@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con
+ #define LOG_ONCE(_s) DO_ONCE(Log _s)
+
+ #ifdef VMX86_DEVEL
+- #define DEPRECATED(_fix) DO_ONCE( \
++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \
+ Warning("%s:%d: %s is DEPRECATED. %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, \
+ _fix))
+ #else
+- #define DEPRECATED(_fix) do {} while (0)
++ #define VMWARE_DEPRECATED(_fix) do {} while (0)
+ #endif
+
+
+diff -urpN work.orig/vmci-only/shared/compat_cred.h work/vmci-only/shared/compat_cred.h
+--- work.orig/vmci-only/shared/compat_cred.h 2014-05-10 18:55:27.051287859 -0700
++++ work/vmci-only/shared/compat_cred.h 2014-05-10 19:20:24.975246986 -0700
+@@ -35,6 +35,7 @@
+ #define current_fsgid() (current->fsgid)
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
+ #ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+ #define CURRENT_UID() (__kuid_val(current_uid()))
+ #define CURRENT_GID() (__kgid_val(current_gid()))
+@@ -42,6 +43,10 @@
+ #define CURRENT_UID() (current_uid())
+ #define CURRENT_GID() (current_gid())
+ #endif
++#else
++#define CURRENT_UID() (from_kuid_munged(current_user_ns(), current_uid()))
++#define CURRENT_GID() (from_kgid_munged(current_user_ns(), current_gid()))
++#endif
+
+ #if !defined(cap_set_full)
+ /* cap_set_full was removed in kernel version 3.0-rc4. */
+diff -urpN work.orig/vsock-only/shared/compat_cred.h work/vsock-only/shared/compat_cred.h
+--- work.orig/vsock-only/shared/compat_cred.h 2014-05-10 18:55:27.051287859 -0700
++++ work/vsock-only/shared/compat_cred.h 2014-05-10 19:19:35.046747235 -0700
+@@ -35,6 +35,7 @@
+ #define current_fsgid() (current->fsgid)
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
+ #ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+ #define CURRENT_UID() (__kuid_val(current_uid()))
+ #define CURRENT_GID() (__kgid_val(current_gid()))
+@@ -42,6 +43,10 @@
+ #define CURRENT_UID() (current_uid())
+ #define CURRENT_GID() (current_gid())
+ #endif
++#else
++#define CURRENT_UID() (from_kuid_munged(current_user_ns(), current_uid()))
++#define CURRENT_GID() (from_kgid_munged(current_user_ns(), current_gid()))
++#endif
+
+ #if !defined(cap_set_full)
+ /* cap_set_full was removed in kernel version 3.0-rc4. */
+diff -urpN work.orig/vmblock-only/linux/control.c work/vmblock-only/linux/control.c
+--- work.orig/vmblock-only/linux/control.c 2014-05-11 00:34:14.807305118 -0700
++++ work/vmblock-only/linux/control.c 2014-05-11 00:44:20.970502062 -0700
+@@ -279,11 +279,23 @@ ExecuteBlockOp(const char __user *buf,
+ int i;
+ int retval;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
+ name = (char*) getname(buf)->name;
++#else
++ name = __getname();
++#endif
+ if (IS_ERR(name)) {
+ return PTR_ERR(name);
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
++ i = strncpy_from_user(name, buf, PATH_MAX);
++ if (i < 0 || i == PATH_MAX) {
++ __putname(name);
++ return -EINVAL;
++ }
++#endif
++
+ for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
+ name[i] = '\0';
+ }
diff --git a/app-emulation/vmware-modules/files/279-inline-correctly.patch b/app-emulation/vmware-modules/files/279-inline-correctly.patch
new file mode 100644
index 0000000..6e2dcf7
--- /dev/null
+++ b/app-emulation/vmware-modules/files/279-inline-correctly.patch
@@ -0,0 +1,12 @@
+diff -urpN work.orig/vmmon-only/linux/driver.c work/vmmon-only/linux/driver.c
+--- work.orig/vmmon-only/linux/driver.c 2014-04-14 17:06:21.000000000 -0700
++++ work/vmmon-only/linux/driver.c 2014-05-10 18:53:59.266171700 -0700
+@@ -1338,7 +1338,7 @@ LinuxDriverReadTSC(void *data, // OUT:
+ *-----------------------------------------------------------------------------
+ */
+
+-__attribute__((always_inline)) static Bool
++INLINE_SINGLE_CALLER static Bool
+ LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
+ {
+ TSCDelta tscDelta;
diff --git a/app-emulation/vmware-modules/files/279-userns.patch b/app-emulation/vmware-modules/files/279-userns.patch
deleted file mode 100644
index c960b78..0000000
--- a/app-emulation/vmware-modules/files/279-userns.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/vmblock-only/linux/inode.c 2013-03-20 17:37:48.000000000 +0100
-+++ b/vmblock-only/linux/inode.c 2013-03-20 17:41:22.000000000 +0100
-@@ -135,7 +135,8 @@
- inode->i_size = INODE_TO_IINFO(inode)->nameLen;
- inode->i_version = 1;
- inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-- inode->i_uid = inode->i_gid = 0;
-+ inode->i_uid = GLOBAL_ROOT_UID;
-+ inode->i_gid = GLOBAL_ROOT_GID;
- inode->i_op = &LinkInodeOps;
-
- d_add(dentry, inode);
-
---- a/vmci-only/linux/driver.c 2013-03-20 17:57:35.000000000 +0100
-+++ b/vmci-only/linux/driver.c 2013-03-20 17:57:43.000000000 +0100
-@@ -740,7 +740,7 @@
- goto init_release;
- }
-
-- user = current_uid();
-+ user = from_kuid(current_user_ns(), current_uid());
- retval = VMCIContext_InitContext(initBlock.cid, initBlock.flags,
- 0 /* Unused */, vmciLinux->userVersion,
- &user, &vmciLinux->context);
-
---- a/vsock-only/linux/af_vsock.c 2013-03-20 18:01:48.000000000 +0100
-+++ b/vsock-only/linux/af_vsock.c 2013-03-20 18:01:58.000000000 +0100
-@@ -2866,7 +2866,7 @@
- vsk->connectTimeout = psk->connectTimeout;
- } else {
- vsk->trusted = capable(CAP_NET_ADMIN);
-- vsk->owner = current_uid();
-+ vsk->owner = from_kuid(current_user_ns(), current_uid());
- vsk->queuePairSize = VSOCK_DEFAULT_QP_SIZE;
- vsk->queuePairMinSize = VSOCK_DEFAULT_QP_SIZE_MIN;
- vsk->queuePairMaxSize = VSOCK_DEFAULT_QP_SIZE_MAX;
-
diff --git a/app-emulation/vmware-modules/files/279-vmblock-3.12.patch b/app-emulation/vmware-modules/files/279-vmblock-3.12.patch
deleted file mode 100644
index 63aabbe..0000000
--- a/app-emulation/vmware-modules/files/279-vmblock-3.12.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/vmblock-only/linux/control.c 2013-10-03 04:29:47.471339204 -0400
-+++ b/vmblock-only/linux/control.c 2013-10-03 04:31:56.607334636 -0400
-@@ -283,7 +283,7 @@
- int i;
- int retval;
-
-- name = getname(buf);
-+ name = (char*)getname(buf)->name;
- if (IS_ERR(name)) {
- return PTR_ERR(name);
- }
---- a/vmblock-only/linux/dentry.c 2013-10-03 04:29:47.471339204 -0400
-+++ b/vmblock-only/linux/dentry.c 2013-10-03 04:31:56.607334636 -0400
-@@ -32,7 +32,7 @@
- #include "block.h"
-
-
--static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd);
-+static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags);
-
- struct dentry_operations LinkDentryOps = {
- .d_revalidate = DentryOpRevalidate,
-@@ -60,7 +60,7 @@
-
- static int
- DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
-- struct nameidata *nd) // IN: lookup flags & intent
-+ unsigned int flags) // IN: lookup flags & intent
- {
- VMBlockInodeInfo *iinfo;
- struct nameidata actualNd;
-@@ -101,7 +101,7 @@
- if (actualDentry &&
- actualDentry->d_op &&
- actualDentry->d_op->d_revalidate) {
-- return actualDentry->d_op->d_revalidate(actualDentry, nd);
-+ return actualDentry->d_op->d_revalidate(actualDentry, flags);
- }
-
- if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
---- a/vmblock-only/linux/inode.c 2013-10-03 04:29:47.471339204 -0400
-+++ b/vmblock-only/linux/inode.c 2013-10-03 04:31:56.607334636 -0400
-@@ -36,7 +36,7 @@
-
- /* Inode operations */
- static struct dentry *InodeOpLookup(struct inode *dir,
-- struct dentry *dentry, struct nameidata *nd);
-+ struct dentry *dentry, unsigned int flags);
- static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
- static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
-@@ -75,7 +75,7 @@
- static struct dentry *
- InodeOpLookup(struct inode *dir, // IN: parent directory's inode
- struct dentry *dentry, // IN: dentry to lookup
-- struct nameidata *nd) // IN: lookup intent and information
-+ unsigned int flags) // IN: lookup intent and information
- {
- char *filename;
- struct inode *inode;
-@@ -221,7 +221,7 @@
- goto out;
- }
-
-- ret = vfs_follow_link(nd, iinfo->name);
-+ nd_set_link(nd, iinfo->name);
-
- out:
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
diff --git a/app-emulation/vmware-modules/vmware-modules-279.2.ebuild b/app-emulation/vmware-modules/vmware-modules-279.2-r1.ebuild
index c1270ab..345ecc0 100644
--- a/app-emulation/vmware-modules/vmware-modules-279.2.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-279.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-279.2.ebuild,v 1.1 2014/04/19 10:10:25 dilfridge Exp $
+# $Header: $
EAPI=5
@@ -26,6 +26,26 @@ DEPEND="${RDEPEND}
S=${WORKDIR}
+# no debug-symbol magic (should really be a linux-mod feature)
+RESTRICT="strip splitdebug"
+
+# override setup_allowed_flags from flag-o-matic
+# to ultra-conservative set. Interim solution until
+# something can be done for this in linux-mod.eclass.
+# Note that the kernel has it's own flags that should
+# be applied automagically.
+#
+# How is this still not handled correctly in Gentoo?
+# Am I missing something, or is this an insane,
+# crazy bug?
+setup_allowed_flags() {
+ ALLOWED_FLAGS="-pipe"
+ ALLOWED_FLAGS+=" -O -O1 -O2 -Os -mtune*"
+ ALLOWED_FLAGS+=" -W* -w"
+ export ALLOWED_FLAGS
+ return 0
+}
+
pkg_setup() {
CONFIG_CHECK="~HIGH_RES_TIMERS"
if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then
@@ -58,7 +78,7 @@ pkg_setup() {
BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
enewgroup "${VMWARE_GROUP}"
- filter-flags -mfpmath=sse
+ strip-flags
for mod in ${VMWARE_MODULE_LIST}; do
MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
@@ -78,12 +98,13 @@ src_prepare() {
epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
use pax_kernel && epatch "${FILESDIR}/279-hardened.patch"
epatch "${FILESDIR}/${PV_MAJOR}-apic.patch"
+ epatch "${FILESDIR}/${PV_MAJOR}-inline-correctly.patch"
kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch"
kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-vmblock.patch"
- kernel_is ge 3 8 0 && epatch "${FILESDIR}/${PV_MAJOR}-userns.patch"
- kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-vmblock-3.11.patch"
- kernel_is ge 3 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-vmblock-3.12.patch"
-
+ kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.11.0.patch"
+ # 3.12.x and 3.13.x patches
+ kernel_is ge 3 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.12.0.patch"
+ kernel_is ge 3 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.14.0.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user
@@ -93,10 +114,10 @@ src_install() {
linux-mod_src_install
local udevrules="${T}/60-vmware.rules"
cat > "${udevrules}" <<-EOF
- KERNEL=="vmci", GROUP="vmware", MODE=660
- KERNEL=="vmw_vmci", GROUP="vmware", MODE=660
- KERNEL=="vmmon", GROUP="vmware", MODE=660
- KERNEL=="vsock", GROUP="vmware", MODE=660
+ KERNEL=="vmci", GROUP="vmware", MODE="0660"
+ KERNEL=="vmw_vmci", GROUP="vmware", MODE="0660"
+ KERNEL=="vmmon", GROUP="vmware", MODE="0660"
+ KERNEL=="vsock", GROUP="vmware", MODE="0660"
EOF
udev_dorules "${udevrules}"
}