Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel 6.9-rc1 vmnet compile fails #239

Open
rgadsdon opened this issue Mar 25, 2024 · 36 comments
Open

Kernel 6.9-rc1 vmnet compile fails #239

rgadsdon opened this issue Mar 25, 2024 · 36 comments

Comments

@rgadsdon
Copy link

vmmon compiles OK, but vmnet:

..................
  CC [M]  /tmp/modconfig-a8Fcf5/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-a8Fcf5/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-a8Fcf5/vmnet-only/vnetUserListener.o
In file included from ./include/linux/spinlock.h:305,
                 from ./include/linux/sched.h:2138,
                 from /tmp/modconfig-a8Fcf5/vmnet-only/bridge.c:25:
/tmp/modconfig-a8Fcf5/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
/tmp/modconfig-a8Fcf5/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’?
   44 | #define dev_lock_list()    read_lock(&dev_base_lock)
      |                                       ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
   56 | #define read_lock(lock)         _raw_read_lock(lock)
      |                                                ^~~~
/tmp/modconfig-a8Fcf5/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’
  587 |    dev_lock_list();
      |    ^~~~~~~~~~~~~
/tmp/modconfig-a8Fcf5/vmnet-only/vmnetInt.h:44:39: note: each undeclared identifier is reported only once for each function it appears in
   44 | #define dev_lock_list()    read_lock(&dev_base_lock)
      |                                       ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
   56 | #define read_lock(lock)         _raw_read_lock(lock)
      |                                                ^~~~
/tmp/modconfig-a8Fcf5/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’
  587 |    dev_lock_list();
      |    ^~~~~~~~~~~~~
/tmp/modconfig-a8Fcf5/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/modconfig-a8Fcf5/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’?
   44 | #define dev_lock_list()    read_lock(&dev_base_lock)
      |                                       ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
   56 | #define read_lock(lock)         _raw_read_lock(lock)
      |                                                ^~~~
/tmp/modconfig-a8Fcf5/vmnet-only/bridge.c:902:4: note: in expansion of macro ‘dev_lock_list’
  902 |    dev_lock_list();
      |    ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-a8Fcf5/vmnet-only/bridge.o] Error 1
make[2]: *** [/usr/src/linux-6.9-rc1/Makefile:1919: /tmp/modconfig-a8Fcf5/vmnet-only] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-6.9-rc1'
make: *** [Makefile:117: vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-a8Fcf5/vmnet-only'
Unable to install all modules.  See log for details.
@munix9
Copy link

munix9 commented Mar 25, 2024

Maybe the following will help (untested):

--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -41,8 +41,13 @@
     compat_skb_set_network_header(skb, sizeof (struct ethhdr)),  \
     dev_queue_xmit(skb)                                   \
   )
-#define dev_lock_list()    read_lock(&dev_base_lock)
-#define dev_unlock_list()  read_unlock(&dev_base_lock)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
+#   define dev_lock_list()    rcu_read_lock()
+#   define dev_unlock_list()  rcu_read_unlock()
+#else
+#   define dev_lock_list()    read_lock(&dev_base_lock)
+#   define dev_unlock_list()  read_unlock(&dev_base_lock)
+#endif
 
 
 extern struct proto vmnet_proto;

@mkubecek
Copy link
Owner

I'm aware if this build failure but unfortunatley I haven't found time to look into it yet. I'll have to check what exactly does the code need to take dev_base_lock and what would be the right synchronization to use on new kernels instead.

@rgadsdon
Copy link
Author

Maybe the following will help (untested):

--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -41,8 +41,13 @@
     compat_skb_set_network_header(skb, sizeof (struct ethhdr)),  \
     dev_queue_xmit(skb)                                   \
   )
-#define dev_lock_list()    read_lock(&dev_base_lock)
-#define dev_unlock_list()  read_unlock(&dev_base_lock)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
+#   define dev_lock_list()    rcu_read_lock()
+#   define dev_unlock_list()  rcu_read_unlock()
+#else
+#   define dev_lock_list()    read_lock(&dev_base_lock)
+#   define dev_unlock_list()  read_unlock(&dev_base_lock)
+#endif
 
 
 extern struct proto vmnet_proto;

Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..

@BLKingLLC
Copy link

@rgadsdon Maybe I'm too much of a n00b, but where did you apply this?

@cieska
Copy link

cieska commented Apr 6, 2024

@rgadsdon Maybe I'm too much of a n00b, but where did you apply this?

Have you been able to figure out where to apply this change? Thanks.
I'm on 6.8.4-200.fc39.x86_64 hopefully it will work.

@cieska
Copy link

cieska commented Apr 6, 2024

If I understand correctly, The /vmnet-only/vmnetInt.h file must be edited and some lines commented out but the problem is that in vmware-host-modules-w17.5.1/vmnet-only/vmnetInt.h there aren't such lines, which makes it impossible to follow the tasks.

So in my case

$ vmware --version
VMware Workstation 17.5.1 build-23298084
$ uname -r
6.8.4-200.fc39.x86_64

