diff options
author | Jean-Marc Lenoir | 2019-03-29 23:04:24 +0100 |
---|---|---|
committer | Jean-Marc Lenoir | 2019-03-29 23:04:24 +0100 |
commit | e1c74ee0aeae4e484d297362f9961f16213fc247 (patch) | |
tree | 003a3a191fd8e04a97931ce4e4e342d6b1a095f5 | |
parent | f8d90f5af1fcb28044f81bb92b78f0032fad1f7a (diff) | |
download | aur-e1c74ee0aeae4e484d297362f9961f16213fc247.tar.gz |
Compatibility with Linux 5.1.0-rc2
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | vmmon.patch | 105 |
3 files changed, 107 insertions, 2 deletions
@@ -83,7 +83,7 @@ pkgbase = vmware-workstation11 sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d sha256sums = 05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487 sha256sums = 6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d - sha256sums = 3e65bc0c7d8e61ccafa91a02e5c2f63aa8465d1ffb8009885a613c3b79827772 + sha256sums = 4a0060b80e5b37035f519c4aa0861cff22cf9e692588a7e9fda1833c49e53e3d sha256sums = c255ba20653814158242cb9398a353def0cdb7a4b433b968c1c4e8f573855ad8 sha256sums = 09711e59f708576d2fb09c464ebbb52806cb7f850cb3d5bbeea634fa58fb6c86 sha256sums = 29e0b0db9c0296ab81eee543803c4bd430e2c69c76e33492910e17280da1c05c @@ -118,7 +118,7 @@ sha256sums=( '05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487' '6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d' - '3e65bc0c7d8e61ccafa91a02e5c2f63aa8465d1ffb8009885a613c3b79827772' + '4a0060b80e5b37035f519c4aa0861cff22cf9e692588a7e9fda1833c49e53e3d' 'c255ba20653814158242cb9398a353def0cdb7a4b433b968c1c4e8f573855ad8' ) options=(!strip emptydirs) diff --git a/vmmon.patch b/vmmon.patch index 3b7fddf79a45..a801be3b146f 100644 --- a/vmmon.patch +++ b/vmmon.patch @@ -1502,3 +1502,108 @@ index 75f4c8a..987932b 100644 printk(KERN_ERR "%s: Couldn't verify write to uva 0x%p with size %" FMTSZ"u\n", __func__, p, size); +From 41413a9b6e660a93600a438944d85b6f51eb680c Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Tue, 5 Mar 2019 13:21:35 +0100 +Subject: [PATCH] vmmon: use KERNEL_DS rather than get_ds() + +Commit 736706bee329 ("get rid of legacy 'get_ds()' function") in v5.1-rc1 +removed get_ds() helper. As this helper always returned KERNEL_DS on x86_64 +since the architecture was introduced (and even on i386, it did so since +v2.1.0), simply use KERNEL_DS regardless of kernel version. +--- + vmmon-only/linux/hostif.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index ef88a22..8ca17de 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -2311,7 +2311,7 @@ isVAReadable(VA r) // IN: + int ret; + + old_fs = get_fs(); +- set_fs(get_ds()); ++ set_fs(KERNEL_DS); + r = APICR_TO_ADDR(r, APICR_VERSION); + ret = HostIF_CopyFromUser(&dummy, (void*)r, sizeof(dummy)); + set_fs(old_fs); +@@ -2512,7 +2512,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN: + } + + old_fs = get_fs(); +- set_fs(get_ds()); ++ set_fs(KERNEL_DS); + + { + struct poll_wqueues table; +@@ -2641,7 +2641,7 @@ HostIF_SemaphoreSignal(uint64 *args) // IN: + } + + old_fs = get_fs(); +- set_fs(get_ds()); ++ set_fs(KERNEL_DS); + + /* + * Always write sizeof(uint64) bytes. This works fine for eventfd and +From 48812705d760a0dc760420ce495e34ce4d019b92 Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Sat, 9 Mar 2019 11:11:29 +0100 +Subject: [PATCH] vmmon: fix return type of vm_operations_struct::fault handler + +Commit 3d3539018d2c ("mm: create the new vm_fault_t type") in mainline +5.1-rc1 changed the definition of vm_fault_t type to unsigned to catch +vm_operations_struct::fault handlers which still have int as return value. +LinuxDriverFault() in vmmon module is one of those. + +As handler return type was changed by commit 1c8f422059ae ("mm: change +return type to vm_fault_t") in 4.17-rc1, make LinuxDriverFault() always +return vm_fault_t and define vm_fault_t as int when building against +a pre-4.17 kernel. (Except for the branch for really old kernels where +the handler was vm_operations_struct::nopage and returned a pointer to +struct page.) +--- + vmmon-only/linux/driver.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c +index cdc7fc1..fd9fdac 100644 +--- a/vmmon-only/linux/driver.c ++++ b/vmmon-only/linux/driver.c +@@ -81,6 +81,9 @@ static Bool LinuxDriverCheckPadding(void); + + struct VMXLinuxState linuxState; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) ++typedef int vm_fault_t; ++#endif + + /* + *---------------------------------------------------------------------- +@@ -110,9 +113,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 LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +-static int LinuxDriverFault(struct vm_fault *fault); ++static vm_fault_t LinuxDriverFault(struct vm_fault *fault); + #elif defined(VMW_NOPAGE_2624) +-static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); ++static vm_fault_t LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); + #else + static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, + unsigned long address, +@@ -940,11 +943,11 @@ LinuxDriverPollTimeout(compat_timer_arg_t unused) // IN: + */ + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +-static int ++static vm_fault_t + 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 ++static vm_fault_t LinuxDriverFault(struct vm_area_struct *vma, //IN ++ struct vm_fault *fault) //IN/OUT + #else + static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN + unsigned long address, //IN |