Compare commits

..
2 Commits
Author SHA1 Message Date
Michal Kubecek 2a214307b9 import Workstation 12.5.6 module sources 2017-05-31 10:17:49 +02:00
Michal Kubecek 755b521dd1 import Workstation 12.5.5 module sources 2017-05-31 09:36:09 +02:00
4 changed files with 27 additions and 5 deletions

No files matched your search

+4
View File
@@ -24,7 +24,11 @@
* Include linux/cred.h via linux/sched.h - it is not nice, but
* as cpp does not have #ifexist...
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
#include <linux/sched.h>
#else
#include <linux/cred.h>
#endif
#if !defined(current_fsuid) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
#define current_uid() (current->uid)
+10 -2
View File
@@ -104,7 +104,9 @@ long LinuxDriver_Ioctl(struct file *filp, u_int iocmd,
static int LinuxDriver_Close(struct inode *inode, struct file *filp);
static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
#if defined(VMW_NOPAGE_2624)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
static int LinuxDriverFault(struct vm_fault *fault);
#elif defined(VMW_NOPAGE_2624)
static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault);
#else
static struct page *LinuxDriverNoPage(struct vm_area_struct *vma,
@@ -881,7 +883,10 @@ LinuxDriverPollTimeout(unsigned long clientData) // IN:
*-----------------------------------------------------------------------------
*/
#if defined(VMW_NOPAGE_2624)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
static int
LinuxDriverFault(struct vm_fault *fault) //IN/OUT
#elif defined(VMW_NOPAGE_2624)
static int LinuxDriverFault(struct vm_area_struct *vma, //IN
struct vm_fault *fault) //IN/OUT
#else
@@ -890,6 +895,9 @@ static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
int *type) //OUT: Fault type
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
struct vm_area_struct *vma = fault->vma;
#endif
VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
unsigned long pg;
struct page* page;
+7 -2
View File
@@ -73,7 +73,10 @@
#include <linux/capability.h>
#include <linux/kthread.h>
#include <linux/wait.h>
#include <linux/signal.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include <linux/taskstats_kern.h> // For linux/sched/signal.h without version check
#endif
#include "vmware.h"
#include "x86apic.h"
@@ -1162,7 +1165,9 @@ HostIFGetUserPages(void *uvAddr, // IN
int retval;
down_read(&current->mm->mmap_sem);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
#else
retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
+6 -1
View File
@@ -36,6 +36,9 @@
#include <linux/slab.h>
#include <linux/version.h>
#include <linux/wait.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include <linux/taskstats_kern.h> // For <linux/sched/signal.h> without version dependency
#endif
#include <net/checksum.h>
#include <net/sock.h>
@@ -113,7 +116,9 @@ UserifLockPage(VA addr) // IN
int retval;
down_read(&current->mm->mmap_sem);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
#else
retval = get_user_pages(current, current->mm, addr,