diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | dkms.conf.in | 15 | ||||
-rw-r--r-- | vmmon.patch | 226 |
5 files changed, 85 insertions, 179 deletions
@@ -1,7 +1,7 @@ pkgbase = vmware-workstation14 pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC. pkgver = 14.1.7 - pkgrel = 8 + pkgrel = 9 url = https://www.vmware.com/products/workstation-for-linux.html install = vmware-workstation.install arch = x86_64 @@ -80,9 +80,9 @@ pkgbase = vmware-workstation14 sha256sums = 9b4fbe0ba83f761a2eb9ecd05d48428f8b0a5b3abd8404ccbd928408e682f02b sha256sums = c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245 sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d - sha256sums = 05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487 - sha256sums = 6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d - sha256sums = b485e2cdbde0707f1d61ef4cc7ce16b38f18deb751358274ca5b0af81d12d75b + sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e + sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac + sha256sums = 7404a8862dc3d49af385209765cd793d13a37416f9282b3595de9bde7ae31eff sha256sums = e712332335fde4e4846f18c3fa8c933f173336a44546f87ea02b1e1a53f15911 pkgname = vmware-workstation14 @@ -2,10 +2,7 @@ MODULES = \ vmmon \ - vmnet \ - #vmblock \ - #vmci \ - #vsock + vmnet all: $(foreach m, $(MODULES), $m.ko) @@ -16,7 +16,7 @@ pkgname=vmware-workstation14 pkgver=14.1.7 _buildver=12989993 _pkgver=${pkgver}_${_buildver} -pkgrel=8 +pkgrel=9 pkgdesc='The industry standard for running multiple operating systems as virtual machines on a single Linux PC.' arch=(x86_64) url='https://www.vmware.com/products/workstation-for-linux.html' @@ -117,9 +117,9 @@ sha256sums=( 'c0a5aea785db06921fb350d36d5e0fd9a14f5eee0c835686ec6fea1af8c92245' 'd7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d' - '05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487' - '6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d' - 'b485e2cdbde0707f1d61ef4cc7ce16b38f18deb751358274ca5b0af81d12d75b' + '10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e' + '273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac' + '7404a8862dc3d49af385209765cd793d13a37416f9282b3595de9bde7ae31eff' 'e712332335fde4e4846f18c3fa8c933f173336a44546f87ea02b1e1a53f15911' ) options=(!strip emptydirs) @@ -213,7 +213,7 @@ package() { # Make directories and copy files. mkdir -p \ - "$pkgdir/etc"/{cups,pam.d,modprobe.d,profile.d,thnuclnt,vmware} \ + "$pkgdir/etc"/{cups,pam.d,modprobe.d,thnuclnt,vmware} \ "$pkgdir/usr"/{share,bin} \ "$pkgdir/usr/include/vmware-vix" \ "$pkgdir/usr/lib"/{vmware/{setup,lib/libvmware-vim-cmd.so},vmware-vix,vmware-ovftool,vmware-installer/"$vmware_installer_version",cups/filter,modules-load.d} \ diff --git a/dkms.conf.in b/dkms.conf.in index 64c93aa0c18c..5c7adc58ecde 100644 --- a/dkms.conf.in +++ b/dkms.conf.in @@ -13,18 +13,3 @@ DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" BUILT_MODULE_NAME[1]="vmnet" BUILT_MODULE_LOCATION[1]='vmnet-only' DEST_MODULE_LOCATION[1]="/kernel/drivers/net" - -# seems that this module is never used -#BUILT_MODULE_NAME[2]="vmblock" -#BUILT_MODULE_LOCATION[2]='vmblock-only' -#DEST_MODULE_LOCATION[2]="/kernel/fs/vmblock" - -# vmci is already provided by the kernel with vmw_vmci -#BUILT_MODULE_NAME[3]="vmci" -#BUILT_MODULE_LOCATION[3]='vmci-only' -#DEST_MODULE_LOCATION[3]="/kernel/drivers/misc" - -# vsock is already provided by the kernel -#BUILT_MODULE_NAME[4]="vsock" -#BUILT_MODULE_LOCATION[4]='vsock-only' -#DEST_MODULE_LOCATION[4]="/kernel/net/vmw_vsock" diff --git a/vmmon.patch b/vmmon.patch index abf692ba1c01..1a7deb3c79ce 100644 --- a/vmmon.patch +++ b/vmmon.patch @@ -64,6 +64,40 @@ #else --- a/vmmon/linux/hostif.c +++ a/vmmon/linux/hostif.c +@@ -47,6 +47,8 @@ + #include <asm/asm.h> + #include <asm/io.h> + #include <asm/page.h> ++#include <asm/tlbflush.h> ++#include <asm/irq_vectors.h> + #include <asm/uaccess.h> + #include <linux/capability.h> + #include <linux/kthread.h> +@@ -613,7 +615,24 @@ HostIF_FastClockUnlock(int callerID) // IN + static void * + MapCrossPage(struct page *p) // IN: + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) + return vmap(&p, 1, VM_MAP, VM_PAGE_KERNEL_EXEC); ++#else ++ /* Starting with 5.8, vmap() always sets the NX bit, but the cross ++ * page needs to be executable. */ ++ pte_t *ptes[1]; ++ struct vm_struct *area = alloc_vm_area(1UL << PAGE_SHIFT, ptes); ++ if (area == NULL) ++ return NULL; ++ ++ set_pte(ptes[0], mk_pte(p, VM_PAGE_KERNEL_EXEC)); ++ ++ preempt_disable(); ++ __flush_tlb_all(); ++ preempt_enable(); ++ ++ return area->addr; ++#endif + } + + @@ -1499,9 +1499,13 @@ * since at least 2.6.0. */ @@ -78,6 +112,18 @@ /* * Use the memory information linux exports as of late for a more +@@ -1527,7 +1550,10 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN + lockedPages += global_page_state(NR_PAGETABLE); + #endif + /* NR_SLAB_* moved from zone to node in 4.13. */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) ++ lockedPages += global_node_page_state_pages(NR_SLAB_UNRECLAIMABLE_B); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) + lockedPages += global_node_page_state(NR_SLAB_UNRECLAIMABLE); + #else + lockedPages += global_page_state(NR_SLAB_UNRECLAIMABLE); @@ -1602,6 +1606,49 @@ /* *---------------------------------------------------------------------- @@ -195,6 +241,21 @@ { struct poll_wqueues table; +@@ -2388,9 +2453,11 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN: + * the code to happily deal with a pipe or an eventfd. We only care about + * reading no bytes (EAGAIN - non blocking fd) or sizeof(uint64). + */ +- +- res = file->f_op->read(file, (char *) &value, sizeof value, &file->f_pos); +- ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) ++ res = kernel_read(file, file->f_pos, (char *)&value, sizeof value); ++#else ++ res = kernel_read(file, &value, sizeof value, &file->f_pos); ++#endif + if (res == sizeof value) { + res = MX_WAITNORMAL; + } else { @@ -2494,7 +2537,7 @@ HostIF_SemaphoreSignal(uint64 *args) // IN: } @@ -204,6 +265,20 @@ /* * Always write sizeof(uint64) bytes. This works fine for eventfd and +@@ -2501,8 +2566,11 @@ HostIF_SemaphoreSignal(uint64 *args) // IN: + * pipes. The data written is formatted to make an eventfd happy should + * it be present. + */ +- +- res = file->f_op->write(file, (char *) &value, sizeof value, &file->f_pos); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) ++ res = kernel_write(file, (char *)&value, sizeof value, file->f_pos); ++#else ++ res = kernel_write(file, &value, sizeof value, &file->f_pos); ++#endif + + if (res == sizeof value) { + res = MX_WAITNORMAL; @@ -3154,7 +3202,6 @@ HostIF_SetFastClockRate(unsigned int rate) // IN: Frequency in Hz. } } else { @@ -226,154 +301,3 @@ printk(KERN_ERR "%s: Couldn't verify write to uva 0x%p with size %" FMTSZ"u\n", __func__, p, size); -From 2da85cbe6d9c0bc5c7c2008748bd12e70ce0f310 Mon Sep 17 00:00:00 2001 -From: Jan Andres <jandres@gmx.net> -Date: Fri, 4 Sep 2020 10:53:10 +0200 -Subject: [PATCH] Fix NX bit handling for Linux 5.8+ - -Do not use vmap() to map the cross page, it needs to be executable and -vmap() unconditionally sets the NX bit starting with 5.8.x. - -Emulate previous behavior of vmap() by using alloc_vm_area() and -explicitly setting the PTE. ---- - vmmon-only/linux/hostif.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c -index 3a48505..ec6856a 100644 ---- a/vmmon-only/linux/hostif.c -+++ b/vmmon-only/linux/hostif.c -@@ -47,6 +47,7 @@ - #include <asm/asm.h> - #include <asm/io.h> - #include <asm/page.h> -+#include <asm/tlbflush.h> - #include <asm/uaccess.h> - #include <linux/capability.h> - #include <linux/kthread.h> -@@ -613,7 +614,24 @@ HostIF_FastClockUnlock(int callerID) // IN - static void * - MapCrossPage(struct page *p) // IN: - { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) - return vmap(&p, 1, VM_MAP, VM_PAGE_KERNEL_EXEC); -+#else -+ /* Starting with 5.8, vmap() always sets the NX bit, but the cross -+ * page needs to be executable. */ -+ pte_t *ptes[1]; -+ struct vm_struct *area = alloc_vm_area(1UL << PAGE_SHIFT, ptes); -+ if (area == NULL) -+ return NULL; -+ -+ set_pte(ptes[0], mk_pte(p, VM_PAGE_KERNEL_EXEC)); -+ -+ preempt_disable(); -+ __flush_tlb_all(); -+ preempt_enable(); -+ -+ return area->addr; -+#endif - } - - -From c71e377757f20dc78a99d42a127124bb2c49e865 Mon Sep 17 00:00:00 2001 -From: Jan Andres <jandres@gmx.net> -Date: Fri, 4 Sep 2020 10:59:19 +0200 -Subject: [PATCH] Fix NULL pointer dereference in eventfd read call - -Starting with 5.8, the "read" function pointer in eventfd's -file_operations is NULL, "read_iter" is available instead. - -Use kernel_read() and kernel_write() instead of directly calling the -function pointers to handle this correctly. ---- - vmmon-only/linux/hostif.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c -index ec6856a..4a7afb1 100644 ---- a/vmmon-only/linux/hostif.c -+++ b/vmmon-only/linux/hostif.c -@@ -2450,7 +2450,11 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN: - * reading no bytes (EAGAIN - non blocking fd) or sizeof(uint64). - */ - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) -+ res = kernel_read(file, (char *) &value, sizeof value, &file->f_pos); -+#else - res = file->f_op->read(file, (char *) &value, sizeof value, &file->f_pos); -+#endif - - if (res == sizeof value) { - res = MX_WAITNORMAL; -@@ -2563,7 +2567,11 @@ HostIF_SemaphoreSignal(uint64 *args) // IN: - * it be present. - */ - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) -+ res = kernel_write(file, (char *) &value, sizeof value, &file->f_pos); -+#else - res = file->f_op->write(file, (char *) &value, sizeof value, &file->f_pos); -+#endif - - if (res == sizeof value) { - res = MX_WAITNORMAL; -From 1c4c297ddd28f430037efc972b77639f8bdc3ff1 Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Sat, 8 Aug 2020 22:53:50 +0200 -Subject: [PATCH] vmmon: handle change of vmstat slab counters to bytes - -Mainline commit d42f3245c7e2 ("mm: memcg: convert vmstat slab counters to -bytes") in kernel 5.9-rc1 changed vmstat accounting of slab to byte -counters. Unfortunately there doesn't seem to be any obvious way to check -for this change except version check. ---- - vmmon-only/linux/hostif.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c -index 9b179a8..107e11f 100644 ---- a/vmmon-only/linux/hostif.c -+++ b/vmmon-only/linux/hostif.c -@@ -1548,8 +1548,11 @@ HostIF_EstimateLockedPageLimit(const VMDriver* vm, // IN - #else - lockedPages += global_page_state(NR_PAGETABLE); - #endif -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) -+ /* NR_SLAB_* converted to byte counters in 5.9 */ -+ lockedPages += global_node_page_state_pages(NR_SLAB_UNRECLAIMABLE_B); -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) - /* NR_SLAB_* moved from zone to node in 4.13. */ --#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) - lockedPages += global_node_page_state(NR_SLAB_UNRECLAIMABLE); - #else - lockedPages += global_page_state(NR_SLAB_UNRECLAIMABLE); -From 505c6b8967d2b14223e8ba482acffe020a93782f Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Thu, 20 Aug 2020 10:39:56 +0200 -Subject: [PATCH] vmmon: include <asm/irq_vectors.h> explicitly - -After mainline commit 13c01139b171 ("x86/headers: Remove APIC headers from -<asm/smp.h>") in 5.9-rc1, APIC headers are no longer included via -<asm/smp.h> so that linux/hostif.c will use incorrect fallback definitions -of SPURIOUS_APIC_VECTOR, POSTED_INTR_VECTOR and ERROR_APIC_VECTOR even if -built against kernel where these are defined. - -Include <asm/irq_vectors.h> in linux/hostif.c explicitly to avoid that. ---- - vmmon-only/linux/hostif.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c -index 107e11f..a42a034 100644 ---- a/vmmon-only/linux/hostif.c -+++ b/vmmon-only/linux/hostif.c -@@ -49,6 +49,7 @@ - #include <asm/page.h> - #include <asm/tlbflush.h> - #include <asm/uaccess.h> -+#include <asm/irq_vectors.h> - #include <linux/capability.h> - #include <linux/kthread.h> - #include <linux/wait.h> |