I end up with a bunch of problems:


$ sudo vmware-modconfig --console --install-all
[AppLoader] GLib does not have GSettings support.
Stopping vmware (via systemctl):                           [  OK  ]
make: Entering directory '/tmp/modconfig-1WC30M/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.8.4-200.fc39.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-1WC30M/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-1WC30M/vmmon-only/common/task.c:548:1: warning: no previous prototype for ‘TaskGetFlatWriteableDataSegment’ [-Wmissing-prototypes]
  548 | TaskGetFlatWriteableDataSegment(void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Werror=implicit-function-declaration]
   12 |                 return random_get_entropy_fallback();
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        random_get_entropy
/tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c: At top level:
/tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
  700 | Vmx86FreeVMDriver(VMDriver *vm)
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
  733 | Vmx86AllocVMDriver(uint32 numVCPUs)
      | ^~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/driver.c:271:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  271 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/driver.c:339:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  339 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/hostif.c:2926:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
 2926 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
      | ^~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/hostif.c:3046:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
 3046 | HostIFWritePhysicalWork(MA ma,             // MA to be written to
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/hostif.c:3205:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
 3205 | HostIFStartTimer(Bool rateChanged,  //IN: Did rate change?
      | ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /tmp/modconfig-1WC30M/vmmon-only/common/vmx86.o] Error 1
make[2]: *** [/usr/src/kernels/6.8.4-200.fc39.x86_64/Makefile:1939: /tmp/modconfig-1WC30M/vmmon-only] Error 2
make[1]: *** [Makefile:252: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-1WC30M/vmmon-only'
make: Entering directory '/tmp/modconfig-1WC30M/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.8.4-200.fc39.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/vnetUserListener.o
/tmp/modconfig-1WC30M/vmnet-only/userif.c:1091:1: warning: no previous prototype for ‘VNetUserIf_Create’ [-Wmissing-prototypes]
 1091 | VNetUserIf_Create(VNetPort **ret) // OUT
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/netif.c:173:1: warning: no previous prototype for ‘VNetNetIf_Create’ [-Wmissing-prototypes]
  173 | VNetNetIf_Create(char *devName,  // IN:
      | ^~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/vnetUserListener.c:87:1: warning: no previous prototype for ‘VNetUserListener_Create’ [-Wmissing-prototypes]
   87 | VNetUserListener_Create(uint32 classMask,  // IN: the listener's class mask
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/bridge.c:258:1: warning: no previous prototype for ‘VNetBridge_Create’ [-Wmissing-prototypes]
  258 | VNetBridge_Create(const char *devName, // IN:  name of device (e.g., "eth0")
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/bridge.c:1411:1: warning: no previous prototype for ‘VNetBridgeSendLargePacket’ [-Wmissing-prototypes]
 1411 | VNetBridgeSendLargePacket(struct sk_buff *skb,        // IN: packet to split
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
  LD [M]  /tmp/modconfig-1WC30M/vmnet-only/vmnet.o
/tmp/modconfig-1WC30M/vmnet-only/vmnet.o: warning: objtool: VNetCsumAndCopyToUser+0x28: call to csum_partial_copy_nocheck() with UACCESS enabled
/tmp/modconfig-1WC30M/vmnet-only/vmnet.o: warning: objtool: init_module(): not an indirect call target
/tmp/modconfig-1WC30M/vmnet-only/vmnet.o: warning: objtool: cleanup_module(): not an indirect call target
  MODPOST /tmp/modconfig-1WC30M/vmnet-only/Module.symvers
  CC [M]  /tmp/modconfig-1WC30M/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/modconfig-1WC30M/vmnet-only/vmnet.ko
  BTF [M] /tmp/modconfig-1WC30M/vmnet-only/vmnet.ko
Skipping BTF generation for /tmp/modconfig-1WC30M/vmnet-only/vmnet.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-1WC30M/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-1WC30M/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory '/tmp/modconfig-1WC30M/vmnet-only'
Unable to install all modules.  See log for details.

@raintonr
Copy link

Maybe the following will help (untested)...

I applied the patch mentioned in #239 (comment) but sadly with no luck :(

vmware-host-modules-w17.5.1 with kernel 6.8.7-300 (FC40).

Am seeing a few warnings and then failure with this error:

  CC [M]  /tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.o
In file included from /tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Wimplicit-function-declaration]
   12 |                 return random_get_entropy_fallback();
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        random_get_entropy
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c: At top level:
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
  700 | Vmx86FreeVMDriver(VMDriver *vm)
      | ^~~~~~~~~~~~~~~~~
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
  733 | Vmx86AllocVMDriver(uint32 numVCPUs)
      | ^~~~~~~~~~~~~~~~~~

@ppinter1
Copy link

ppinter1 commented Apr 30, 2024

Salut,

I had the same issue and fixed it by changing the line in error (vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52) from #include <asm/timex.h> to #include <linux/timex.h>

@raintonr
Copy link

raintonr commented May 1, 2024

I had the same issue and fixed it by changing the line in error (vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52) from #include <asm/timex.h> to #include <linux/timex.h>

Yes - that did the trick - thank you!

@sincorchetes
Copy link

sincorchetes commented May 1, 2024

Salut,

I had the same issue and fixed it by changing the line in error (vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52) from #include <asm/timex.h> to #include <linux/timex.h>

I made it, vmmon is fully loaded and working as expected, however, vmnet is loaded but It's not working very well:

This is the output of vmware.service:

sudo systemctl status vmware
× vmware.service - VMware host virtualization and network services for Workstation
     Loaded: loaded (/usr/lib/systemd/system/vmware.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2024-05-01 15:50:28 CEST; 3min 30s ago
    Process: 699 ExecStart=/usr/lib/vmware/scripts/init/vmware start (code=exited, status=1/FAILURE)

May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: Starting vmware.service...
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: Starting VMware services:
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]:    Virtual machine monitor - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]:    Virtual machine communication interface - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]:    VM communication interface socket family - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]:    Virtual ethernet - failed
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]:    VMware Authentication Daemon - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: vmware.service: Control process exited, code=exited, status=1/FAILURE
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: vmware.service: Failed with result 'exit-code'.
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: Failed to start vmware.service.

When I try to load vmnet module I get this:

sudo modprobe -v vmnet
insmod /lib/modules/6.8.8-1430.native/misc/vmnet.ko 

It keeps trying to load the module kernel but no expires.

It's freaky, because the module seems loaded:

sincorchetes@clr-eac58264a0b9417dba05ef16f70616bb~ $ modinfo vmnet
filename:       /lib/modules/6.8.8-1430.native/misc/vmnet.ko
supported:      external
license:        GPL v2
description:    VMware Virtual Networking Driver.
author:         VMware, Inc.
depends:        
retpoline:      Y
name:           vmnet
vermagic:       6.8.8-1430.native SMP mod_unload 
parm:           vnet_max_qlen:Maximum queue length of the vmnet, default is 1024, maximum is 1024 (unit)
sincorchetes@clr-eac58264a0b9417dba05ef16f70616bb~ $ lsmod |grep vmnet
vmnet                  73728  1

It's ClearLinux 6.8.8-1430.native kernel with VMware workstation 17.5.1

@raintonr
Copy link

raintonr commented May 1, 2024

Yeah, while the compile works, and my VM seems to run ok, there's a pile of errors in syslog. The module seems to break the host system as it refuses to shutdown cleanly after modules are loaded ☹️

@sincorchetes
Copy link

dmesg output

[    6.147064] initcall parport_pc_init+0x0/0xfc0 [parport_pc] returned 0 after 1005 usecs
[    6.148396] calling  ppdev_init+0x0/0xfc0 [ppdev] @ 586
[    6.148756] calling  init_module+0x0/0x140 [vmnet] @ 760
[    6.148766] Missing ENDBR: init_module+0x0/0x140 [vmnet]
[    6.148929] ppdev: user-space parallel port driver
[    6.149064] ------------[ cut here ]------------
[    6.149079] kernel BUG at arch/x86/kernel/cet.c:102!
[    6.149079] initcall ppdev_init+0x0/0xfc0 [ppdev] returned 0 after 313 usecs
[    6.149341] invalid opcode: 0000 [#1] SMP NOPTI
[    6.149634] CPU: 4 PID: 760 Comm: modprobe Tainted: G           OE      6.8.8-1430.native #1
[    6.150084] Hardware name: HP HP ProBook 440 G8 Notebook PC/8A74, BIOS T87 Ver. 01.09.01 05/05/2022
[    6.150569] RIP: 0010:exc_control_protection+0x2ed/0x300
[    6.150865] Code: 00 01 48 c7 c2 60 25 02 9e 81 e6 ff 7f 00 00 83 fe 05 0f 87 05 ff ff ff e9 f4 fe ff ff 48 c7 43 50 00 00 00 00 e9 30 fe ff ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 90 90 90
[    6.151867] RSP: 0018:ffffac9e81eb3b00 EFLAGS: 00010002
[    6.152157] RAX: 000000000000002c RBX: ffffac9e81eb3b38 RCX: 0000000000000000
[    6.152549] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[    6.152940] RBP: ffffac9e81eb3b28 R08: 0000000000000000 R09: 0000000000000000
[    6.153331] R10: 42444e4520676e69 R11: 0000000000000000 R12: 0000000000000000
[    6.153722] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
[    6.154115] FS:  000055fc4dd8b740(0000) GS:ffff88eb9f900000(0000) knlGS:0000000000000000
[    6.154556] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.154875] CR2: 000055fc4dd8a21a CR3: 0000000108f12005 CR4: 0000000000f70ef0
[    6.155268] PKRU: 55555554
[    6.155424] Call Trace:
[    6.155572]  <TASK>
[    6.155700]  ? die+0x14c/0x180
[    6.155879]  ? exc_control_protection+0x2ed/0x300
[    6.156144]  ? exc_invalid_op+0xfe/0x1c0
[    6.156368]  ? asm_exc_invalid_op+0x1f/0x40
[    6.156605]  ? exc_control_protection+0x2ed/0x300
[    6.156869]  asm_exc_control_protection+0x2b/0x40
[    6.157134] RIP: 0010:init_module+0x0/0x140 [vmnet]
[    6.157411] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <66> 0f 1f 00 55 48 89 e5 53 e8 32 66 00 00 85 c0 0f 85 10 01 00 00
[    6.158415] RSP: 0018:ffffac9e81eb3be0 EFLAGS: 00010246
[    6.158708] RAX: 0000000000000000 RBX: ffffffffc130a300 RCX: 0000000000000000
[    6.159102] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[    6.159494] RBP: ffffac9e81eb3c48 R08: 0000000000000000 R09: 0000000000000000
[    6.159887] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[    6.160277] R13: 0000000000000000 R14: ffffffffc1316640 R15: 0000000000000000
[    6.160673]  ? __pfx_init_module+0x40/0x40 [vmnet]
[    6.160944]  ? do_one_initcall+0x44/0x300
[    6.161168]  ? kmalloc_trace+0x1c5/0x3c0
[    6.161388]  do_init_module+0x63/0x240
[    6.161602]  load_module+0x11e2/0x1300
[    6.161815]  init_module_from_file+0x82/0xc0
[    6.162051]  ? init_module_from_file+0x82/0xc0
[    6.162297]  idempotent_init_module+0xf8/0x200
[    6.162542]  __x64_sys_finit_module+0x5d/0xc0
[    6.162789]  x64_sys_call+0x206e/0x22c0
[    6.163001]  do_syscall_64+0x61/0x1c0
[    6.163205]  entry_SYSCALL_64_after_hwframe+0x60/0x68
[    6.163484] RIP: 0033:0x55fc4db209d9
[    6.163687] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 0f e4 0d 00 f7 d8 64 89 01 48
[    6.164677] RSP: 002b:00007fff56008ac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[    6.165086] RAX: ffffffffffffffda RBX: 000055fc4fc10cd0 RCX: 000055fc4db209d9
[    6.165470] RDX: 0000000000000000 RSI: 000055fc4ddef6e7 RDI: 0000000000000003
[    6.165854] RBP: 0000000000000000 R08: 000055fc4dbffb20 R09: ffffffffffffff90
[    6.166238] R10: 0000000000000040 R11: 0000000000000246 R12: 0000000000040000
[    6.166624] R13: 000055fc4ddef6e7 R14: 000055fc4fc10c70 R15: 0000000000000000
[    6.167012]  </TASK>
[    6.167140] Modules linked in: vmnet(OE+) ppdev parport_pc snd_soc_dmic parport vmw_vsock_vmci_transport vsock snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel vmw_vmci snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core joydev snd_soc_acpi_intel_match snd_soc_acpi vmmon(OE) soundwire_generic_allocation snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine soundwire_bus hid_multitouch snd_hda_intel snd_intel_dspcfg uvcvideo snd_intel_sdw_acpi uvc snd_hda_codec hp_wmi rtw88_8822ce(+) videobuf2_vmalloc crct10dif_pclmul ee1004 mei_pxp mei_hdcp crc32_pclmul rtw88_8822c videobuf2_memops platform_profile polyval_clmulni snd_hda_core btusb btrtl rtw88_pci xe videobuf2_v4l2 polyval_generic ghash_clmulni_intel btintel snd_hwdep rtw88_core processor_thermal_device_pci_legacy btbcm snd_pcm processor_thermal_device btmtk processor_thermal_wt_hint bluetooth mac80211 videodev snd_timer processor_thermal_rfim r8169 efi_pstore
[    6.167188]  ucsi_acpi processor_thermal_rapl i2c_i801 typec_ucsi drm_gpuvm snd intel_lpss_pci drm_exec realtek videobuf2_common processor_thermal_wt_req ecdh_generic wmi_bmof mc ecc cfg80211 processor_thermal_power_floor i2c_smbus soundcore intel_lpss mei_me gpu_sched typec processor_thermal_mbox mdio_devres rfkill libphy mei idma64 drm_suballoc_helper intel_soc_dts_iosf roles battery i2c_hid_acpi thermal i2c_hid intel_pmc_core int3403_thermal pmt_telemetry int340x_thermal_zone pmt_class intel_vsec int3400_thermal acpi_thermal_rel pinctrl_tigerlake intel_hid wireless_hotkey ac serio_raw atkbd libps2 i8042
[    6.174788] ---[ end trace 0000000000000000 ]---
[    6.176879] RIP: 0010:exc_control_protection+0x2ed/0x300
[    6.179011] Code: 00 01 48 c7 c2 60 25 02 9e 81 e6 ff 7f 00 00 83 fe 05 0f 87 05 ff ff ff e9 f4 fe ff ff 48 c7 43 50 00 00 00 00 e9 30 fe ff ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 90 90 90
[    6.181841] RSP: 0018:ffffac9e81eb3b00 EFLAGS: 00010002
[    6.184025] RAX: 000000000000002c RBX: ffffac9e81eb3b38 RCX: 0000000000000000
[    6.186277] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[    6.188502] RBP: ffffac9e81eb3b28 R08: 0000000000000000 R09: 0000000000000000
[    6.190730] R10: 42444e4520676e69 R11: 0000000000000000 R12: 0000000000000000
[    6.192967] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
[    6.195180] FS:  000055fc4dd8b740(0000) GS:ffff88eb9f900000(0000) knlGS:0000000000000000
[    6.197424] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.199506] CR2: 000055fc4dd8a21a CR3: 0000000108f12005 CR4: 0000000000f70ef0
[    6.201644] PKRU: 55555554
[    6.203629] note: modprobe[760] exited with irqs disabled

