Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -pur a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c
- --- a/vmblock-only/linux/control.c 2014-04-15 01:41:40.000000000 +0400
- +++ b/vmblock-only/linux/control.c 2014-04-30 03:14:23.547585000 +0400
- @@ -208,9 +208,10 @@ SetupProcDevice(void)
- VMBlockSetProcEntryOwner(controlProcMountpoint);
- /* Create /proc/fs/vmblock/dev */
- - controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- + controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
- - controlProcDirEntry);
- + controlProcDirEntry,
- + &ControlFileOps);
- if (!controlProcEntry) {
- Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n");
- remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry);
- @@ -218,7 +219,6 @@ SetupProcDevice(void)
- return -EINVAL;
- }
- - controlProcEntry->proc_fops = &ControlFileOps;
- return 0;
- }
- @@ -282,7 +282,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 -pur a/vmblock-only/linux/file.c b/vmblock-only/linux/file.c
- --- a/vmblock-only/linux/file.c 2014-04-15 01:41:40.000000000 +0400
- +++ b/vmblock-only/linux/file.c 2014-04-30 03:16:58.239585000 +0400
- @@ -237,7 +237,8 @@ FileOpRelease(struct inode *inode, // IN
- struct file_operations RootFileOps = {
- - .readdir = FileOpReaddir,
- + .owner = THIS_MODULE,
- + .llseek = no_llseek,
- .open = FileOpOpen,
- .release = FileOpRelease,
- };
- diff -pur a/vmblock-only/linux/inode.c b/vmblock-only/linux/inode.c
- --- a/vmblock-only/linux/inode.c 2014-04-15 01:41:40.000000000 +0400
- +++ b/vmblock-only/linux/inode.c 2014-04-30 03:25:58.574585000 +0400
- @@ -35,8 +35,14 @@
- /* Inode operations */
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
- static struct dentry *InodeOpLookup(struct inode *dir,
- struct dentry *dentry, struct nameidata *nd);
- +#else
- +static struct dentry *InodeOpLookup(struct inode *dir,
- + struct dentry *dentry, unsigned int);
- +#endif
- +
- 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 +81,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 +141,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_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,8 +228,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)
- return ERR_PTR(ret);
- diff -pur a/vmblock-only/shared/vm_assert.h b/vmblock-only/shared/vm_assert.h
- --- a/vmblock-only/shared/vm_assert.h 2014-04-15 01:41:41.000000000 +0400
- +++ b/vmblock-only/shared/vm_assert.h 2014-04-30 03:06:30.547585000 +0400
- @@ -256,6 +256,7 @@ void WarningThrottled(uint32 *count, con
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -pur a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
- --- a/vmci-only/linux/driver.c 2014-04-15 01:41:40.000000000 +0400
- +++ b/vmci-only/linux/driver.c 2014-04-30 03:27:49.275585000 +0400
- @@ -737,7 +737,7 @@ LinuxDriver_Ioctl(struct inode *inode,
- 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);
- diff -pur a/vmci-only/shared/vm_assert.h b/vmci-only/shared/vm_assert.h
- --- a/vmci-only/shared/vm_assert.h 2014-04-15 01:41:41.000000000 +0400
- +++ b/vmci-only/shared/vm_assert.h 2014-04-30 03:28:34.071585000 +0400
- @@ -256,6 +256,7 @@ void WarningThrottled(uint32 *count, con
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- + #undef DEPRECATED
- #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -pur a/vmmon-only/include/vm_assert.h b/vmmon-only/include/vm_assert.h
- --- a/vmmon-only/include/vm_assert.h 2014-04-15 04:06:20.000000000 +0400
- +++ b/vmmon-only/include/vm_assert.h 2014-04-30 03:07:34.868585000 +0400
- @@ -256,6 +256,7 @@ void WarningThrottled(uint32 *count, con
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -pur a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
- --- a/vmmon-only/linux/driver.c 2014-04-15 04:06:21.000000000 +0400
- +++ b/vmmon-only/linux/driver.c 2014-04-30 03:08:21.206585000 +0400
- @@ -1338,7 +1338,7 @@ LinuxDriverReadTSC(void *data, // OUT:
- *-----------------------------------------------------------------------------
- */
- -__attribute__((always_inline)) static Bool
- +__always_inline static Bool
- LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max - TSC min
- {
- TSCDelta tscDelta;
- diff -pur a/vmnet-only/vm_assert.h b/vmnet-only/vm_assert.h
- --- a/vmnet-only/vm_assert.h 2014-04-15 04:06:21.000000000 +0400
- +++ b/vmnet-only/vm_assert.h 2014-04-30 03:09:58.375585000 +0400
- @@ -256,6 +256,7 @@ void WarningThrottled(uint32 *count, con
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- + #undef DEPRECATED /* in <linux/printk.h> since 3.14.0 */
- #define DEPRECATED(_fix) do {} while (0)
- #endif
- diff -pur a/vsock-only/linux/af_vsock.c b/vsock-only/linux/af_vsock.c
- --- a/vsock-only/linux/af_vsock.c 2014-04-15 01:41:41.000000000 +0400
- +++ b/vsock-only/linux/af_vsock.c 2014-04-30 03:31:26.075585000 +0400
- @@ -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 = 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;
- diff -pur a/vsock-only/shared/vm_assert.h b/vsock-only/shared/vm_assert.h
- --- a/vsock-only/shared/vm_assert.h 2014-04-15 01:41:41.000000000 +0400
- +++ b/vsock-only/shared/vm_assert.h 2014-04-30 03:30:42.534585000 +0400
- @@ -256,6 +256,7 @@ void WarningThrottled(uint32 *count, con
- __FILE__, __LINE__, __FUNCTION__, \
- _fix))
- #else
- + #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