vmware-host-modules icon indicating copy to clipboard operation
vmware-host-modules copied to clipboard

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

Open dnadle opened this issue 10 months ago • 3 comments

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.

dnadle avatar Apr 18 '24 13:04 dnadle

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.

iangosling89 avatar Apr 19 '24 07:04 iangosling89

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) */

dnadle avatar May 06 '24 23:05 dnadle