summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Rossi <rossi.f@inwind.it>2016-08-17 14:10:38 +0200
committerFabio Rossi <rossi.f@inwind.it>2016-08-17 14:10:38 +0200
commit88f3b5bda1e08e8c9e35a5ad96b25c0cb7cda545 (patch)
tree02dbabafcac2d02cb3759768bab4116aae3077ea
parentapp-emulation/vmware-modules: add support to kernel 4.8 (diff)
downloadvmware-88f3b5bda1e08e8c9e35a5ad96b25c0cb7cda545.tar.gz
vmware-88f3b5bda1e08e8c9e35a5ad96b25c0cb7cda545.tar.bz2
vmware-88f3b5bda1e08e8c9e35a5ad96b25c0cb7cda545.zip
Revert "app-emulation/vmware-modules: fix version 304.3 with hardened"
This reverts commit 84ce9f6be8f1b115b9a3c454f3d9d8b2ff6db253.
-rw-r--r--app-emulation/vmware-modules/files/304-hardened.patch62
1 files changed, 45 insertions, 17 deletions
diff --git a/app-emulation/vmware-modules/files/304-hardened.patch b/app-emulation/vmware-modules/files/304-hardened.patch
index 822bd57..cc3e041 100644
--- a/app-emulation/vmware-modules/files/304-hardened.patch
+++ b/app-emulation/vmware-modules/files/304-hardened.patch
@@ -1,6 +1,8 @@
---- vmmon-only/linux/driver.c.orig 2016-07-28 22:10:27.464215083 +0200
-+++ vmmon-only/linux/driver.c 2016-07-28 22:54:20.796362329 +0200
-@@ -124,7 +124,16 @@ static struct vm_operations_struct vmuse
+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
};
@@ -8,19 +10,25 @@
+static struct file_operations vmuser_fops = {
+ .owner = THIS_MODULE,
+ .poll = LinuxDriverPoll,
-+ .unlocked_ioctl = LinuxDriver_Ioctl,
-+ .compat_ioctl = LinuxDriver_Ioctl,
++#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;
- static Atomic_uint32 tsckHz;
- static VmTimeStart tsckHzStartTime;
-@@ -317,21 +326,6 @@ init_module(void)
- linuxState.fastClockPriority = -20;
- linuxState.swapSize = VMMON_UNKNOWN_SWAP_SIZE;
+
+ /*
+@@ -357,27 +372,6 @@ init_module(void)
+ spin_lock_init(&linuxState.pollListLock);
+ #endif
- /*
- * Initialize the file_operations structure. Because this code is always
@@ -31,8 +39,14 @@
- memset(&vmuser_fops, 0, sizeof vmuser_fops);
- vmuser_fops.owner = THIS_MODULE;
- vmuser_fops.poll = LinuxDriverPoll;
-- vmuser_fops.unlocked_ioctl = LinuxDriver_Ioctl;
-- vmuser_fops.compat_ioctl = LinuxDriver_Ioctl;
+-#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;
@@ -40,11 +54,13 @@
#ifdef VMX86_DEVEL
devel_init_module();
linuxState.minor = 0;
---- vmnet-only/driver.c.orig 2016-04-15 01:48:48.000000000 +0200
-+++ vmnet-only/driver.c 2016-07-28 22:54:20.797362329 +0200
-@@ -137,7 +137,16 @@ static ssize_t VNetFileOpWrite(struct f
- static long VNetFileOpUnlockedIoctl(struct file * filp,
+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 = {
@@ -52,15 +68,21 @@
+ .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
-@@ -317,22 +326,6 @@ init_module(void)
+@@ -476,28 +491,6 @@ init_module(void)
goto err_proto;
}
@@ -75,8 +97,14 @@
- 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;
-