@Hyphaed
Copy link

Hyphaed commented May 11, 2024

same on 6.9rc7, asm/timex.h to linux/timex.h seems haven't done the trick

I see now the line 52 comes already modified

#247

@Hyphaed
Copy link

Hyphaed commented May 13, 2024

any news? this is my output on this morning compilation:

(base) ferran@z590i:~/Documents/PersonalPackages$ cd vmware-host-modules/ (base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ git checkout workstation-17.5.1 branch 'workstation-17.5.1' set up to track 'origin/workstation-17.5.1'. Switched to a new branch 'workstation-17.5.1' (base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ make make -C vmmon-only make -C vmnet-only make[1]: Entering directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only' make[1]: Entering directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only' Using kernel build system. Using kernel build system. make -C /lib/modules/6.9.0-tkg-custom/build/include/.. M=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[2]: Entering directory '/usr/src/linux-headers-6.9.0-tkg-custom' make -C /lib/modules/6.9.0-tkg-custom/build/include/.. M=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[2]: Entering directory '/usr/src/linux-headers-6.9.0-tkg-custom' CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/linux/driver.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/linux/driverLog.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/linux/hostif.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/apic.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/comport.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/cpuid.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/crosspage.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/memtrack.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/moduleloop.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/phystrack.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/sharedAreaVmmon.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/statVarsVmmon.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/driver.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/hub.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/task.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/vmx86.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/bootstrap.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/monLoader.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/userif.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/monLoaderVmmon.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/vmmblob.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/netif.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/procfs.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/smac_compat.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/smac.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vnetEvent.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vnetUserListener.o LD [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/vmmon.o MODPOST /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/Module.symvers CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/vmmon.mod.o In file included from ./include/linux/spinlock.h:305, from ./include/linux/sched.h:2138, from /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:25: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’? 44 | #define dev_lock_list() read_lock(&dev_base_lock) | ^~~~~~~~~~~~~ ./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’ 56 | #define read_lock(lock) _raw_read_lock(lock) | ^~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’ 587 | dev_lock_list(); | ^~~~~~~~~~~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vmnetInt.h:44:39: note: each undeclared identifier is reported only once for each function it appears in 44 | #define dev_lock_list() read_lock(&dev_base_lock) | ^~~~~~~~~~~~~ ./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’ 56 | #define read_lock(lock) _raw_read_lock(lock) | ^~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’ 587 | dev_lock_list(); | ^~~~~~~~~~~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c: In function ‘VNetBridgeUp’: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’? 44 | #define dev_lock_list() read_lock(&dev_base_lock) | ^~~~~~~~~~~~~ ./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’ 56 | #define read_lock(lock) _raw_read_lock(lock) | ^~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:902:4: note: in expansion of macro ‘dev_lock_list’ 902 | dev_lock_list(); | ^~~~~~~~~~~~~ make[4]: *** [scripts/Makefile.build:244: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/usr/src/linux-headers-6.9.0-tkg-custom/Makefile:1922: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only] Error 2 make[2]: *** [Makefile:240: __sub-make] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-6.9.0-tkg-custom' make[1]: *** [Makefile:117: vmnet.ko] Error 2 make[1]: Leaving directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only' make: *** [Makefile:21: vmnet-only] Error 2 make: *** Waiting for unfinished jobs.... LD [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/vmmon.ko make[2]: Leaving directory '/usr/src/linux-headers-6.9.0-tkg-custom' make -C $PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= postbuild make[2]: Entering directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only' make[2]: 'postbuild' is up to date. make[2]: Leaving directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only' cp -f vmmon.ko ./../vmmon.o make[1]: Leaving directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only'

@mkubecek
Copy link
Owner

I'm sorry, I was quite busy last few weeks. I hope to get to fixing this within next few days.

@LightJack05
Copy link

I'm sorry, I was quite busy last few weeks. I hope to get to fixing this within next few days.

Thanks, looking forward to a fix.
Heads up that the kernel version 6.9.1-arch1-1 is now in stable under arch, so you may see a couple more people showing up with this.

@LightJack05
Copy link

Maybe the following will help (untested):

--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -41,8 +41,13 @@
     compat_skb_set_network_header(skb, sizeof (struct ethhdr)),  \
     dev_queue_xmit(skb)                                   \
   )
-#define dev_lock_list()    read_lock(&dev_base_lock)
-#define dev_unlock_list()  read_unlock(&dev_base_lock)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
+#   define dev_lock_list()    rcu_read_lock()
+#   define dev_unlock_list()  rcu_read_unlock()
+#else
+#   define dev_lock_list()    read_lock(&dev_base_lock)
+#   define dev_unlock_list()  read_unlock(&dev_base_lock)
+#endif
 
 
 extern struct proto vmnet_proto;

That worked as far as I can tell, nothing complaining in dmesg, and vmware seems to be working.

@gianter962
Copy link

@rgadsdon perfect thank you a lot

Maybe the following will help (untested):

--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -41,8 +41,13 @@
     compat_skb_set_network_header(skb, sizeof (struct ethhdr)),  \
     dev_queue_xmit(skb)                                   \
   )
-#define dev_lock_list()    read_lock(&dev_base_lock)
-#define dev_unlock_list()  read_unlock(&dev_base_lock)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
+#   define dev_lock_list()    rcu_read_lock()
+#   define dev_unlock_list()  rcu_read_unlock()
+#else
+#   define dev_lock_list()    read_lock(&dev_base_lock)
+#   define dev_unlock_list()  read_unlock(&dev_base_lock)
+#endif
 
 
 extern struct proto vmnet_proto;

Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..

@Hyphaed
Copy link

Hyphaed commented May 18, 2024

it works @LightJack05 :: thanks

tried on Kernel 6.9 :: I'm gonna compile 6.9.1

@Cris70
Copy link

Cris70 commented May 22, 2024

nan0desu's patch works for me (VMware Workstation Pro 17.5.2 and kernel 6.9.1-1 on openSUSE Tumbleweed)
Thank you!!

@K3lvinRob3rt
Copy link

Please, I need help on this

:~ $ uname -a
Linux archlinux 6.9.1-arch1-1 #1 

vmware version is 17.5.2
$ sudo vmware-modconfig --console --install-all

[AppLoader] GLib does not have GSettings support.
make: Entering directory '/tmp/modconfig-2R4V5P/vmmon-only'
Using kernel build system.
/sbin/make -C /lib/modules/6.9.1-arch1-1/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/lib/modules/6.9.1-arch1-1/build'
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/vmmblob.o
In file included from /tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Wimplicit-function-declaration]
   12 |                 return random_get_entropy_fallback();
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                        random_get_entropy
/tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c: At top level:
/tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
  700 | Vmx86FreeVMDriver(VMDriver *vm)
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
  733 | Vmx86AllocVMDriver(uint32 numVCPUs)
      | ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/tmp/modconfig-2R4V5P/vmmon-only/common/task.c:548:1: warning: no previous prototype for ‘TaskGetFlatWriteableDataSegment’ [-Wmissing-prototypes]
  548 | TaskGetFlatWriteableDataSegment(void)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:76:
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h: In function ‘PgtblVa2MPNLocked’:
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:60:8: error: implicit declaration of function ‘pgd_large’; did you mean ‘pgd_page’? [-Wimplicit-function-declaration]
   60 |    if (pgd_large(*pgd)) {
      |        ^~~~~~~~~
      |        pgd_page
In file included from /tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:25:
/tmp/modconfig-2R4V5P/vmmon-only/./include/compat_pgtable.h:39:45: error: implicit declaration of function ‘p4d_large’; did you mean ‘p4d_page’? [-Wimplicit-function-declaration]
   39 | #   define compat_p4d_large(p4d)            p4d_large(p4d)
      |                                             ^~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:70:8: note: in expansion of macro ‘compat_p4d_large’
   70 |    if (compat_p4d_large(*p4d)) {
      |        ^~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:78:11: error: implicit declaration of function ‘pud_large’; did you mean ‘pud_page’? [-Wimplicit-function-declaration]
   78 |       if (pud_large(*pud)) {
      |           ^~~~~~~~~
      |           pud_page
/tmp/modconfig-2R4V5P/vmmon-only/linux/driver.c:271:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  271 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:86:14: error: implicit declaration of function ‘pmd_large’; did you mean ‘pmd_page’? [-Wimplicit-function-declaration]
   86 |          if (pmd_large(*pmd)) {
      |              ^~~~~~~~~
      |              pmd_page
/tmp/modconfig-2R4V5P/vmmon-only/linux/driver.c:339:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  339 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c: At top level:
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:2926:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
 2926 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
      | ^~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:3046:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
 3046 | HostIFWritePhysicalWork(MA ma,             // MA to be written to
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:3205:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
 3205 | HostIFStartTimer(Bool rateChanged,  //IN: Did rate change?
      | ^~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.o] Error 1
make[2]: *** [/usr/lib/modules/6.9.1-arch1-1/build/Makefile:1919: /tmp/modconfig-2R4V5P/vmmon-only] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.9.1-arch1-1/build'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-2R4V5P/vmmon-only'
make: Entering directory '/tmp/modconfig-2R4V5P/vmnet-only'
Using kernel build system.
/sbin/make -C /lib/modules/6.9.1-arch1-1/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/lib/modules/6.9.1-arch1-1/build'
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-2R4V5P/vmnet-only/vnetUserListener.o
/tmp/modconfig-2R4V5P/vmnet-only/userif.c:1091:1: warning: no previous prototype for ‘VNetUserIf_Create’ [-Wmissing-prototypes]
 1091 | VNetUserIf_Create(VNetPort **ret) // OUT
      | ^~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/netif.c:173:1: warning: no previous prototype for ‘VNetNetIf_Create’ [-Wmissing-prototypes]
  173 | VNetNetIf_Create(char *devName,  // IN:
      | ^~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/vnetUserListener.c:87:1: warning: no previous prototype for ‘VNetUserListener_Create’ [-Wmissing-prototypes]
   87 | VNetUserListener_Create(uint32 classMask,  // IN: the listener's class mask
      | ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:258:1: warning: no previous prototype for ‘VNetBridge_Create’ [-Wmissing-prototypes]
  258 | VNetBridge_Create(const char *devName, // IN:  name of device (e.g., "eth0")
      | ^~~~~~~~~~~~~~~~~
In file included from ./include/linux/spinlock.h:305,
                 from ./include/linux/sched.h:2138,
                 from /tmp/modconfig-2R4V5P/vmnet-only/bridge.c:25:
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
/tmp/modconfig-2R4V5P/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’?
   44 | #define dev_lock_list()    read_lock(&dev_base_lock)
      |                                       ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
   56 | #define read_lock(lock)         _raw_read_lock(lock)
      |                                                ^~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’
  587 |    dev_lock_list();
      |    ^~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/vmnetInt.h:44:39: note: each undeclared identifier is reported only once for each function it appears in
   44 | #define dev_lock_list()    read_lock(&dev_base_lock)
      |                                       ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
   56 | #define read_lock(lock)         _raw_read_lock(lock)
      |                                                ^~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’
  587 |    dev_lock_list();
      |    ^~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/modconfig-2R4V5P/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’?
   44 | #define dev_lock_list()    read_lock(&dev_base_lock)
      |                                       ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
   56 | #define read_lock(lock)         _raw_read_lock(lock)
      |                                                ^~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:900:4: note: in expansion of macro ‘dev_lock_list’
  900 |    dev_lock_list();
      |    ^~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c: At top level:
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:1411:1: warning: no previous prototype for ‘VNetBridgeSendLargePacket’ [-Wmissing-prototypes]
 1411 | VNetBridgeSendLargePacket(struct sk_buff *skb,        // IN: packet to split
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-2R4V5P/vmnet-only/bridge.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/lib/modules/6.9.1-arch1-1/build/Makefile:1919: /tmp/modconfig-2R4V5P/vmnet-only] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.9.1-arch1-1/build'
make: *** [Makefile:117: vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-2R4V5P/vmnet-only'
Unable to install all modules.  See log for details.

@Cris70
Copy link

Cris70 commented May 22, 2024

Please, I need help on this
(...)

$ sudo vmware-modconfig --console --install-all

There's no point in using vmware-modconfig, it will not work.
Just clone nan0desu's repo (git clone https://github.com/nan0desu/vmware-host-modules.git), then switch to the appropriate branch (git checkout tmp/workstation-17.5.2-k6.9.1), then use make and if compilation finishes ok sudo make install.
Then load the new kernel modules with sudo modprobe vmmon vmnet and you're done.

@K3lvinRob3rt
Copy link

nan0desu's patch works for me (VMware Workstation Pro 17.5.2 and kernel 6.9.1-1 on openSUSE Tumbleweed) Thank you!!

Hi @Cris70, please how did you apply the patch. I am having trouble getting mine to work and apply the patch.

@LightJack05
Copy link

Please, I need help on this
[...]

If you want to use vmware-modconfig, you have to use the second install method under point 0 (This is also what I do) to replace the original source files with the patched ones.

@K3lvinRob3rt
Copy link

Please, I need help on this
(...)

$ sudo vmware-modconfig --console --install-all

There's no point in using vmware-modconfig, it will not work. Just clone nan0desu's repo (git clone https://github.com/nan0desu/vmware-host-modules.git), then switch to the appropriate branch (git checkout tmp/workstation-17.5.2-k6.9.1), then use make and if compilation finishes ok sudo make install. Then load the new kernel modules with sudo modprobe vmmon vmnet and you're done.

Oh my, I feel like screaming @Cris70, it worked, thanks a lot. Do have and enjoy the rest of your day. God bless you.

@K3lvinRob3rt
Copy link

Hello everyone, is anyone having this issue. I am unable to launch virtual network editor on my vmware-workstation 17.5.2. When i click on Edit > vVirtual Network Editor, nothing happens.

@Cris70
Copy link

Cris70 commented May 22, 2024

Hello everyone, is anyone having this issue. I am unable to launch virtual network editor on my vmware-workstation 17.5.2. When i click on Edit > vVirtual Network Editor, nothing happens.

Same here, but you should open another report rather then hijacking this one.

@Hyphaed
Copy link

Hyphaed commented May 22, 2024

@K3lvinRob3rt same here also, no logs in console

@Cris70
Copy link

Cris70 commented May 23, 2024

nan0desu's patch works for me (VMware Workstation Pro 17.5.2 and kernel 6.9.1-1 on openSUSE Tumbleweed) Thank you!!

I confirm it is working. but I am experiencing high boot time and high shutdown time.
During shutdown I keep seeing messages like this:
INFO: task vmtoolsd:3127 blocked for more than 245 seconds.

See for example:
Screenshot_20240522_130218

I think it may be related to the patch.
Anyone else seeing this?

@ZombieLurker
Copy link

Please, I need help on this
(...)

$ sudo vmware-modconfig --console --install-all

There's no point in using vmware-modconfig, it will not work. Just clone nan0desu's repo (git clone https://github.com/nan0desu/vmware-host-modules.git), then switch to the appropriate branch (git checkout tmp/workstation-17.5.2-k6.9.1), then use make and if compilation finishes ok sudo make install. Then load the new kernel modules with sudo modprobe vmmon vmnet and you're done.

Worked perfect for 6.9.1-arch1-2

@gianter962
Copy link

Hi, try running Virtual Network Editor and you will see it is not working ... in my opinion the patch needed to compile modules under kernel 6.9 breaks something in the vmware workstation so Virtual Network Editor no longer works. The only way to recover it is downgrade to the kernel 6.8.9

@0x2E16CF0F
Copy link

Maybe the following will help (untested):

--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -41,8 +41,13 @@
     compat_skb_set_network_header(skb, sizeof (struct ethhdr)),  \
     dev_queue_xmit(skb)                                   \
   )
-#define dev_lock_list()    read_lock(&dev_base_lock)
-#define dev_unlock_list()  read_unlock(&dev_base_lock)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
+#   define dev_lock_list()    rcu_read_lock()
+#   define dev_unlock_list()  rcu_read_unlock()
+#else
+#   define dev_lock_list()    read_lock(&dev_base_lock)
+#   define dev_unlock_list()  read_unlock(&dev_base_lock)
+#endif
 
 
 extern struct proto vmnet_proto;

Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..

This worked flawlessly on OpenSUSE Tumbleweed with:

  • 6.9.1-1-default
  • VMware Workstation 17.5.2 build-23775571

Using the branch tmp/workstation-17.5.0-k6.8

@mkubecek
Copy link
Owner

Thank you for all the "works for me" reports but the problem is that we are talking about synchronization primitives here. And as these guard the access to device list, collisions are expected to be quite rare under normal circumstances. Therefore even replacing thise lock/unlock calls with no-op (i.e. "do nothing) would almost certainly pass these simple tests that it builds and running a VM does not show any issue.

@kallisti5
Copy link

Here's the process for anyone lurking here who has to use VMWare :-)

cd /usr/lib/vmware/modules/source

#vmnet
tar xvf vmnet.tar
mv vmnet.tar vmnet.tar.old
cd vmnet-only
(apply changes in https://github.com/mkubecek/vmware-host-modules/pull/252)
cd ..
tar cvf vmnet.tar vmnet-only
rm -rf vmnet-only

# vmmon
tar xvf vmmon.tar
mv vmmon.tar vmmon.tar.old
cd vmmon-only
(apply changes in https://github.com/mkubecek/vmware-host-modules/pull/252)
cd ..
tar cvf vmmon.tar vmmon-only
rm -rf vmmon-only

# Rebuild host modules
/usr/bin/vmware-modconfig --console --install-all

Kinda sad in this day and age, VMWare can't keep up with Linux kernel development on a paid product.

@edrozenberg
Copy link

edrozenberg commented May 28, 2024

I used git clone -b tmp/workstation-17.5.2-k6.9.1 https://github.com/nan0desu/vmware-host-modules.git with the approach (2b) from https://raw.githubusercontent.com/nan0desu/vmware-host-modules/master/INSTALL to build the modules successfully on kernel 6.9.2 and all appears to work fine on my Slackware Linux -current (15.0+ aka 15.1 next).

@bz-coro
Copy link

bz-coro commented Jun 1, 2024

I am on Arch, 6.9.3-arch1-1, VMWare Workstation 15.5.7.
Proposed fix allows for compilation to succeed and it is even possible to load the module. But vmware-network service start hangs forever and running vmware-networks --start ends with "Failed to initialize".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests