diff options
author | Jean-Marc Lenoir | 2024-03-01 18:47:35 +0100 |
---|---|---|
committer | Jean-Marc Lenoir | 2024-03-01 18:47:35 +0100 |
commit | 7ff3e27128560ad9c309155134786ca1832d830c (patch) | |
tree | 7f384c770812cb413724f31f649710c2ec0fd863 | |
parent | aeb76d23c65ec7bcaf06ba93d860a6990906b676 (diff) | |
download | aur-7ff3e27128560ad9c309155134786ca1832d830c.tar.gz |
Fix compatibility with Linux 6.8-rc6
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | vmmon.patch | 144 | ||||
-rw-r--r-- | vmnet.patch | 120 |
4 files changed, 259 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = vmware-workstation11 pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC. pkgver = 11.1.4 - pkgrel = 29 + pkgrel = 30 url = https://www.vmware.com/products/workstation-for-linux.html install = vmware-workstation.install arch = x86_64 @@ -84,7 +84,7 @@ pkgbase = vmware-workstation11 sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac - sha256sums = 615ec54a025ee94dfb70cf9ab75d53dc61f7b6b3fe1693952a0548cb8b301045 - sha256sums = 73527182ab476871fa816f7705b1926ca2d48290ae32c9a0f085aefee92be439 + sha256sums = 3c98e7ab9b9a4e159ee94d3ad4d3e3441f803a5fe6c1c5d87ec1d7875877aaf5 + sha256sums = c67445e4a404cdce89141bdb97ceefb63aae2aa93ac62c4c8b4dc57d9606c907 pkgname = vmware-workstation11 @@ -16,7 +16,7 @@ pkgname=vmware-workstation11 pkgver=11.1.4 _buildver=3848939 _pkgver=${pkgver}_${_buildver} -pkgrel=29 +pkgrel=30 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' @@ -121,8 +121,8 @@ sha256sums=( '10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e' '273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac' - '615ec54a025ee94dfb70cf9ab75d53dc61f7b6b3fe1693952a0548cb8b301045' - '73527182ab476871fa816f7705b1926ca2d48290ae32c9a0f085aefee92be439' + '3c98e7ab9b9a4e159ee94d3ad4d3e3441f803a5fe6c1c5d87ec1d7875877aaf5' + 'c67445e4a404cdce89141bdb97ceefb63aae2aa93ac62c4c8b4dc57d9606c907' ) options=(!strip emptydirs) diff --git a/vmmon.patch b/vmmon.patch index e83d629b55ed..9a62baa87f17 100644 --- a/vmmon.patch +++ b/vmmon.patch @@ -1,6 +1,6 @@ --- a/vmmon/Makefile +++ b/vmmon/Makefile -@@ -43,7 +43,11 @@ INCLUDE += -I$(SRCROOT)/shared +@@ -43,7 +43,11 @@ endif @@ -963,7 +963,25 @@ { Vmx86_GetkHzEstimate(&linuxState.startTime); } -@@ -287,9 +243,13 @@ init_module(void) +@@ -253,7 +209,7 @@ + /* + *---------------------------------------------------------------------- + * +- * init_module -- ++ * LinuxDriverInit -- + * + * linux module entry point. Called by /sbin/insmod command + * +@@ -266,7 +222,7 @@ + */ + + int +-init_module(void) ++LinuxDriverInit(void) + { + int retval; + +@@ -287,9 +243,13 @@ */ init_waitqueue_head(&linuxState.pollQueue); @@ -978,7 +996,7 @@ linuxState.fastClockThread = NULL; linuxState.fastClockFile = NULL; -@@ -310,14 +270,8 @@ init_module(void) +@@ -310,14 +270,8 @@ memset(&vmuser_fops, 0, sizeof vmuser_fops); vmuser_fops.owner = THIS_MODULE; vmuser_fops.poll = LinuxDriverPoll; @@ -993,7 +1011,7 @@ vmuser_fops.open = LinuxDriver_Open; vmuser_fops.release = LinuxDriver_Close; vmuser_fops.mmap = LinuxDriverMmap; -@@ -365,9 +319,13 @@ init_module(void) +@@ -365,9 +319,13 @@ */ Vmx86_ReadTSCAndUptime(&linuxState.startTime); @@ -1008,6 +1026,24 @@ tscTimer.expires = jiffies + 4 * HZ; add_timer(&tscTimer); +@@ -381,7 +339,7 @@ + /* + *---------------------------------------------------------------------- + * +- * cleanup_module -- ++ * LinuxDriverExit -- + * + * Called by /sbin/rmmod + * +@@ -390,7 +348,7 @@ + */ + + void +-cleanup_module(void) ++LinuxDriverExit(void) + { + unregister_ioctl32_handlers(); + @@ -764,7 +722,6 @@ void LinuxDriverWakeUp(Bool selective) // IN: { @@ -1149,6 +1185,12 @@ /* +@@ -2198,3 +2162,5 @@ + * by default (i.e., neither mkinitrd nor modprobe will accept it). + */ + MODULE_INFO(supported, "external"); ++module_init(LinuxDriverInit); ++module_exit(LinuxDriverExit); --- a/vmmon/linux/hostif.c +++ b/vmmon/linux/hostif.c @@ -44,10 +44,6 @@ @@ -1592,7 +1634,7 @@ int res; int signalFD = args[1]; uint64 value = 1; // make an eventfd happy should it be there -@@ -2607,22 +2709,32 @@ HostIF_SemaphoreSignal(uint64 *args) // +@@ -2607,22 +2709,36 @@ HostIF_SemaphoreSignal(uint64 *args) // return MX_WAITERROR; } @@ -1604,7 +1646,11 @@ + */ + eventfd = eventfd_ctx_fileget(file); + if (!IS_ERR(eventfd)) { ++#if COMPAT_LINUX_VERSION_CHECK_LT(6, 8, 0) + eventfd_signal(eventfd, 1); ++#else ++ eventfd_signal(eventfd); ++#endif + fput(file); + return MX_WAITNORMAL; + } @@ -1973,3 +2019,91 @@ index 3f43c62..7eaa49a 100644 +#endif /* COMPAT_LINUX_VERSION_CHECK_LT(6, 5, 0) */ + #endif /* __PGTBL_H__ */ +From 218fec600d0af1c5e9f4af819b216fb9c69bb838 Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Fri, 12 Jan 2024 08:30:33 +0100 +Subject: [PATCH] modules: fix build with -Wmissing-prototypes + +Mainline commit 0fcb70851fbf ("Makefile.extrawarn: turn on +missing-prototypes globally") in 6.8-rc1 enables -Wmissing-prototypes +globally, revealing a lot of unclean code and also some actual problems. +This is also the case in vmmon and vmnet modules. + +Most of them are addressed by making functions used only within one file +static. The missing prototype of random_get_entropy_fallback() is handled +by including <linux/timex.h> rather than <asm/timex.h>. + +Finally, there are four functions in vmnet module which are actually used +in multiple files but instead of proper declarations, their prototype is +duplicated in vmnet-only/driver.c, risking that the two copies won't match +(which actually happened in one case). The cleanest solution would be +creating separate header files for them (bridge.h, netif.h, userif.h and +vnetUserListener.h) and including them in the respective source file and +driver.c. As the developers already handle similar cases by simply putting +the declarations into vnetInt.h, let us do the same to keep things simple. +--- + vmmon-only/common/vmx86.c | 2 +- + vmmon-only/linux/driver.c | 4 ++-- + vmmon-only/linux/hostif.c | 6 +++--- + vmnet-only/bridge.c | 2 +- + vmnet-only/driver.c | 16 ++-------------- + vmnet-only/vnetInt.h | 7 +++++++ + 6 files changed, 16 insertions(+), 21 deletions(-) + +diff --git a/vmmon-only/common/vmx86.c b/vmmon-only/common/vmx86.c +index 156e94a9..c5ed3e25 100644 +--- a/vmmon-only/common/vmx86.c ++++ b/vmmon-only/common/vmx86.c +@@ -58,7 +58,7 @@ + #include "x86svm.h" + #include "x86cpuid_asm.h" + #if defined(linux) +-#include <asm/timex.h> ++#include <linux/timex.h> + #endif + #include "x86perfctr.h" + +diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c +index 9c855869..32e9c5ea 100644 +--- a/vmmon-only/linux/driver.c ++++ b/vmmon-only/linux/driver.c +@@ -221,7 +221,7 @@ LinuxDriverInitTSCkHz(void) + *---------------------------------------------------------------------- + */ + +-int ++static int + LinuxDriverInit(void) + { + int retval; +@@ -347,7 +347,7 @@ LinuxDriverInit(void) + *---------------------------------------------------------------------- + */ + +-void ++static void + LinuxDriverExit(void) + { + unregister_ioctl32_handlers(); +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index 3bce32c3..b83e21d3 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -3110,7 +3110,7 @@ HostIF_ReadPage(VMDriver *vm, // IN: The VM instance + *---------------------------------------------------------------------- + */ + +-int ++static int + HostIFWritePageWork(MPN64 mpn, // MPN of the page + VA64 addr, // data to write to the page + Bool kernelBuffer) // is the buffer in kernel space? +@@ -3416,7 +3416,7 @@ HostIFDoIoctl(struct file *filp, + *---------------------------------------------------------------------- + */ + +-int ++static int + HostIFStartTimer(Bool rateChanged, //IN: Did rate change? + unsigned int rate, //IN: current clock rate + struct file *filp) //IN: /dev/rtc descriptor diff --git a/vmnet.patch b/vmnet.patch index cfec7bad9d5b..7ff679b5a80b 100644 --- a/vmnet.patch +++ b/vmnet.patch @@ -1,6 +1,6 @@ --- a/vmnet/Makefile +++ b/vmnet/Makefile -@@ -43,7 +43,11 @@ INCLUDE += -I$(SRCROOT)/shared +@@ -43,7 +43,11 @@ endif @@ -140,7 +140,7 @@ #endif /* __COMPAT_NETDEVICE_H__ */ --- a/vmnet/driver.c +++ b/vmnet/driver.c -@@ -279,7 +279,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list +@@ -279,7 +279,7 @@ /* *---------------------------------------------------------------------- * @@ -149,7 +149,7 @@ * * linux module entry point. Called by /sbin/insmod command. * Initializes module and Registers this driver for a -@@ -296,7 +296,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list +@@ -296,7 +296,7 @@ */ int @@ -158,7 +158,7 @@ { int retval; -@@ -358,7 +358,7 @@ init_module(void) +@@ -358,7 +358,7 @@ /* *---------------------------------------------------------------------- * @@ -167,7 +167,7 @@ * * Called by /sbin/rmmod. Unregisters this driver for a * vnet major #, and deinitializes the modules. The 64-bit -@@ -375,7 +375,7 @@ init_module(void) +@@ -375,7 +375,7 @@ */ void @@ -176,7 +176,7 @@ { unregister_chrdev(VNET_MAJOR_NUMBER, "vmnet"); VNetProtoUnregister(); -@@ -1705,3 +1705,5 @@ MODULE_LICENSE("GPL v2"); +@@ -1705,3 +1705,5 @@ * by default (i.e., neither mkinitrd nor modprobe will accept it). */ MODULE_INFO(supported, "external"); @@ -594,3 +594,111 @@ Fixing VMWare Player on Linux when using DHCP addresses: https://www.nikhef.nl/~ if (count < n) { n = count; } +From add7a6d8b99565fdfa79098315b0a69fd244eda3 Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Fri, 12 Jan 2024 08:30:33 +0100 +Subject: [PATCH] modules: fix build with -Wmissing-prototypes + +Mainline commit 0fcb70851fbf ("Makefile.extrawarn: turn on +missing-prototypes globally") in 6.8-rc1 enables -Wmissing-prototypes +globally, revealing a lot of unclean code and also some actual problems. +This is also the case in vmmon and vmnet modules. + +Most of them are addressed by making functions used only within one file +static. A special case are Vmx86_MapPage() and Vmx86_UnmapPage() which were +defined since Workstation 14.0.0 but they are not actually used anywhere +until 15.0.0 so that dropping them seems to be the best option. + +The missing prototype of random_get_entropy_fallback() is handled by +including <linux/timex.h> rather than <asm/timex.h>. + +Finally, there are four functions in vmnet module which are actually used +in multiple files but instead of proper declarations, their prototype is +duplicated in vmnet-only/driver.c, risking that the two copies won't match +(which actually happened in one case). The cleanest solution would be +creating separate header files for them (bridge.h, netif.h, userif.h and +vnetUserListener.h) and including them in the respective source file and +driver.c. As the developers already handle similar cases by simply putting +the declarations into vnetInt.h, let us do the same to keep things simple. +--- + vmmon-only/bootstrap/monLoaderVmmon.c | 1 + + vmmon-only/common/vmx86.c | 50 +-------------------------- + vmmon-only/linux/driver.c | 4 +-- + vmmon-only/linux/hostif.c | 6 ++-- + vmnet-only/bridge.c | 2 +- + vmnet-only/driver.c | 16 ++------- + vmnet-only/vnetInt.h | 7 ++++ + 7 files changed, 17 insertions(+), 69 deletions(-) + +diff --git a/vmnet-only/bridge.c b/vmnet-only/bridge.c +index b144adab..b46df795 100644 +--- a/vmnet-only/bridge.c ++++ b/vmnet-only/bridge.c +@@ -1576,7 +1576,7 @@ VNetBridgeComputeHeaderPos(struct sk_buff *skb) // IN: buffer to examine + *---------------------------------------------------------------------- + */ + +-void ++static void + VNetBridgeSendLargePacket(struct sk_buff *skb, // IN: packet to split + VNetBridge *bridge) // IN: bridge + { +diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c +index 602bbfa1..a6f6a7d9 100644 +--- a/vmnet-only/driver.c ++++ b/vmnet-only/driver.c +@@ -50,18 +50,6 @@ + + #include "vmnetInt.h" + +-/* +- * Initialization and creation routines from other files. +- * Putting them here reduces the need for so many header files. +- */ +- +-extern int VNetUserIf_Create(VNetPort **ret); +-extern int VNetNetIf_Create(char *devName, VNetPort **ret, int hubNum); +-extern int VNetBridge_Create(char *devName, uint32 flags, VNetJack *hubJack, +- VNetPort **ret); +-extern int VNetUserListener_Create(uint32 classMask, VNetJack *hubJack, VNetPort **ret); +- +- + /* + * Structure for cycle detection of host interfaces. This + * struct is only used by VNetCycleDetectIf(). +@@ -295,7 +283,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list + *---------------------------------------------------------------------- + */ + +-int ++static int + LinuxDriverInit(void) + { + int retval; +@@ -374,7 +362,7 @@ vmnet_init_module(void) + *---------------------------------------------------------------------- + */ + +-void ++static void + LinuxDriverExit(void) + { + unregister_chrdev(VNET_MAJOR_NUMBER, "vmnet"); +diff --git a/vmnet-only/vnetInt.h b/vmnet-only/vnetInt.h +index 5f41269d..cb25e3b8 100644 +--- a/vmnet-only/vnetInt.h ++++ b/vmnet-only/vnetInt.h +@@ -225,6 +225,13 @@ extern int VNetProc_Init(void); + + extern void VNetProc_Cleanup(void); + ++int VNetNetIf_Create(char *devName, VNetPort **ret, int hubNum); ++int VNetUserIf_Create(VNetPort **ret); ++int VNetBridge_Create(const char *devName, uint32 flags, VNetJack *hubJack, ++ VNetPort **ret); ++int VNetUserListener_Create(uint32 classMask, VNetJack *hubJack, ++ VNetPort **port); ++ + + /* + *---------------------------------------------------------------------- |