Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ru a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
- --- a/vmblock-only/linux/control.c 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmblock-only/linux/control.c 2013-10-28 03:25:37.000000000 +0400
- @@ -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,6 @@
- return -EINVAL;
- }
- - controlProcEntry->proc_fops = &ControlFileOps;
- return 0;
- }
- @@ -282,7 +283,7 @@
- int i;
- int retval;
- - name = getname(buf);
- + name = (char *)getname(buf)->name;
- if (IS_ERR(name)) {
- return PTR_ERR(name);
- }
- diff -ru a/vmblock-only/linux/dentry.c b/vmblock-only/linux/dentry.c
- --- a/vmblock-only/linux/dentry.c 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmblock-only/linux/dentry.c 2013-10-28 03:27:48.000000000 +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);
- 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)) {
- diff -ru a/vmblock-only/linux/file.c b/vmblock-only/linux/file.c
- --- a/vmblock-only/linux/file.c 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmblock-only/linux/file.c 2013-10-28 02:35:14.000000000 +0400
- @@ -237,7 +237,9 @@
- struct file_operations RootFileOps = {
- - .readdir = FileOpReaddir,
- +/* .readdir = FileOpReaddir, */
- + .owner = THIS_MODULE,
- + .llseek = no_llseek,
- .open = FileOpOpen,
- .release = FileOpRelease,
- };
- diff -ru a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c
- --- a/vmblock-only/linux/inode.c 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmblock-only/linux/inode.c 2013-10-28 03:28:57.000000000 +0400
- @@ -35,13 +35,13 @@
- /* Inode operations */
- -static struct dentry *InodeOpLookup(struct inode *dir,
- - struct dentry *dentry, struct nameidata *nd);
- -static int InodeOpReadlink(struct dentry *dentry, char __user *buffer, int buflen);
- +static struct dentry *InodeOpLookup(struct inode *, struct dentry *, unsigned int);
- +static int InodeOpReadlink(struct dentry *, char __user *, int);
- +
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
- -static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
- + static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
- #else
- -static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
- + static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd);
- #endif
- @@ -49,7 +49,7 @@
- .lookup = InodeOpLookup,
- };
- -static struct inode_operations LinkInodeOps = {
- +struct inode_operations LinkInodeOps = {
- .readlink = InodeOpReadlink,
- .follow_link = InodeOpFollowlink,
- };
- @@ -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;
- @@ -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_gid = make_kgid(current_user_ns(), 0);
- + inode->i_uid = make_kuid(current_user_ns(), 0);
- inode->i_op = &LinkInodeOps;
- d_add(dentry, inode);
- @@ -221,7 +222,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)
- @@ -230,3 +231,4 @@
- return ret;
- #endif
- }
- +
- Только в b/vmblock-only/shared/autoconf: file_operations_flush.c
- diff -ru a/vmblock-only/shared/compat_dcache.h b/vmblock-only/shared/compat_dcache.h
- --- a/vmblock-only/shared/compat_dcache.h 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmblock-only/shared/compat_dcache.h 2013-10-18 21:56:11.000000000 +0400
- @@ -1,5 +1,5 @@
- /*********************************************************
- - * Copyright (C) 2006 VMware, Inc. All rights reserved.
- + * Copyright (C) 2013 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- @@ -25,7 +25,7 @@
- * per-dentry locking was born in 2.5.62.
- */
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 62)
- -#define compat_lock_dentry(dentry) spin_lock(&dentry->d_lock)
- +#define compat_lock_dentry(dentry) spin_lock(&dentry->d_lock)
- #define compat_unlock_dentry(dentry) spin_unlock(&dentry->d_lock)
- #else
- #define compat_lock_dentry(dentry) do {} while (0)
- @@ -48,4 +48,15 @@
- })
- #endif
- +/*
- + * d_count field was removed in 3.11.0.
- + */
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
- +#define compat_d_count(dentry) d_count(dentry)
- +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
- +#define compat_d_count(dentry) dentry->d_count
- +#else
- +#define compat_d_count(dentry) atomic_read(&dentry->d_count);
- +#endif
- +
- #endif /* __COMPAT_DCACHE_H__ */
- diff -ru a/vmblock-only/shared/vm_assert.h b/vmblock-only/shared/vm_assert.h
- --- a/vmblock-only/shared/vm_assert.h 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmblock-only/shared/vm_assert.h 2014-03-24 13:59:49.000000000 +0400
- @@ -256,7 +256,8 @@
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- - #define DEPRECATED(_fix) do {} while (0)
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- + #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -ru a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
- --- a/vmci-only/linux/driver.c 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmci-only/linux/driver.c 2013-10-28 02:33:39.000000000 +0400
- @@ -737,7 +737,7 @@
- goto init_release;
- }
- - user = current_uid();
- + user = from_kuid(&init_user_ns, current_uid());
- retval = VMCIContext_InitContext(initBlock.cid, initBlock.flags,
- 0 /* Unused */, vmciLinux->userVersion,
- &user, &vmciLinux->context);
- Только в b/vmci-only/shared/autoconf: file_operations_flush.c
- diff -ru a/vmci-only/shared/compat_dcache.h b/vmci-only/shared/compat_dcache.h
- --- a/vmci-only/shared/compat_dcache.h 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmci-only/shared/compat_dcache.h 2013-10-18 21:56:11.000000000 +0400
- @@ -1,5 +1,5 @@
- /*********************************************************
- - * Copyright (C) 2006 VMware, Inc. All rights reserved.
- + * Copyright (C) 2013 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- @@ -25,7 +25,7 @@
- * per-dentry locking was born in 2.5.62.
- */
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 62)
- -#define compat_lock_dentry(dentry) spin_lock(&dentry->d_lock)
- +#define compat_lock_dentry(dentry) spin_lock(&dentry->d_lock)
- #define compat_unlock_dentry(dentry) spin_unlock(&dentry->d_lock)
- #else
- #define compat_lock_dentry(dentry) do {} while (0)
- @@ -48,4 +48,15 @@
- })
- #endif
- +/*
- + * d_count field was removed in 3.11.0.
- + */
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
- +#define compat_d_count(dentry) d_count(dentry)
- +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
- +#define compat_d_count(dentry) dentry->d_count
- +#else
- +#define compat_d_count(dentry) atomic_read(&dentry->d_count);
- +#endif
- +
- #endif /* __COMPAT_DCACHE_H__ */
- diff -ru a/vmci-only/shared/vm_assert.h b/vmci-only/shared/vm_assert.h
- --- a/vmci-only/shared/vm_assert.h 2013-08-27 21:53:57.000000000 +0400
- +++ b/vmci-only/shared/vm_assert.h 2014-03-24 13:59:14.000000000 +0400
- @@ -256,7 +256,8 @@
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- - #define DEPRECATED(_fix) do {} while (0)
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- + #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -ru a/vmmon-only/include/vm_assert.h b/vmmon-only/include/vm_assert.h
- --- a/vmmon-only/include/vm_assert.h 2013-08-27 23:29:03.000000000 +0400
- +++ b/vmmon-only/include/vm_assert.h 2014-03-24 14:00:03.000000000 +0400
- @@ -256,7 +256,8 @@
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- - #define DEPRECATED(_fix) do {} while (0)
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- + #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -ru a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
- --- a/vmmon-only/linux/driver.c 2013-08-27 23:29:04.000000000 +0400
- +++ b/vmmon-only/linux/driver.c 2014-03-24 13:48:23.000000000 +0400
- @@ -1338,7 +1338,9 @@
- *-----------------------------------------------------------------------------
- */
- -__attribute__((always_inline)) static Bool
- +#include <linux/compiler-gcc.h>
- +
- +__always_inline static Bool
- LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
- {
- TSCDelta tscDelta;
- @@ -1348,7 +1350,7 @@
- /* Take the global lock to block concurrent calls. */
- HostIF_GlobalLock(14);
- - /* Loop to warm up the cache. */
- + /* Loop to warm up the cache. */
- for (i = 0; i < 3; i++) {
- Atomic_Write64(&tscDelta.min, ~CONST64U(0));
- Atomic_Write64(&tscDelta.max, CONST64U(0));
- diff -ru a/vmmon-only/linux/vmmonInt.h b/vmmon-only/linux/vmmonInt.h
- --- a/vmmon-only/linux/vmmonInt.h 2013-08-27 23:29:04.000000000 +0400
- +++ b/vmmon-only/linux/vmmonInt.h 2013-10-28 02:32:10.000000000 +0400
- @@ -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 -ru a/vmnet-only/filter.c b/vmnet-only/filter.c
- --- a/vmnet-only/filter.c 2013-08-27 23:29:04.000000000 +0400
- +++ b/vmnet-only/filter.c 2013-12-04 01:15:21.000000000 +0400
- @@ -27,6 +27,7 @@
- #include "compat_module.h"
- #include <linux/mutex.h>
- #include <linux/netdevice.h>
- +#include <linux/version.h>
- #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
- # include <linux/module.h>
- #else
- @@ -203,7 +204,11 @@
- #endif
- static unsigned int
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
- VNetFilterHookFn(unsigned int hooknum, // IN:
- +#else
- +VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
- +#endif
- #ifdef VMW_NFHOOK_USES_SKB
- struct sk_buff *skb, // IN:
- #else
- @@ -252,7 +257,12 @@
- /* When the host transmits, hooknum is VMW_NF_INET_POST_ROUTING. */
- /* When the host receives, hooknum is VMW_NF_INET_LOCAL_IN. */
- - transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
- +
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
- + transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
- +#else
- + transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
- +#endif
- packetHeader = compat_skb_network_header(skb);
- ip = (struct iphdr*)packetHeader;
- diff -ru a/vmnet-only/vm_assert.h b/vmnet-only/vm_assert.h
- --- a/vmnet-only/vm_assert.h 2013-08-27 23:29:04.000000000 +0400
- +++ b/vmnet-only/vm_assert.h 2014-03-24 14:00:31.000000000 +0400
- @@ -256,7 +256,8 @@
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- - #define DEPRECATED(_fix) do {} while (0)
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- + #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -ru a/vsock-only/linux/af_vsock.c b/vsock-only/linux/af_vsock.c
- --- a/vsock-only/linux/af_vsock.c 2013-08-27 21:53:57.000000000 +0400
- +++ b/vsock-only/linux/af_vsock.c 2013-10-28 02:29:33.000000000 +0400
- @@ -2869,7 +2869,7 @@
- vsk->connectTimeout = psk->connectTimeout;
- } else {
- vsk->trusted = capable(CAP_NET_ADMIN);
- - vsk->owner = current_uid();
- + vsk->owner = from_kuid(&init_user_ns, current_uid()),
- vsk->queuePairSize = VSOCK_DEFAULT_QP_SIZE;
- vsk->queuePairMinSize = VSOCK_DEFAULT_QP_SIZE_MIN;
- vsk->queuePairMaxSize = VSOCK_DEFAULT_QP_SIZE_MAX;
- Только в b/vsock-only/shared/autoconf: file_operations_flush.c
- diff -ru a/vsock-only/shared/compat_dcache.h b/vsock-only/shared/compat_dcache.h
- --- a/vsock-only/shared/compat_dcache.h 2013-08-27 21:53:57.000000000 +0400
- +++ b/vsock-only/shared/compat_dcache.h 2013-10-18 21:56:11.000000000 +0400
- @@ -1,5 +1,5 @@
- /*********************************************************
- - * Copyright (C) 2006 VMware, Inc. All rights reserved.
- + * Copyright (C) 2013 VMware, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- @@ -25,7 +25,7 @@
- * per-dentry locking was born in 2.5.62.
- */
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 62)
- -#define compat_lock_dentry(dentry) spin_lock(&dentry->d_lock)
- +#define compat_lock_dentry(dentry) spin_lock(&dentry->d_lock)
- #define compat_unlock_dentry(dentry) spin_unlock(&dentry->d_lock)
- #else
- #define compat_lock_dentry(dentry) do {} while (0)
- @@ -48,4 +48,15 @@
- })
- #endif
- +/*
- + * d_count field was removed in 3.11.0.
- + */
- +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
- +#define compat_d_count(dentry) d_count(dentry)
- +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
- +#define compat_d_count(dentry) dentry->d_count
- +#else
- +#define compat_d_count(dentry) atomic_read(&dentry->d_count);
- +#endif
- +
- #endif /* __COMPAT_DCACHE_H__ */
- diff -ru a/vsock-only/shared/vm_assert.h b/vsock-only/shared/vm_assert.h
- --- a/vsock-only/shared/vm_assert.h 2013-08-27 21:53:57.000000000 +0400
- +++ b/vsock-only/shared/vm_assert.h 2014-03-24 14:00:58.000000000 +0400
- @@ -256,7 +256,8 @@
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- - #define DEPRECATED(_fix) do {} while (0)
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- + #define DEPRECATED(_fix) do {} while (0)
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement