Skip to content

Instantly share code, notes, and snippets.

@raymond-w-ko
Created June 9, 2014 13:55
Show Gist options
  • Save raymond-w-ko/cbc866e8acb220dd94bf to your computer and use it in GitHub Desktop.
Save raymond-w-ko/cbc866e8acb220dd94bf to your computer and use it in GitHub Desktop.
fix for vmware-patch due to Linux kernel 3.15 being released
diff -rupN vmware-patch/PKGBUILD vmware-patch.fixed/PKGBUILD
--- vmware-patch/PKGBUILD 2014-06-06 11:54:47.000000000 -0400
+++ vmware-patch.fixed/PKGBUILD 2014-06-09 09:45:06.424522425 -0400
@@ -13,9 +13,10 @@ options=('!emptydirs')
install=$pkgname.install
source=('vmware-patch' 'vmware-unpatch' 'vmware.service' 'vmware-usbarbitrator.service' 'vmware-workstation.service'
# Workstation 10 / Player (Plus) 6
- 'vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch'
+ 'vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15-3.14.patch'
'vmmon-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch'
'vsock-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch'
+ 'vsock-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15.patch'
'vmnet-10.0.1-10.0.0-6.0.1-6.0.0-3.14-3.13.patch')
package() {
@@ -48,4 +49,5 @@ md5sums=('15fd25de17bdbac66ada2dd23e9d05
'9228a5d7adf3b0b6663e821807e5c911'
'56a25fee00705466e22767426e76f868'
'd6086a3289f20f17e6779d5c0a65c2c8'
+ 'ac485a6628295a0a8b6836fed9e6897e'
'39bd3ee62b652d0a9a90179dfa24784b')
diff -rupN vmware-patch/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch vmware-patch.fixed/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch
--- vmware-patch/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch 2014-04-05 18:32:51.000000000 -0400
+++ vmware-patch.fixed/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.14.patch 1969-12-31 19:00:00.000000000 -0500
@@ -1,23 +0,0 @@
-diff -rupN vmci-only/linux/driver.c vmci-only/linux/driver.c
---- vmci-only/linux/driver.c 2014-03-31 18:49:14.840009422 +0100
-+++ vmci-only/linux/driver.c 2014-03-31 18:49:21.385009439 +0100
-@@ -737,7 +737,7 @@ LinuxDriver_Ioctl(struct inode *inode,
- 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);
-diff -rupN vmci-only/shared/vm_assert.h vmci-only/shared/vm_assert.h
---- vmci-only/shared/vm_assert.h 2014-03-31 18:49:14.841009422 +0100
-+++ vmci-only/shared/vm_assert.h 2014-03-31 18:49:21.385009439 +0100
-@@ -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 -rupN vmware-patch/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15-3.14.patch vmware-patch.fixed/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15-3.14.patch
--- vmware-patch/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15-3.14.patch 1969-12-31 19:00:00.000000000 -0500
+++ vmware-patch.fixed/vmci-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15-3.14.patch 2014-04-05 18:32:51.000000000 -0400
@@ -0,0 +1,23 @@
+diff -rupN vmci-only/linux/driver.c vmci-only/linux/driver.c
+--- vmci-only/linux/driver.c 2014-03-31 18:49:14.840009422 +0100
++++ vmci-only/linux/driver.c 2014-03-31 18:49:21.385009439 +0100
+@@ -737,7 +737,7 @@ LinuxDriver_Ioctl(struct inode *inode,
+ 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);
+diff -rupN vmci-only/shared/vm_assert.h vmci-only/shared/vm_assert.h
+--- vmci-only/shared/vm_assert.h 2014-03-31 18:49:14.841009422 +0100
++++ vmci-only/shared/vm_assert.h 2014-03-31 18:49:21.385009439 +0100
+@@ -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 -rupN vmware-patch/vsock-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15.patch vmware-patch.fixed/vsock-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15.patch
--- vmware-patch/vsock-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15.patch 1969-12-31 19:00:00.000000000 -0500
+++ vmware-patch.fixed/vsock-10.0.2-10.0.1-10.0.0-6.0.2-6.0.1-6.0.0-3.15.patch 2014-06-09 09:39:29.684525484 -0400
@@ -0,0 +1,56 @@
+diff -rupN vsock-only/linux/af_vsock.c vsock-only/linux/af_vsock.c
+--- vsock-only/linux/af_vsock.c 2014-03-31 18:49:14.837009422 +0100
++++ vsock-only/linux/af_vsock.c 2014-03-31 18:49:21.381009439 +0100
+@@ -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(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 -rupN vsock-only/shared/vm_assert.h vsock-only/shared/vm_assert.h
+--- vsock-only/shared/vm_assert.h 2014-03-31 18:49:14.839009422 +0100
++++ vsock-only/shared/vm_assert.h 2014-03-31 18:49:21.382009439 +0100
+@@ -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 -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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment