mkubecek / vmware-host-modules

Patches needed to build VMware (Player and Workstation) host modules against recent kernels
GNU General Public License v2.0
2.27k stars 366 forks source link

vmnet build fails for CentOS stream kernel 5.14.0-437.el9.x86_64 in branch workstation-17.5.1 #241

Open dnadle opened 5 months ago

dnadle commented 5 months ago

I updated my system to kernel 5.14.0-437 and make fails with an error that seems to be a recurrence of a problem that has been fixed in the past:

make[2]: Entering directory '/usr/src/kernels/5.14.0-437.el9.x86_64' MODPOST /[redacted]/repos/vmware-host-modules/vmnet-only/Module.symvers ERROR: modpost: "csum_and_copy_to_user" [/[redacted]/repos/vmware-host-modules/vmnet-only/vmnet.ko] undefined!

I searched and saw results similar to this affecting Workstation 16.x but couldn't find a relevant patch or code edit that would help. Any tips would be appreciated.

iangosling89 commented 5 months ago

I've also seen this, on 5.14.0-435.el9 and the 17.5.0 branch. The root cause is that csum_and_copy_to_user has been removed from Module.symvers.

These Redhat kernels appear to contain a lot of backports from kernel 6. Hence to get the vmware_host_modules code to compile I've implemented a quick and dirty patch to replace or add to the "#if kernel >= 6.x" type of compilation conditions with something like "#if kernel == 5.14.0".

In this case a patch is needed to vmnet-only/userif.c.

dnadle commented 4 months ago

something like "#if kernel == 5.14.0".

This was still a problem after upgrading to kernel 5.14.0-444.el9.x86_64 so, similar to iangosling89, I edited vmnet-only/userif.c line 549:

#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) /* was (5, 19, 0) */