diff options
Diffstat (limited to 'app-emulation/vmware-modules/files/279-3.14.0.patch')
-rw-r--r-- | app-emulation/vmware-modules/files/279-3.14.0.patch | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/279-3.14.0.patch b/app-emulation/vmware-modules/files/279-3.14.0.patch new file mode 100644 index 0000000..f7fd9ba --- /dev/null +++ b/app-emulation/vmware-modules/files/279-3.14.0.patch @@ -0,0 +1,161 @@ +diff -urpN work.orig/vmblock-only/shared/vm_assert.h work/vmblock-only/shared/vm_assert.h +--- work.orig/vmblock-only/shared/vm_assert.h 2014-04-14 14:41:41.000000000 -0700 ++++ work/vmblock-only/shared/vm_assert.h 2014-05-10 18:33:30.113514073 -0700 +@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con + #define LOG_ONCE(_s) DO_ONCE(Log _s) + + #ifdef VMX86_DEVEL +- #define DEPRECATED(_fix) DO_ONCE( \ ++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \ + Warning("%s:%d: %s is DEPRECATED. %s\n", \ + __FILE__, __LINE__, __FUNCTION__, \ + _fix)) + #else +- #define DEPRECATED(_fix) do {} while (0) ++ #define VMWARE_DEPRECATED(_fix) do {} while (0) + #endif + + +diff -urpN work.orig/vmci-only/shared/vm_assert.h work/vmci-only/shared/vm_assert.h +--- work.orig/vmci-only/shared/vm_assert.h 2014-04-14 14:41:41.000000000 -0700 ++++ work/vmci-only/shared/vm_assert.h 2014-05-10 18:31:23.811773455 -0700 +@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con + #define LOG_ONCE(_s) DO_ONCE(Log _s) + + #ifdef VMX86_DEVEL +- #define DEPRECATED(_fix) DO_ONCE( \ ++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \ + Warning("%s:%d: %s is DEPRECATED. %s\n", \ + __FILE__, __LINE__, __FUNCTION__, \ + _fix)) + #else +- #define DEPRECATED(_fix) do {} while (0) ++ #define VMWARE_DEPRECATED(_fix) do {} while (0) + #endif + + +diff -urpN work.orig/vmmon-only/include/vm_assert.h work/vmmon-only/include/vm_assert.h +--- work.orig/vmmon-only/include/vm_assert.h 2014-04-14 17:06:20.000000000 -0700 ++++ work/vmmon-only/include/vm_assert.h 2014-05-10 18:32:38.682026876 -0700 +@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con + #define LOG_ONCE(_s) DO_ONCE(Log _s) + + #ifdef VMX86_DEVEL +- #define DEPRECATED(_fix) DO_ONCE( \ ++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \ + Warning("%s:%d: %s is DEPRECATED. %s\n", \ + __FILE__, __LINE__, __FUNCTION__, \ + _fix)) + #else +- #define DEPRECATED(_fix) do {} while (0) ++ #define VMWARE_DEPRECATED(_fix) do {} while (0) + #endif + + +diff -urpN work.orig/vmnet-only/vm_assert.h work/vmnet-only/vm_assert.h +--- work.orig/vmnet-only/vm_assert.h 2014-04-14 17:06:21.000000000 -0700 ++++ work/vmnet-only/vm_assert.h 2014-05-10 18:31:50.192510386 -0700 +@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con + #define LOG_ONCE(_s) DO_ONCE(Log _s) + + #ifdef VMX86_DEVEL +- #define DEPRECATED(_fix) DO_ONCE( \ ++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \ + Warning("%s:%d: %s is DEPRECATED. %s\n", \ + __FILE__, __LINE__, __FUNCTION__, \ + _fix)) + #else +- #define DEPRECATED(_fix) do {} while (0) ++ #define VMWARE_DEPRECATED(_fix) do {} while (0) + #endif + + +diff -urpN work.orig/vsock-only/shared/vm_assert.h work/vsock-only/shared/vm_assert.h +--- work.orig/vsock-only/shared/vm_assert.h 2014-04-14 14:41:41.000000000 -0700 ++++ work/vsock-only/shared/vm_assert.h 2014-05-10 18:30:51.497095714 -0700 +@@ -251,12 +251,12 @@ void WarningThrottled(uint32 *count, con + #define LOG_ONCE(_s) DO_ONCE(Log _s) + + #ifdef VMX86_DEVEL +- #define DEPRECATED(_fix) DO_ONCE( \ ++ #define VMWARE_DEPRECATED(_fix) DO_ONCE( \ + Warning("%s:%d: %s is DEPRECATED. %s\n", \ + __FILE__, __LINE__, __FUNCTION__, \ + _fix)) + #else +- #define DEPRECATED(_fix) do {} while (0) ++ #define VMWARE_DEPRECATED(_fix) do {} while (0) + #endif + + +diff -urpN work.orig/vmci-only/shared/compat_cred.h work/vmci-only/shared/compat_cred.h +--- work.orig/vmci-only/shared/compat_cred.h 2014-05-10 18:55:27.051287859 -0700 ++++ work/vmci-only/shared/compat_cred.h 2014-05-10 19:20:24.975246986 -0700 +@@ -35,6 +35,7 @@ + #define current_fsgid() (current->fsgid) + #endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) + #ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS + #define CURRENT_UID() (__kuid_val(current_uid())) + #define CURRENT_GID() (__kgid_val(current_gid())) +@@ -42,6 +43,10 @@ + #define CURRENT_UID() (current_uid()) + #define CURRENT_GID() (current_gid()) + #endif ++#else ++#define CURRENT_UID() (from_kuid_munged(current_user_ns(), current_uid())) ++#define CURRENT_GID() (from_kgid_munged(current_user_ns(), current_gid())) ++#endif + + #if !defined(cap_set_full) + /* cap_set_full was removed in kernel version 3.0-rc4. */ +diff -urpN work.orig/vsock-only/shared/compat_cred.h work/vsock-only/shared/compat_cred.h +--- work.orig/vsock-only/shared/compat_cred.h 2014-05-10 18:55:27.051287859 -0700 ++++ work/vsock-only/shared/compat_cred.h 2014-05-10 19:19:35.046747235 -0700 +@@ -35,6 +35,7 @@ + #define current_fsgid() (current->fsgid) + #endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) + #ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS + #define CURRENT_UID() (__kuid_val(current_uid())) + #define CURRENT_GID() (__kgid_val(current_gid())) +@@ -42,6 +43,10 @@ + #define CURRENT_UID() (current_uid()) + #define CURRENT_GID() (current_gid()) + #endif ++#else ++#define CURRENT_UID() (from_kuid_munged(current_user_ns(), current_uid())) ++#define CURRENT_GID() (from_kgid_munged(current_user_ns(), current_gid())) ++#endif + + #if !defined(cap_set_full) + /* cap_set_full was removed in kernel version 3.0-rc4. */ +diff -urpN work.orig/vmblock-only/linux/control.c work/vmblock-only/linux/control.c +--- work.orig/vmblock-only/linux/control.c 2014-05-11 00:34:14.807305118 -0700 ++++ work/vmblock-only/linux/control.c 2014-05-11 00:44:20.970502062 -0700 +@@ -279,11 +279,23 @@ ExecuteBlockOp(const char __user *buf, + int i; + int retval; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) + name = (char*) getname(buf)->name; ++#else ++ name = __getname(); ++#endif + if (IS_ERR(name)) { + return PTR_ERR(name); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) ++ i = strncpy_from_user(name, buf, PATH_MAX); ++ if (i < 0 || i == PATH_MAX) { ++ __putname(name); ++ return -EINVAL; ++ } ++#endif ++ + for (i = strlen(name) - 1; i >= 0 && name[i] == '/'; i--) { + name[i] = '\0'; + } |