diff options
author | Det | 2015-10-01 00:02:25 +0300 |
---|---|---|
committer | Det | 2015-10-01 00:02:25 +0300 |
commit | d40bb75b82814f09c02c13ac19fb02a93a281a19 (patch) | |
tree | f7a5b51181d8f64a9f9d6567bb81d8f0d298e80d | |
parent | ad27c4fbdf2840708cb1c3c24c1cb8f182d60768 (diff) | |
download | aur-d40bb75b82814f09c02c13ac19fb02a93a281a19.tar.gz |
Upgpkg: 12.0.0
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | vmblock-11.1.2-4.2.patch | 339 | ||||
-rw-r--r-- | vmci-12.0.0-4.2.patch | 131 | ||||
-rw-r--r-- | vmmon-11.1.2-4.2.patch | 24 | ||||
-rw-r--r-- | vmnet-11.1.2-4.2.patch | 41 | ||||
-rw-r--r-- | vsock-11.1.2-4.2.patch | 119 |
7 files changed, 678 insertions, 2 deletions
@@ -1,7 +1,7 @@ pkgbase = vmware-patch pkgdesc = A post-install configuration solution for VMware Workstation (Pro) and Player (Plus and Pro) pkgver = 12.0.0 - pkgrel = 2 + pkgrel = 3 url = https://wiki.archlinux.org/index.php/VMware#Configuration install = vmware-patch.install arch = i686 @@ -17,6 +17,11 @@ pkgbase = vmware-patch source = vmware.service source = vmware-usbarbitrator.service source = vmware-workstation.service + source = vmci-12.0.0-4.2.patch + source = vmblock-11.1.2-4.2.patch + source = vmmon-11.1.2-4.2.patch + source = vmnet-11.1.2-4.2.patch + source = vsock-11.1.2-4.2.patch source = vmnet-11.1.0-3.19.patch source = vmci-10.0.6-3.19.patch source = vmci-10.0.6-4.0.patch @@ -36,6 +41,11 @@ pkgbase = vmware-patch md5sums = c12e765985b324585a548718a6ac9b43 md5sums = ea3817fb7952932707bfedcf33a70697 md5sums = 56f7f642683e54250372bb57faaf4e95 + md5sums = 133f3ba5c19ceb00a4ae8f44dc08352a + md5sums = 36727e319ce5379e5227f618401fd313 + md5sums = 905d6daa87b314e541eec00ca4f927c6 + md5sums = 2c1d8433b698376c228e650741ba6be5 + md5sums = 1e264a2aa92c8786e87bda86026f7e4c md5sums = 350679df90d266fe7dd343922622c39e md5sums = 0a8dbce269c7ac34a63453435a4a9fad md5sums = d5ba75849a3946851506ecbaa9ff3bb5 @@ -3,7 +3,7 @@ pkgname=vmware-patch pkgver=12.0.0 -pkgrel=2 +pkgrel=3 pkgdesc="A post-install configuration solution for VMware Workstation (Pro) and Player (Plus and Pro)" arch=('i686' 'x86_64') url="https://wiki.archlinux.org/index.php/VMware#Configuration" @@ -12,6 +12,13 @@ depends=('fuse' 'gtkmm' 'linux-headers') options=('!emptydirs') install=$pkgname.install source=('vmware-patch.sh' 'vmware-unpatch.sh' 'common-functions.sh' 'vmware.service' 'vmware-usbarbitrator.service' 'vmware-workstation.service' + # Workstation Pro/Player 12.0.0 + 'vmci-12.0.0-4.2.patch' + # Workstation 11.1.2 / Player (Pro) 7.1.2 + 'vmblock-11.1.2-4.2.patch' + 'vmmon-11.1.2-4.2.patch' + 'vmnet-11.1.2-4.2.patch' + 'vsock-11.1.2-4.2.patch' # Workstation 11.1.0 / Player (Pro) 7.1.0 'vmnet-11.1.0-3.19.patch' # Workstation 10.0.6 / Player (Plus) 6.0.6 @@ -56,6 +63,11 @@ md5sums=('1fe73e49d253eeba8be2c9d066cf42cb' 'c12e765985b324585a548718a6ac9b43' 'ea3817fb7952932707bfedcf33a70697' '56f7f642683e54250372bb57faaf4e95' + '133f3ba5c19ceb00a4ae8f44dc08352a' + '36727e319ce5379e5227f618401fd313' + '905d6daa87b314e541eec00ca4f927c6' + '2c1d8433b698376c228e650741ba6be5' + '1e264a2aa92c8786e87bda86026f7e4c' '350679df90d266fe7dd343922622c39e' '0a8dbce269c7ac34a63453435a4a9fad' 'd5ba75849a3946851506ecbaa9ff3bb5' diff --git a/vmblock-11.1.2-4.2.patch b/vmblock-11.1.2-4.2.patch new file mode 100644 index 000000000000..59b2224f97b2 --- /dev/null +++ b/vmblock-11.1.2-4.2.patch @@ -0,0 +1,339 @@ +diff -ur a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c +--- vmblock-only/linux/control.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmblock-only/linux/control.c 2015-08-08 00:23:51.000000000 +0300 +@@ -208,9 +208,11 @@ + VMBlockSetProcEntryOwner(controlProcMountpoint); + + /* Create /proc/fs/vmblock/dev */ +- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, +- VMBLOCK_CONTROL_MODE, +- controlProcDirEntry); ++ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, ++ VMBLOCK_CONTROL_MODE, ++ controlProcDirEntry, ++ &ControlFileOps); ++ + if (!controlProcEntry) { + Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n"); + remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry); +@@ -218,7 +220,10 @@ + return -EINVAL; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + controlProcEntry->proc_fops = &ControlFileOps; ++#endif ++ + return 0; + } + +@@ -272,17 +277,44 @@ + *---------------------------------------------------------------------------- + */ + ++/* copy-paste from Lustre FS by pavlinux */ ++static char *ll_getname(const char __user *filename) ++{ ++ int ret = 0, len; ++ char *tmp = __getname(); ++ ++ if (!tmp) ++ return ERR_PTR(-ENOMEM); ++ ++ len = strncpy_from_user(tmp, filename, PATH_MAX); ++ if (len == 0) ++ ret = -ENOENT; ++ else if (len > PATH_MAX) ++ ret = -ENAMETOOLONG; ++ ++ if (ret) { ++ __putname(tmp); ++ tmp = ERR_PTR(ret); ++ } ++ return tmp; ++} ++ + static int + ExecuteBlockOp(const char __user *buf, // IN: buffer with name + const os_blocker_id_t blocker, // IN: blocker ID (file) + int (*blockOp)(const char *filename, // IN: block operation + const os_blocker_id_t blocker)) + { +- char *name; ++ struct filename *fn = NULL; ++ char *name = (char *)fn->name; + int i; + int retval; + +- name = getname(buf); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ name = (char *)getname(buf); ++#else ++ name = (char *)ll_getname(buf); ++#endif + if (IS_ERR(name)) { + return PTR_ERR(name); + } +@@ -293,7 +325,12 @@ + + retval = i < 0 ? -EINVAL : blockOp(name, blocker); + +- putname(name); ++ if (fn->name != fn->iname) { /* add by pavlinux */ ++ __putname(fn->name); ++ kvfree(fn); ++ } else { ++ __putname(fn); ++ } + + return retval; + } +diff -ur a/vmblock-only/linux/dentry.c b/vmblock-only/linux/dentry.c +--- vmblock-only/linux/dentry.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmblock-only/linux/dentry.c 2015-02-24 03:58:06.000000000 +0300 +@@ -32,7 +32,11 @@ + #include "block.h" + + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd); ++#else ++static int DentryOpRevalidate(struct dentry *dentry, unsigned int); ++#endif + + struct dentry_operations LinkDentryOps = { + .d_revalidate = DentryOpRevalidate, +@@ -58,9 +62,12 @@ + *---------------------------------------------------------------------------- + */ + +-static int +-DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating +- struct nameidata *nd) // IN: lookup flags & intent ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) ++static int DentryOpRevalidate(struct dentry *dentry, struct nameidata *nd) ++#else ++static int DentryOpRevalidate(struct dentry *dentry, unsigned int flags) ++#endif ++ + { + VMBlockInodeInfo *iinfo; + struct nameidata actualNd; +@@ -101,7 +108,11 @@ + if (actualDentry && + actualDentry->d_op && + actualDentry->d_op->d_revalidate) { ++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 14, 0) ++ return actualDentry->d_op->d_revalidate(actualDentry, flags); ++#else + return actualDentry->d_op->d_revalidate(actualDentry, nd); ++#endif + } + + if (compat_path_lookup(iinfo->name, 0, &actualNd)) { +diff -ur a/vmblock-only/linux/file.c b/vmblock-only/linux/file.c +--- vmblock-only/linux/file.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmblock-only/linux/file.c 2015-02-24 03:58:06.000000000 +0300 +@@ -38,6 +38,7 @@ + typedef ino_t inode_num_t; + #endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + /* Specifically for our filldir_t callback */ + typedef struct FilldirInfo { + filldir_t filldir; +@@ -76,7 +77,7 @@ + /* Specify DT_LNK regardless */ + return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK); + } +- ++#endif + + /* File operations */ + +@@ -132,7 +133,7 @@ + * and that would try to acquire the inode's semaphore; if the two inodes + * are the same we'll deadlock. + */ +- if (actualFile->f_dentry && inode == actualFile->f_dentry->d_inode) { ++ if (actualFile->f_path.dentry && inode == actualFile->f_path.dentry->d_inode) { + Warning("FileOpOpen: identical inode encountered, open cannot succeed.\n"); + if (filp_close(actualFile, current->files) < 0) { + Warning("FileOpOpen: unable to close opened file.\n"); +@@ -164,6 +165,7 @@ + *---------------------------------------------------------------------------- + */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + static int + FileOpReaddir(struct file *file, // IN + void *dirent, // IN +@@ -193,7 +195,7 @@ + + return ret; + } +- ++#endif + + /* + *---------------------------------------------------------------------------- +@@ -237,7 +239,11 @@ + + + struct file_operations RootFileOps = { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + .readdir = FileOpReaddir, ++#endif ++ .owner = THIS_MODULE, ++ .llseek = no_llseek, + .open = FileOpOpen, + .release = FileOpRelease, + }; +diff -ur a/vmblock-only/linux/filesystem.c b/vmblock-only/linux/filesystem.c +--- vmblock-only/linux/filesystem.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmblock-only/linux/filesystem.c 2015-02-24 03:58:06.000000000 +0300 +@@ -322,6 +322,7 @@ + { + VMBlockInodeInfo *iinfo; + struct inode *inode; ++ + struct nameidata actualNd; + + ASSERT(sb); +diff -ur a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c +--- vmblock-only/linux/inode.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmblock-only/linux/inode.c 2015-08-08 00:33:22.000000000 +0300 +@@ -35,26 +35,27 @@ + + + /* Inode operations */ +-static struct dentry *InodeOpLookup(struct inode *dir, +- struct dentry *dentry, struct nameidata *nd); ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++static struct dentry *InodeOpLookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd); + 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); + #else +-static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); ++static struct dentry *InodeOpLookup(struct inode *, struct dentry *, unsigned int); ++static int InodeOpReadlink(struct dentry *, char __user *, int); + #endif + ++static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie); ++ + + struct inode_operations RootInodeOps = { + .lookup = InodeOpLookup, + }; + +-static struct inode_operations LinkInodeOps = { ++struct inode_operations LinkInodeOps = { + .readlink = InodeOpReadlink, + .follow_link = InodeOpFollowlink, + }; + +- + /* + *---------------------------------------------------------------------------- + * +@@ -75,7 +76,11 @@ + 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 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) ++ struct nameidata *nd) // IN: lookup intent and information ++#else ++ unsigned int flags) ++#endif + { + char *filename; + struct inode *inode; +@@ -135,7 +140,12 @@ + inode->i_size = INODE_TO_IINFO(inode)->nameLen; + inode->i_version = 1; + inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + inode->i_uid = inode->i_gid = 0; ++#else ++ inode->i_gid = make_kgid(current_user_ns(), 0); ++ inode->i_uid = make_kuid(current_user_ns(), 0); ++#endif + inode->i_op = &LinkInodeOps; + + d_add(dentry, inode); +@@ -177,7 +187,12 @@ + return -EINVAL; + } + +- return vfs_readlink(dentry, buffer, buflen, iinfo->name); ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99) ++ return vfs_readlink(dentry, buffer, buflen, iinfo->name); ++#else ++ return readlink_copy(buffer, buflen, iinfo->name); ++#endif ++ + } + + +@@ -198,13 +213,7 @@ + *---------------------------------------------------------------------------- + */ + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) +-static void * +-#else +-static int +-#endif +-InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink +- struct nameidata *nd) // OUT: stores result ++static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie) + { + int ret; + VMBlockInodeInfo *iinfo; +@@ -221,7 +230,11 @@ + goto out; + } + +- ret = vfs_follow_link(nd, iinfo->name); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++ return *cookie = (char *)(iinfo->name); ++#else ++ nd_set_link(nd, iinfo->name); ++#endif + + out: + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) +@@ -230,3 +243,4 @@ + return ret; + #endif + } ++ +Только в a/vmblock-only/shared/autoconf: dalias.c +Только в a/vmblock-only/shared/autoconf: truncate_pagecache.c +diff -ur a/vmblock-only/shared/compat_namei.h b/vmblock-only/shared/compat_namei.h +--- vmblock-only/shared/compat_namei.h 2015-05-31 16:01:25.000000000 +0300 ++++ vmblock-only/shared/compat_namei.h 2015-02-24 03:51:25.000000000 +0300 +@@ -21,6 +21,20 @@ + + #include <linux/namei.h> + ++/* Copy-n-paste from kernel's source/fs/namei.c */ ++struct nameidata { ++ struct path path; ++ struct qstr last; ++ struct path root; ++ struct inode *inode; /* path.dentry.d_inode */ ++ unsigned int flags; ++ unsigned seq, m_seq; ++ int last_type; ++ unsigned depth; ++ struct file *base; ++ char *saved_names[MAX_NESTED_LINKS + 1]; ++}; ++ + /* + * In 2.6.25-rc2, dentry and mount objects were removed from the nameidata + * struct. They were both replaced with a struct path. diff --git a/vmci-12.0.0-4.2.patch b/vmci-12.0.0-4.2.patch new file mode 100644 index 000000000000..6b7abd36d94b --- /dev/null +++ b/vmci-12.0.0-4.2.patch @@ -0,0 +1,131 @@ +diff -ur a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c +--- vmci-only/linux/driver.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmci-only/linux/driver.c 2015-08-08 00:42:47.000000000 +0300 +@@ -26,13 +26,16 @@ + + #include <linux/file.h> + #include <linux/fs.h> ++#include <linux/vmalloc.h> + #include <linux/init.h> ++ + #if defined(__x86_64__) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) + # include <linux/ioctl32.h> + /* Use weak: not all kernels export sys_ioctl for use by modules */ + asmlinkage __attribute__((weak)) long + sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); + #endif ++ + #include <linux/miscdevice.h> + #include <linux/moduleparam.h> + #include <linux/poll.h> +@@ -713,7 +716,7 @@ + + case IOCTL_VMCI_INIT_CONTEXT: { + VMCIInitBlock initBlock; +- VMCIHostUser user; ++ uid_t user; + + retval = copy_from_user(&initBlock, (void *)ioarg, sizeof initBlock); + if (retval != 0) { +@@ -735,7 +738,11 @@ + goto init_release; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) + user = current_uid(); ++#else ++ user = from_kuid(&init_user_ns, current_uid()); ++#endif + retval = VMCIContext_InitContext(initBlock.cid, initBlock.flags, + 0 /* Unused */, vmciLinux->userVersion, + &user, &vmciLinux->context); +@@ -1683,7 +1690,7 @@ + /* This should be last to make sure we are done initializing. */ + retval = pci_register_driver(&vmci_driver); + if (retval < 0) { +- vfree(data_buffer); ++ kvfree(data_buffer); + data_buffer = NULL; + return retval; + } +@@ -2470,7 +2477,7 @@ + + if (guestDeviceInit) { + pci_unregister_driver(&vmci_driver); +- vfree(data_buffer); ++ kvfree(data_buffer); + guestDeviceInit = FALSE; + } + +diff -ur a/vmci-only/linux/vmciKernelIf.c b/vmci-only/linux/vmciKernelIf.c +--- vmci-only/linux/vmciKernelIf.c 2015-05-31 16:01:25.000000000 +0300 ++++ vmci-only/linux/vmciKernelIf.c 2015-02-24 03:58:06.000000000 +0300 +@@ -40,6 +40,7 @@ + #include <linux/socket.h> /* For memcpy_{to,from}iovec(). */ + #include <linux/vmalloc.h> + #include <linux/wait.h> ++#include <linux/skbuff.h> + + #include "compat_highmem.h" + #include "compat_interrupt.h" +@@ -1196,21 +1197,21 @@ + } else { + toCopy = size - bytesCopied; + } +- ++ /* Code cloned from kernels drivers/misc/vmw_vmci/vmci_queue_pair.c */ + if (isIovec) { +- struct iovec *iov = (struct iovec *)src; +- int err; ++ struct msghdr *msg = (struct msghdr *)src; ++ int err; + +- /* The iovec will track bytesCopied internally. */ +- err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy); +- if (err != 0) { +- if (kernelIf->host) { +- kunmap(kernelIf->u.h.page[pageIndex]); ++ /* The iovec will track bytes_copied internally. */ ++ err = memcpy_from_msg((u8 *)va + pageOffset, msg, toCopy); ++ if (err != 0) { ++ if (kernelIf->host) ++ kunmap(kernelIf->u.h.page[pageIndex]); ++ return VMCI_ERROR_INVALID_ARGS; + } +- return VMCI_ERROR_INVALID_ARGS; +- } +- } else { +- memcpy((uint8 *)va + pageOffset, (uint8 *)src + bytesCopied, toCopy); ++ } else { ++ memcpy((u8 *)va + pageOffset, ++ (u8 *)src + bytesCopied, toCopy); + } + + bytesCopied += toCopy; +@@ -1273,11 +1274,11 @@ + } + + if (isIovec) { +- struct iovec *iov = (struct iovec *)dest; ++ struct msghdr *msg = (struct msghdr *)dest; + int err; + + /* The iovec will track bytesCopied internally. */ +- err = memcpy_toiovec(iov, (uint8 *)va + pageOffset, toCopy); ++ err = memcpy_to_msg(msg, (uint8 *)va + pageOffset, toCopy); + if (err != 0) { + if (kernelIf->host) { + kunmap(kernelIf->u.h.page[pageIndex]); +diff -ur a/vmci-only/shared/vm_device_version.h b/vmci-only/shared/vm_device_version.h +--- vmci-only/shared/vm_device_version.h 2015-05-31 16:01:26.000000000 +0300 ++++ vmci-only/shared/vm_device_version.h 2015-02-24 03:58:06.000000000 +0300 +@@ -53,7 +53,9 @@ + * VMware HD Audio codec + * VMware HD Audio controller + */ ++#ifndef PCI_VENDOR_ID_VMWARE + #define PCI_VENDOR_ID_VMWARE 0x15AD ++#endif + #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405 + #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710 + #define PCI_DEVICE_ID_VMWARE_VGA 0x0711 diff --git a/vmmon-11.1.2-4.2.patch b/vmmon-11.1.2-4.2.patch new file mode 100644 index 000000000000..eb72a3f7a35f --- /dev/null +++ b/vmmon-11.1.2-4.2.patch @@ -0,0 +1,24 @@ +diff -ur a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c +--- vmmon-only/linux/driver.c 2015-05-31 16:40:39.000000000 +0300 ++++ vmmon-only/linux/driver.c 2015-08-07 05:30:27.000000000 +0300 +@@ -1328,7 +1328,7 @@ + *----------------------------------------------------------------------------- + */ + +-__attribute__((always_inline)) static Bool ++inline static Bool + LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min + { + TSCDelta tscDelta; +diff -ur a/vmmon-only/linux/vmmonInt.h b/vmmon-only/linux/vmmonInt.h +--- vmmon-only/linux/vmmonInt.h 2015-05-31 16:40:39.000000000 +0300 ++++ vmmon-only/linux/vmmonInt.h 2015-08-07 05:29:20.000000000 +0300 +@@ -31,7 +31,7 @@ + #ifdef VMW_HAVE_SMP_CALL_3ARG + #define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, wait) + #else +-#define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, 1, wait) ++#define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, wait) + #endif + + /* diff --git a/vmnet-11.1.2-4.2.patch b/vmnet-11.1.2-4.2.patch new file mode 100644 index 000000000000..c4881553a331 --- /dev/null +++ b/vmnet-11.1.2-4.2.patch @@ -0,0 +1,41 @@ +diff -ur a/vmnet-only/vm_device_version.h b/vmnet-only/vm_device_version.h +--- vmnet-only/vm_device_version.h 2015-05-31 16:40:39.000000000 +0300 ++++ vmnet-only/vm_device_version.h 2015-08-07 05:21:33.000000000 +0300 +@@ -53,7 +53,10 @@ + * VMware HD Audio codec + * VMware HD Audio controller + */ +-#define PCI_VENDOR_ID_VMWARE 0x15AD ++#ifdef PCI_VENDOR_ID_VMWARE ++ #undef PCI_VENDOR_ID_VMWARE ++ #define PCI_VENDOR_ID_VMWARE 0x15AD ++#endif + #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405 + #define PCI_DEVICE_ID_VMWARE_SVGA 0x0710 + #define PCI_DEVICE_ID_VMWARE_VGA 0x0711 +diff -ur a/vmnet-only/vmnetInt.h b/vmnet-only/vmnetInt.h +--- vmnet-only/vmnetInt.h 2015-05-31 16:40:39.000000000 +0300 ++++ vmnet-only/vmnetInt.h 2015-08-07 05:19:49.000000000 +0300 +@@ -77,13 +77,18 @@ + + + extern struct proto vmnet_proto; ++ + #ifdef VMW_NETDEV_HAS_NET +-# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ +- PF_NETLINK, _pri, &vmnet_proto) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ ++ PF_NETLINK, _pri, &vmnet_proto, 1) + #else +-# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) ++# define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ ++ PF_NETLINK, _pri, &vmnet_proto) ++#endif ++#else ++# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) + #endif +- + + #ifdef NF_IP_LOCAL_IN + #define VMW_NF_INET_LOCAL_IN NF_IP_LOCAL_IN diff --git a/vsock-11.1.2-4.2.patch b/vsock-11.1.2-4.2.patch new file mode 100644 index 000000000000..736aafdf1842 --- /dev/null +++ b/vsock-11.1.2-4.2.patch @@ -0,0 +1,119 @@ +diff -ur a/vsock-only/linux/af_vsock.c b/vsock-only/linux/af_vsock.c +--- vsock-only/linux/af_vsock.c 2015-05-31 16:01:26.000000000 +0300 ++++ vsock-only/linux/af_vsock.c 2015-08-07 05:26:39.000000000 +0300 +@@ -2826,7 +2826,9 @@ + * network namespace, and the option to zero the sock was dropped. + * + */ +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++ sk = sk_alloc(net, vsockVmciFamilyOps.family, priority, &vsockVmciProto, 1); ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12) + sk = sk_alloc(vsockVmciFamilyOps.family, priority, + vsockVmciProto.slab_obj_size, vsockVmciProto.slab); + #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) +@@ -4302,7 +4304,7 @@ + goto out; + } + +- memcpy_fromiovec(VMCI_DG_PAYLOAD(dg), msg->msg_iov, len); ++ memcpy_from_msg(VMCI_DG_PAYLOAD(dg), msg, len); + + dg->dst = VMCI_MAKE_HANDLE(remoteAddr->svm_cid, remoteAddr->svm_port); + dg->src = VMCI_MAKE_HANDLE(vsk->localAddr.svm_cid, vsk->localAddr.svm_port); +@@ -4662,7 +4664,7 @@ + * able to send. + */ + +- written = vmci_qpair_enquev(vsk->qpair, msg->msg_iov, ++ written = vmci_qpair_enquev(vsk->qpair, &msg->msg_iter.iov, + len - totalWritten, 0); + if (written < 0) { + err = -ENOMEM; +@@ -4721,6 +4723,7 @@ + VMCIDatagram *dg; + size_t payloadLen; + struct sk_buff *skb; ++ struct iov_iter to; + + sk = sock->sk; + noblock = flags & MSG_DONTWAIT; +@@ -4759,7 +4762,9 @@ + } + + /* Place the datagram payload in the user's iovec. */ +- err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen); ++ // err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iter, payloadLen); ++ iov_iter_init(&to, READ, (struct iovec *)&msg->msg_iter.iov, 1, payloadLen); ++ err = skb_copy_datagram_iter(skb, 0, &to, payloadLen); + if (err) { + goto out; + } +@@ -4905,9 +4910,9 @@ + } + + if (flags & MSG_PEEK) { +- read = vmci_qpair_peekv(vsk->qpair, msg->msg_iov, len - copied, 0); ++ read = vmci_qpair_peekv(vsk->qpair, &msg->msg_iter.iov, len - copied, 0); + } else { +- read = vmci_qpair_dequev(vsk->qpair, msg->msg_iov, len - copied, 0); ++ read = vmci_qpair_dequev(vsk->qpair, &msg->msg_iter.iov, len - copied, 0); + } + + if (read < 0) { +diff -ur a/vsock-only/linux/notify.c b/vsock-only/linux/notify.c +--- vsock-only/linux/notify.c 2015-05-31 16:01:26.000000000 +0300 ++++ vsock-only/linux/notify.c 2015-02-24 01:09:40.000000000 +0300 +@@ -516,7 +516,7 @@ + PKT_FIELD(vsk, sentWaitingRead) = FALSE; + #endif + +- sk->sk_data_ready(sk, 0); ++ sk->sk_data_ready(sk); + } + + +diff -ur a/vsock-only/linux/notifyQState.c b/vsock-only/linux/notifyQState.c +--- vsock-only/linux/notifyQState.c 2015-05-31 16:01:26.000000000 +0300 ++++ vsock-only/linux/notifyQState.c 2015-02-24 01:09:40.000000000 +0300 +@@ -164,7 +164,7 @@ + struct sockaddr_vm *dst, // IN: unused + struct sockaddr_vm *src) // IN: unused + { +- sk->sk_data_ready(sk, 0); ++ sk->sk_data_ready(sk); + } + + +@@ -566,7 +566,7 @@ + } + + /* See the comment in VSockVmciNotifyPktSendPostEnqueue */ +- sk->sk_data_ready(sk, 0); ++ sk->sk_data_ready(sk); + } + + return err; +diff -ur a/vsock-only/Makefile b/vsock-only/Makefile +--- vsock-only/Makefile 2015-05-31 16:01:25.000000000 +0300 ++++ vsock-only/Makefile 2015-02-24 01:09:40.000000000 +0300 +@@ -131,7 +131,7 @@ + > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi) + + CC_WARNINGS := -Wall -Wstrict-prototypes +-CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS) -DVMW_USING_KBUILD ++CC_OPTS := $(GLOBAL_DEFS) $(CC_WARNINGS) -DVMW_USING_KBUILD -g0 + ifdef VMX86_DEVEL + CC_OPTS += -DVMX86_DEVEL + endif +diff -ur a/vsock-only/shared/vmci_kernel_if.h b/vsock-only/shared/vmci_kernel_if.h +--- vsock-only/shared/vmci_kernel_if.h 2015-05-31 16:01:26.000000000 +0300 ++++ vsock-only/shared/vmci_kernel_if.h 2015-02-24 02:51:12.000000000 +0300 +@@ -102,7 +102,7 @@ + typedef struct semaphore VMCIMutex; + typedef PPN *VMCIPpnList; /* List of PPNs in produce/consume queue. */ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) +- typedef kuid_t VMCIHostUser; ++ typedef uid_t VMCIHostUser; + #else + typedef uid_t VMCIHostUser; |