Remove VMware Workstation and VMware Player
Compilation from main gentoo portage tree works fine and this ebuilds not needed anymore.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
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 <linux/kthread.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
+#include <asm/apic.h>
|
||||
|
||||
#include "vmware.h"
|
||||
#include "x86apic.h"
|
||||
@@ -1,91 +0,0 @@
|
||||
diff --git a/vmblock-only/linux/file.c b/vmblock-only/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;
|
||||
typedef ino_t inode_num_t;
|
||||
#endif
|
||||
|
||||
-/* Specifically for our filldir_t callback */
|
||||
-typedef struct FilldirInfo {
|
||||
- filldir_t filldir;
|
||||
- void *dirent;
|
||||
-} FilldirInfo;
|
||||
-
|
||||
-
|
||||
-/*
|
||||
- *----------------------------------------------------------------------------
|
||||
- *
|
||||
- * Filldir --
|
||||
- *
|
||||
- * Callback function for readdir that we use in place of the one provided.
|
||||
- * This allows us to specify that each dentry is a symlink, but pass through
|
||||
- * everything else to the original filldir function.
|
||||
- *
|
||||
- * Results:
|
||||
- * Original filldir's return value.
|
||||
- *
|
||||
- * Side effects:
|
||||
- * Directory information gets copied to user's buffer.
|
||||
- *
|
||||
- *----------------------------------------------------------------------------
|
||||
- */
|
||||
-
|
||||
-static int
|
||||
-Filldir(void *buf, // IN: Dirent buffer passed from FileOpReaddir
|
||||
- const char *name, // IN: Dirent name
|
||||
- int namelen, // IN: len of dirent's name
|
||||
- loff_t offset, // IN: Offset
|
||||
- inode_num_t ino, // IN: Inode number of dirent
|
||||
- unsigned int d_type) // IN: Type of file
|
||||
-{
|
||||
- FilldirInfo *info = buf;
|
||||
-
|
||||
- /* Specify DT_LNK regardless */
|
||||
- return info->filldir(info->dirent, name, namelen, offset, ino, DT_LNK);
|
||||
-}
|
||||
-
|
||||
-
|
||||
/* File operations */
|
||||
|
||||
/*
|
||||
@@ -166,11 +126,10 @@ FileOpOpen(struct inode *inode, // IN
|
||||
|
||||
static int
|
||||
FileOpReaddir(struct file *file, // IN
|
||||
- void *dirent, // IN
|
||||
- filldir_t filldir) // IN
|
||||
+ struct dir_context *ctx) // IN
|
||||
{
|
||||
int ret;
|
||||
- FilldirInfo info;
|
||||
+
|
||||
struct file *actualFile;
|
||||
|
||||
if (!file) {
|
||||
@@ -184,12 +143,10 @@ FileOpReaddir(struct file *file, // IN
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- info.filldir = filldir;
|
||||
- info.dirent = dirent;
|
||||
-
|
||||
- actualFile->f_pos = file->f_pos;
|
||||
- ret = vfs_readdir(actualFile, Filldir, &info);
|
||||
- file->f_pos = actualFile->f_pos;
|
||||
+ /* Ricky Wong Yung Fei:
|
||||
+ * Manipulation of pos is now handled internally by iterate_dir().
|
||||
+ */
|
||||
+ ret = iterate_dir(actualFile, ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -237,7 +194,7 @@ FileOpRelease(struct inode *inode, // IN
|
||||
|
||||
|
||||
struct file_operations RootFileOps = {
|
||||
- .readdir = FileOpReaddir,
|
||||
+ .iterate = FileOpReaddir,
|
||||
.open = FileOpOpen,
|
||||
.release = FileOpRelease,
|
||||
};
|
||||
@@ -1,47 +0,0 @@
|
||||
--- vmblock-only/linux/inode.c 2014-04-14 23:25:31.755344470 +0200
|
||||
+++ vmblock-only/linux/inode.c.new 2014-04-14 23:23:31.732337759 +0200
|
||||
@@ -178,7 +178,11 @@
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+#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
|
||||
}
|
||||
|
||||
|
||||
diff -rupN vsock-only/linux/notify.c vsock-only-mod/linux/notify.c
|
||||
--- vsock-only/linux/notify.c 2014-04-15 03:11:41.000000000 +0530
|
||||
+++ vsock-only-mod/linux/notify.c 2014-05-27 21:36:56.713291909 +0530
|
||||
@@ -516,7 +516,7 @@ VSockVmciHandleWrote(struct sock *sk,
|
||||
PKT_FIELD(vsk, sentWaitingRead) = FALSE;
|
||||
#endif
|
||||
|
||||
- sk->sk_data_ready(sk, 0);
|
||||
+ sk->sk_data_ready(sk);
|
||||
}
|
||||
|
||||
|
||||
diff -rupN vsock-only/linux/notifyQState.c vsock-only-mod/linux/notifyQState.c
|
||||
--- vsock-only/linux/notifyQState.c 2014-04-15 03:11:41.000000000 +0530
|
||||
+++ vsock-only-mod/linux/notifyQState.c 2014-05-27 21:38:52.561286734 +0530
|
||||
@@ -164,7 +164,7 @@ VSockVmciHandleWrote(struct sock *sk,
|
||||
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 @@ VSockVmciNotifyPktRecvPostDequeue(struct
|
||||
}
|
||||
|
||||
/* See the comment in VSockVmciNotifyPktSendPostEnqueue */
|
||||
- sk->sk_data_ready(sk, 0);
|
||||
+ sk->sk_data_ready(sk);
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -1,236 +0,0 @@
|
||||
diff -u vmnet-only/driver.c vmnet-only.new/driver.c
|
||||
--- vmnet-only/driver.c 2014-11-20 20:13:56.000000000 -0500
|
||||
+++ vmnet-only.new/driver.c 2015-02-09 11:53:18.000000000 -0500
|
||||
@@ -264,11 +264,17 @@
|
||||
struct file * filp) // IN:
|
||||
{
|
||||
int ret = -ENOTTY;
|
||||
-
|
||||
- if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
|
||||
- ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
|
||||
- }
|
||||
- return ret;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
+ if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
|
||||
+ ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
|
||||
+ }
|
||||
+ return ret;
|
||||
+#else
|
||||
+ if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
|
||||
+ ret = VNetFileOpIoctl(filp->f_path.dentry->d_inode, filp, iocmd, ioarg);
|
||||
+ }
|
||||
+ return ret;
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1191,11 +1197,20 @@
|
||||
struct inode *inode = NULL;
|
||||
long err;
|
||||
|
||||
- if (filp && filp->f_dentry) {
|
||||
- inode = filp->f_dentry->d_inode;
|
||||
- }
|
||||
- err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
|
||||
- return err;
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
+ if (filp && filp->f_dentry) {
|
||||
+ inode = filp->f_dentry->d_inode;
|
||||
+ }
|
||||
+ err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
|
||||
+ return err;
|
||||
+#else
|
||||
+ if (filp && filp->f_path.dentry) {
|
||||
+ inode = filp->f_path.dentry->d_inode;
|
||||
+ }
|
||||
+ err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
|
||||
+ return err;
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
#endif
|
||||
|
||||
diff -u vmnet-only/userif.c vmnet-only.new/userif.c
|
||||
--- vmnet-only/userif.c 2014-11-20 20:13:56.000000000 -0500
|
||||
+++ vmnet-only.new/userif.c 2015-02-09 11:56:03.000000000 -0500
|
||||
@@ -523,7 +523,13 @@
|
||||
.iov_base = buf,
|
||||
.iov_len = len,
|
||||
};
|
||||
- return skb_copy_datagram_iovec(skb, 0, &iov, len);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
+ return skb_copy_datagram_iovec(skb, 0, &iov, len);
|
||||
+#else
|
||||
+ struct iov_iter to;
|
||||
+ iov_iter_init(&to, READ, &iov, 1, len);
|
||||
+ return skb_copy_datagram_iter(skb, 0, &to, len);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
diff -u vmblock-only.orig/linux/file.c vmblock-only/linux/file.c
|
||||
--- vmblock-only.orig/linux/file.c 2015-02-11 12:18:29.000000000 -0500
|
||||
+++ vmblock-only/linux/file.c 2015-02-11 12:41:41.000000000 -0500
|
||||
@@ -92,7 +92,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");
|
||||
diff -rupN vmblock-only.orig/linux/dentry.c vmblock-only/linux/dentry.c
|
||||
--- vmblock-only.orig/linux/dentry.c 2015-02-14 18:05:46.000000000 -0500
|
||||
+++ vmblock-only/linux/dentry.c 2015-02-14 18:09:59.000000000 -0500
|
||||
@@ -63,7 +63,7 @@ DentryOpRevalidate(struct dentry *dentry
|
||||
unsigned int flags) // IN: lookup flags & intent
|
||||
{
|
||||
VMBlockInodeInfo *iinfo;
|
||||
- struct nameidata actualNd;
|
||||
+ struct path actualNd;
|
||||
struct dentry *actualDentry;
|
||||
int ret;
|
||||
|
||||
diff -rupN vmblock-only.orig/linux/filesystem.c vmblock-only/linux/filesystem.c
|
||||
--- vmblock-only.orig/linux/filesystem.c 2014-11-20 19:29:15.000000000 -0500
|
||||
+++ vmblock-only/linux/filesystem.c 2015-02-14 18:10:49.000000000 -0500
|
||||
@@ -322,7 +322,7 @@ Iget(struct super_block *sb, // IN: f
|
||||
{
|
||||
VMBlockInodeInfo *iinfo;
|
||||
struct inode *inode;
|
||||
- struct nameidata actualNd;
|
||||
+ struct path actualNd;
|
||||
|
||||
ASSERT(sb);
|
||||
|
||||
diff -rupN vmblock-only.orig/shared/compat_namei.h vmblock-only/shared/compat_namei.h
|
||||
--- vmblock-only.orig/shared/compat_namei.h 2014-11-20 19:29:15.000000000 -0500
|
||||
+++ vmblock-only/shared/compat_namei.h 2015-02-14 18:08:38.000000000 -0500
|
||||
@@ -26,21 +26,21 @@
|
||||
* struct. They were both replaced with a struct path.
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
-#define compat_vmw_nd_to_dentry(nd) (nd).path.dentry
|
||||
+#define compat_vmw_nd_to_dentry(nd) (nd).dentry
|
||||
#else
|
||||
#define compat_vmw_nd_to_dentry(nd) (nd).dentry
|
||||
#endif
|
||||
|
||||
/* In 2.6.25-rc2, path_release(&nd) was replaced with path_put(&nd.path). */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
-#define compat_path_release(nd) path_put(&(nd)->path)
|
||||
+#define compat_path_release(nd) path_put(nd)
|
||||
#else
|
||||
#define compat_path_release(nd) path_release(nd)
|
||||
#endif
|
||||
|
||||
/* path_lookup was removed in 2.6.39 merge window VFS merge */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
|
||||
-#define compat_path_lookup(name, flags, nd) kern_path(name, flags, &((nd)->path))
|
||||
+#define compat_path_lookup(name, flags, nd) kern_path(name, flags, nd)
|
||||
#else
|
||||
#define compat_path_lookup(name, flags, nd) path_lookup(name, flags, nd)
|
||||
#endif
|
||||
diff -ur vmci-only.orig/linux/vmciKernelIf.c vmci-only/linux/vmciKernelIf.c
|
||||
--- vmci-only.orig/linux/vmciKernelIf.c 2014-06-13 01:20:45.000000000 +0200
|
||||
+++ vmci-only/linux/vmciKernelIf.c 2015-02-21 17:59:47.011588979 +0100
|
||||
@@ -1249,6 +1249,23 @@
|
||||
return VMCI_SUCCESS;
|
||||
}
|
||||
|
||||
+int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len)
|
||||
+{
|
||||
+ while (len > 0) {
|
||||
+ if (iov->iov_len) {
|
||||
+ int copy = min_t(unsigned int, iov->iov_len, len);
|
||||
+ if (copy_to_user(iov->iov_base, kdata, copy))
|
||||
+ return -EFAULT;
|
||||
+ kdata += copy;
|
||||
+ len -= copy;
|
||||
+ iov->iov_len -= copy;
|
||||
+ iov->iov_base += copy;
|
||||
+ }
|
||||
+ iov++;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
/*
|
||||
*-----------------------------------------------------------------------------
|
||||
diff -ur vsock-only.orig/linux/af_vsock.c vsock-only/linux/af_vsock.c
|
||||
--- vsock-only.orig/linux/af_vsock.c 2015-02-21 18:09:14.147266976 +0100
|
||||
+++ vsock-only/linux/af_vsock.c 2015-02-21 18:14:07.134285068 +0100
|
||||
@@ -233,13 +233,13 @@
|
||||
char __user *optval, int __user * optlen);
|
||||
|
||||
static int VSockVmciDgramSendmsg(struct kiocb *kiocb,
|
||||
- struct socket *sock, struct msghdr *msg, size_t len);
|
||||
+ struct socket *sock, struct user_msghdr *msg, size_t len);
|
||||
static int VSockVmciDgramRecvmsg(struct kiocb *kiocb, struct socket *sock,
|
||||
- struct msghdr *msg, size_t len, int flags);
|
||||
+ struct user_msghdr *msg, size_t len, int flags);
|
||||
static int VSockVmciStreamSendmsg(struct kiocb *kiocb,
|
||||
- struct socket *sock, struct msghdr *msg, size_t len);
|
||||
+ struct socket *sock, struct user_msghdr *msg, size_t len);
|
||||
static int VSockVmciStreamRecvmsg(struct kiocb *kiocb, struct socket *sock,
|
||||
- struct msghdr *msg, size_t len, int flags);
|
||||
+ struct user_msghdr *msg, size_t len, int flags);
|
||||
|
||||
static int VSockVmciCreate(
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
|
||||
@@ -4195,7 +4195,7 @@
|
||||
static int
|
||||
VSockVmciDgramSendmsg(struct kiocb *kiocb, // UNUSED
|
||||
struct socket *sock, // IN: socket to send on
|
||||
- struct msghdr *msg, // IN: message to send
|
||||
+ struct user_msghdr *msg, // IN: message to send
|
||||
size_t len) // IN: length of message
|
||||
{
|
||||
int err;
|
||||
@@ -4525,7 +4525,7 @@
|
||||
static int
|
||||
VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
|
||||
struct socket *sock, // IN: socket to send on
|
||||
- struct msghdr *msg, // IN: message to send
|
||||
+ struct user_msghdr *msg, // IN: message to send
|
||||
size_t len) // IN: length of message
|
||||
{
|
||||
struct sock *sk;
|
||||
@@ -4694,7 +4694,7 @@
|
||||
static int
|
||||
VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED
|
||||
struct socket *sock, // IN: socket to receive from
|
||||
- struct msghdr *msg, // IN/OUT: message to receive into
|
||||
+ struct user_msghdr *msg, // IN/OUT: message to receive into
|
||||
size_t len, // IN: length of receive buffer
|
||||
int flags) // IN: receive flags
|
||||
{
|
||||
@@ -4704,6 +4704,7 @@
|
||||
VMCIDatagram *dg;
|
||||
size_t payloadLen;
|
||||
struct sk_buff *skb;
|
||||
+ struct iov_iter to;
|
||||
|
||||
sk = sock->sk;
|
||||
noblock = flags & MSG_DONTWAIT;
|
||||
@@ -4742,7 +4743,8 @@
|
||||
}
|
||||
|
||||
/* Place the datagram payload in the user's iovec. */
|
||||
- err = skb_copy_datagram_iovec(skb, sizeof *dg, msg->msg_iov, payloadLen);
|
||||
+ iov_iter_init(&to, READ, msg->msg_iov, 1, payloadLen);
|
||||
+ err = skb_copy_datagram_iter(skb, sizeof *dg, &to, payloadLen);
|
||||
if (err) {
|
||||
goto out;
|
||||
}
|
||||
@@ -4785,7 +4787,7 @@
|
||||
static int
|
||||
VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
|
||||
struct socket *sock, // IN: socket to receive from
|
||||
- struct msghdr *msg, // IN/OUT: message to receive into
|
||||
+ struct user_msghdr *msg, // IN/OUT: message to receive into
|
||||
size_t len, // IN: length of receive buffer
|
||||
int flags) // IN: receive flags
|
||||
{
|
||||
@@ -1,40 +0,0 @@
|
||||
diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel
|
||||
index ab7a727..e3ec9d2 100644
|
||||
--- a/vmblock-only/Makefile.kernel
|
||||
+++ b/vmblock-only/Makefile.kernel
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
INCLUDE += -I$(SRCROOT)/include
|
||||
|
||||
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
|
||||
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
|
||||
|
||||
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, )
|
||||
EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, )
|
||||
diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel
|
||||
index 8770d1d..c4746c3 100644
|
||||
--- a/vmmon-only/Makefile.kernel
|
||||
+++ b/vmmon-only/Makefile.kernel
|
||||
@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
|
||||
INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
|
||||
-I$(SRCROOT)/vmcore
|
||||
|
||||
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
|
||||
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
|
||||
|
||||
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, )
|
||||
|
||||
diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel
|
||||
index d1e3133..665d428 100644
|
||||
--- a/vmnet-only/Makefile.kernel
|
||||
+++ b/vmnet-only/Makefile.kernel
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
INCLUDE := -I$(SRCROOT)
|
||||
|
||||
-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
|
||||
+EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
|
||||
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
|
||||
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, )
|
||||
EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, )
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
|
||||
index 2b81323..746c8b8 100644
|
||||
--- a/vmblock-only/Makefile
|
||||
+++ b/vmblock-only/Makefile
|
||||
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
|
||||
ifdef LINUXINCLUDE
|
||||
HEADER_DIR = $(LINUXINCLUDE)
|
||||
else
|
||||
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
|
||||
+HEADER_DIR = $(KERNEL_DIR)
|
||||
endif
|
||||
|
||||
-BUILD_DIR = $(HEADER_DIR)/..
|
||||
+BUILD_DIR = $(KBUILD_OUTPUT)
|
||||
|
||||
DRIVER := vmblock
|
||||
PRODUCT := ws
|
||||
diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
|
||||
index 5bd867b..91a83d4 100644
|
||||
--- a/vmmon-only/Makefile
|
||||
+++ b/vmmon-only/Makefile
|
||||
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
|
||||
ifdef LINUXINCLUDE
|
||||
HEADER_DIR = $(LINUXINCLUDE)
|
||||
else
|
||||
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
|
||||
+HEADER_DIR = $(KERNEL_DIR)
|
||||
endif
|
||||
|
||||
-BUILD_DIR = $(HEADER_DIR)/..
|
||||
+BUILD_DIR = $(KBUILD_OUTPUT)
|
||||
|
||||
DRIVER := vmmon
|
||||
PRODUCT := @@PRODUCT@@
|
||||
diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
|
||||
index d4eb73c..c7c6d38 100644
|
||||
--- a/vmnet-only/Makefile
|
||||
+++ b/vmnet-only/Makefile
|
||||
@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r)
|
||||
ifdef LINUXINCLUDE
|
||||
HEADER_DIR = $(LINUXINCLUDE)
|
||||
else
|
||||
-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
|
||||
+HEADER_DIR = $(KERNEL_DIR)
|
||||
endif
|
||||
|
||||
-BUILD_DIR = $(HEADER_DIR)/..
|
||||
+BUILD_DIR = $(KBUILD_OUTPUT)
|
||||
|
||||
DRIVER := vmnet
|
||||
PRODUCT := @@PRODUCT@@
|
||||
@@ -1,24 +0,0 @@
|
||||
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
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
|
||||
index 79716bd..2dd83fe 100644
|
||||
--- a/vmblock-only/linux/control.c
|
||||
+++ b/vmblock-only/linux/control.c
|
||||
@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name
|
||||
|
||||
retval = i < 0 ? -EINVAL : blockOp(name, blocker);
|
||||
|
||||
- putname(name);
|
||||
+ __putname(name);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
diff -Naur a/linux/inode.c b/linux/inode.c
|
||||
--- 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)
|
||||
@@ -1,21 +0,0 @@
|
||||
--- vmblock-only/linux/control.c 2014-03-15 15:28:40.871076076 +0100
|
||||
+++ vmblock-only/linux/control.c.new 2014-03-15 15:29:15.079074439 +0100
|
||||
@@ -279,11 +279,17 @@
|
||||
int i;
|
||||
int retval;
|
||||
|
||||
- name = getname(buf);
|
||||
+ name = __getname();
|
||||
if (IS_ERR(name)) {
|
||||
return PTR_ERR(name);
|
||||
}
|
||||
|
||||
+ i = strncpy_from_user(name, buf, PATH_MAX);
|
||||
+ if (i < 0 || i == PATH_MAX) {
|
||||
+ __putname(name);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) {
|
||||
name[i] = '\0';
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
diff -ruN work.orig/vmblock-only/linux/control.c work/vmblock-only/linux/control.c
|
||||
--- work.orig/vmblock-only/linux/control.c 2013-11-02 18:05:39.960226399 +0100
|
||||
+++ work/vmblock-only/linux/control.c 2013-11-02 18:09:11.760231432 +0100
|
||||
@@ -208,17 +208,14 @@
|
||||
VMBlockSetProcEntryOwner(controlProcMountpoint);
|
||||
|
||||
/* Create /proc/fs/vmblock/dev */
|
||||
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
|
||||
- VMBLOCK_CONTROL_MODE,
|
||||
- controlProcDirEntry);
|
||||
- if (!controlProcEntry) {
|
||||
+ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, VMBLOCK_CONTROL_MODE, controlProcDirEntry, &ControlFileOps);
|
||||
+ if (controlProcEntry == NULL) {
|
||||
Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
|
||||
remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
|
||||
remove_proc_entry(VMBLOCK_CONTROL_PROC_DIRNAME, NULL);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- controlProcEntry->proc_fops = &ControlFileOps;
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- a/vmblock-only/linux/inode.c 2014-04-15 00:41:40.000000000 +0300
|
||||
+++ b/vmblock-only/linux/inode.c 2014-04-23 12:44:50.005954179 +0300
|
||||
@@ -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;
|
||||
+ inode->i_uid = GLOBAL_ROOT_UID;
|
||||
+ inode->i_gid = GLOBAL_ROOT_GID;
|
||||
inode->i_op = &LinkInodeOps;
|
||||
|
||||
d_add(dentry, inode);
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
diff --git a/vsock-only/linux/af_vsock.c b/vsock-only/linux/af_vsock.c
|
||||
index 4d0c6c3..1c29976 100644
|
||||
--- a/vsock-only/linux/af_vsock.c
|
||||
+++ b/vsock-only/linux/af_vsock.c
|
||||
@@ -4285,7 +4285,7 @@ VSockVmciDgramSendmsg(struct kiocb *kiocb, // UNUSED
|
||||
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);
|
||||
@@ -4645,7 +4645,7 @@ VSockVmciStreamSendmsg(struct kiocb *kiocb, // UNUSED
|
||||
* 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;
|
||||
@@ -4704,6 +4704,7 @@ VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED
|
||||
VMCIDatagram *dg;
|
||||
size_t payloadLen;
|
||||
struct sk_buff *skb;
|
||||
+ struct iov_iter to;
|
||||
|
||||
sk = sock->sk;
|
||||
noblock = flags & MSG_DONTWAIT;
|
||||
@@ -4742,7 +4743,9 @@ VSockVmciDgramRecvmsg(struct kiocb *kiocb, // UNUSED
|
||||
}
|
||||
|
||||
/* 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, &msg->msg_iter.iov, 1, payloadLen);
|
||||
+ err = skb_copy_datagram_iter(skb, 0, &to, payloadLen);
|
||||
if (err) {
|
||||
goto out;
|
||||
}
|
||||
@@ -4888,9 +4891,9 @@ VSockVmciStreamRecvmsg(struct kiocb *kiocb, // UNUSED
|
||||
}
|
||||
|
||||
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) {
|
||||
@@ -1,170 +0,0 @@
|
||||
diff --git a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
|
||||
index 921f25c..41a39e3 100644
|
||||
--- a/vmci-only/linux/driver.c
|
||||
+++ b/vmci-only/linux/driver.c
|
||||
@@ -241,7 +241,24 @@ static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
|
||||
#define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0)
|
||||
#endif
|
||||
|
||||
-static struct file_operations vmuser_fops;
|
||||
+/*
|
||||
+ * Moved file operations initialize here because of incompatibilites
|
||||
+ * with Gentoo hardened profile/hardend Linux 3.
|
||||
+ */
|
||||
+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
|
||||
+};
|
||||
|
||||
|
||||
/*
|
||||
@@ -378,26 +395,6 @@ vmci_host_init(void)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- /*
|
||||
- * 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;
|
||||
-
|
||||
sprintf(linuxState.deviceName, "vmci");
|
||||
linuxState.major = 10;
|
||||
linuxState.misc.minor = MISC_DYNAMIC_MINOR;
|
||||
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",
|
||||
@@ -1,62 +0,0 @@
|
||||
diff --git a/vmblock-only/linux/dentry.c b/vmblock-only/linux/dentry.c
|
||||
index d885777..513cadd 100644
|
||||
--- a/vmblock-only/linux/dentry.c
|
||||
+++ b/vmblock-only/linux/dentry.c
|
||||
@@ -38,6 +38,20 @@ struct dentry_operations LinkDentryOps = {
|
||||
.d_revalidate = DentryOpRevalidate,
|
||||
};
|
||||
|
||||
+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];
|
||||
+};
|
||||
+
|
||||
+
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
diff --git a/vmblock-only/linux/file.c b/vmblock-only/linux/file.c
|
||||
index 5499169..753e523 100644
|
||||
--- a/vmblock-only/linux/file.c
|
||||
+++ b/vmblock-only/linux/file.c
|
||||
@@ -92,7 +92,7 @@ FileOpOpen(struct inode *inode, // IN
|
||||
* 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");
|
||||
diff --git a/vmblock-only/linux/filesystem.c b/vmblock-only/linux/filesystem.c
|
||||
index af57499..70f97b5 100644
|
||||
--- a/vmblock-only/linux/filesystem.c
|
||||
+++ b/vmblock-only/linux/filesystem.c
|
||||
@@ -76,6 +76,19 @@ static struct file_system_type fsType = {
|
||||
#endif
|
||||
.kill_sb = kill_anon_super,
|
||||
};
|
||||
+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];
|
||||
+};
|
||||
+
|
||||
|
||||
|
||||
/*
|
||||
@@ -1,41 +0,0 @@
|
||||
diff --git a/vmci-only/linux/vmciKernelIf.c b/vmci-only/linux/vmciKernelIf.c
|
||||
index a51bef8..8143425 100644
|
||||
--- a/vmci-only/linux/vmciKernelIf.c
|
||||
+++ b/vmci-only/linux/vmciKernelIf.c
|
||||
@@ -40,7 +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"
|
||||
#include "compat_mm.h"
|
||||
@@ -1225,11 +1225,11 @@
|
||||
}
|
||||
|
||||
if (isIovec) {
|
||||
- struct iovec *iov = (struct iovec *)src;
|
||||
+ struct msghdr *msg = src;
|
||||
int err;
|
||||
|
||||
/* The iovec will track bytesCopied internally. */
|
||||
- err = memcpy_fromiovec((uint8 *)va + pageOffset, iov, toCopy);
|
||||
+ err = memcpy_from_msg((uint8 *)va + pageOffset, msg, toCopy);
|
||||
if (err != 0) {
|
||||
if (!kernelIf->isDataMapped) {
|
||||
kunmap(kernelIf->page[pageIndex]);
|
||||
@@ -1300,11 +1300,11 @@ __VMCIMemcpyFromQueue(void *dest, // OUT:
|
||||
}
|
||||
|
||||
if (isIovec) {
|
||||
- struct iovec *iov = (struct iovec *)dest;
|
||||
+ struct msghdr *msg = 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->isDataMapped) {
|
||||
kunmap(kernelIf->page[pageIndex]);
|
||||
Reference in New Issue
Block a user