mkubecek / vmware-host-modules

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

Kernel 6.5 - implicit declaration of function ‘skb_gso_segment’ #216

Closed rvazarkar closed 1 year ago

rvazarkar commented 1 year ago

Workstation 17.0.2 image

Appears to be a duplicate of this issue: https://github.com/mkubecek/vmware-host-modules/issues/210 which was already fixed, however, I'm up to date completely with the tmp branch for Workstation 17.0.2 (checked out from scratch just to make sure)

~/vmware-host-modules$ git status
On branch tmp/workstation-17.0.2-k6.5
Your branch is up to date with 'origin/tmp/workstation-17.0.2-k6.5'.

nothing to commit, working tree clean
~/vmware-host-modules$ uname -r
6.5.0-1-amd64

Running make yields the following:

~/vmware-host-modules$ make
make -C vmmon-only 
make[1]: Entering directory '/home/redacted/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.5.0-1-amd64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.5.0-1-amd64'
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/linux/driver.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/linux/driverLog.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/linux/hostif.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/apic.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/comport.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/cpuid.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/crosspage.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/memtrack.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/moduleloop.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/phystrack.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/statVarsVmmon.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/task.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/common/vmx86.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/bootstrap/monLoader.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/bootstrap/vmmblob.o
  LD [M]  /home/redacted/vmware-host-modules/vmmon-only/vmmon.o
  MODPOST /home/redacted/vmware-host-modules/vmmon-only/Module.symvers
  CC [M]  /home/redacted/vmware-host-modules/vmmon-only/vmmon.mod.o
  LD [M]  /home/redacted/vmware-host-modules/vmmon-only/vmmon.ko
  BTF [M] /home/redacted/vmware-host-modules/vmmon-only/vmmon.ko
Skipping BTF generation for /home/redacted/vmware-host-modules/vmmon-only/vmmon.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.0-1-amd64'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/home/redacted/vmware-host-modules/vmmon-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/home/redacted/vmware-host-modules/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make[1]: Leaving directory '/home/redacted/vmware-host-modules/vmmon-only'
make -C vmnet-only 
make[1]: Entering directory '/home/redacted/vmware-host-modules/vmnet-only'
Using kernel build system.
make -C /lib/modules/6.5.0-1-amd64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.5.0-1-amd64'
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/driver.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/hub.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/userif.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/netif.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/bridge.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/procfs.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/smac_compat.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/smac.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/vnetEvent.o
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/vnetUserListener.o
  LD [M]  /home/redacted/vmware-host-modules/vmnet-only/vmnet.o
  MODPOST /home/redacted/vmware-host-modules/vmnet-only/Module.symvers
  CC [M]  /home/redacted/vmware-host-modules/vmnet-only/vmnet.mod.o
  LD [M]  /home/redacted/vmware-host-modules/vmnet-only/vmnet.ko
  BTF [M] /home/redacted/vmware-host-modules/vmnet-only/vmnet.ko
Skipping BTF generation for /home/redacted/vmware-host-modules/vmnet-only/vmnet.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.0-1-amd64'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/home/redacted/vmware-host-modules/vmnet-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/home/redacted/vmware-host-modules/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make[1]: Leaving directory '/home/redacted/vmware-host-modules/vmnet-only'

Running make install yields the following:

~/vmware-host-modules$ sudo make install
install -D -t /lib/modules/6.5.0-1-amd64/misc vmmon-only/vmmon.ko vmnet-only/vmnet.ko
strip --strip-debug /lib/modules/6.5.0-1-amd64/misc/vmmon.ko /lib/modules/6.5.0-1-amd64/misc/vmnet.ko
if test -z ""; then /sbin/depmod -a 6.5.0-1-amd64; fi

Running sudo vmware-modconfig --console --install-all yields the following:

[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
make: Entering directory '/tmp/modconfig-vbqpgD/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.5.0-1-amd64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-1-amd64'
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-vbqpgD/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-vbqpgD/vmmon-only/bootstrap/monLoader.c: In function ‘MonLoader_Process’:
/tmp/modconfig-vbqpgD/vmmon-only/bootstrap/monLoader.c:794:24: warning: the comparison will always evaluate as ‘false’ for the address of ‘entries’ will never be NULL [-Waddress]
  794 |    if (header->entries == 0 || header->count == 0) {
      |                        ^~
In file included from /tmp/modconfig-vbqpgD/vmmon-only/bootstrap/monLoader.c:57:
/tmp/modconfig-vbqpgD/vmmon-only/./include/monLoader.h:239:19: note: ‘entries’ declared here
  239 |    MonLoaderEntry entries[];
      |                   ^~~~~~~
In file included from /tmp/modconfig-vbqpgD/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-vbqpgD/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-vbqpgD/vmmon-only/common/moduleloop.c:33:
/tmp/modconfig-vbqpgD/vmmon-only/./include/vm_basic_defs.h:779: warning: "DO_ONCE" redefined
  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from /usr/src/linux-headers-6.5.0-1-common/include/linux/prandom.h:12,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/random.h:153,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/nodemask.h:97,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/sched.h:23,
                 from /tmp/modconfig-vbqpgD/vmmon-only/common/moduleloop.c:31:
/usr/src/linux-headers-6.5.0-1-common/include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /tmp/modconfig-vbqpgD/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-vbqpgD/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-vbqpgD/vmmon-only/common/vmx86.h:33,
                 from /tmp/modconfig-vbqpgD/vmmon-only/common/vmx86.c:38:
/tmp/modconfig-vbqpgD/vmmon-only/./include/vm_basic_defs.h:779: warning: "DO_ONCE" redefined
  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from /usr/src/linux-headers-6.5.0-1-common/include/linux/prandom.h:12,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/random.h:153,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/nodemask.h:97,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/sched.h:23,
                 from /tmp/modconfig-vbqpgD/vmmon-only/common/vmx86.c:31:
/usr/src/linux-headers-6.5.0-1-common/include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /tmp/modconfig-vbqpgD/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-vbqpgD/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-vbqpgD/vmmon-only/linux/hostif.c:58:
/tmp/modconfig-vbqpgD/vmmon-only/./include/vm_basic_defs.h:779: warning: "DO_ONCE" redefined
  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from /usr/src/linux-headers-6.5.0-1-common/include/linux/prandom.h:12,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/random.h:153,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/nodemask.h:97,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/sched.h:23,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/binfmts.h:5,
                 from /tmp/modconfig-vbqpgD/vmmon-only/linux/hostif.c:31:
/usr/src/linux-headers-6.5.0-1-common/include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /tmp/modconfig-vbqpgD/vmmon-only/./include/cpu_types.h:29,
                 from /tmp/modconfig-vbqpgD/vmmon-only/./include/modulecall.h:33,
                 from /tmp/modconfig-vbqpgD/vmmon-only/./common/vmx86.h:33,
                 from /tmp/modconfig-vbqpgD/vmmon-only/linux/driver.h:32,
                 from /tmp/modconfig-vbqpgD/vmmon-only/linux/driver.c:47:
/tmp/modconfig-vbqpgD/vmmon-only/./include/vm_basic_defs.h:779: warning: "DO_ONCE" redefined
  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from /usr/src/linux-headers-6.5.0-1-common/include/linux/prandom.h:12,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/random.h:153,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/nodemask.h:97,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/list_lru.h:12,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/fs.h:13,
                 from /usr/src/linux-headers-6.5.0-1-common/include/linux/highmem.h:5,
                 from /tmp/modconfig-vbqpgD/vmmon-only/linux/driver.c:25:
/usr/src/linux-headers-6.5.0-1-common/include/linux/once.h:46: note: this is the location of the previous definition
   46 | #define DO_ONCE(func, ...)                                                   \
      | 
  LD [M]  /tmp/modconfig-vbqpgD/vmmon-only/vmmon.o
/tmp/modconfig-vbqpgD/vmmon-only/vmmon.o: warning: objtool: CrossPage_CodePage+0x207: 'naked' return found in RETHUNK build
  MODPOST /tmp/modconfig-vbqpgD/vmmon-only/Module.symvers
ERROR: modpost: "__pte_offset_map" [/tmp/modconfig-vbqpgD/vmmon-only/vmmon.ko] undefined!
make[3]: *** [/usr/src/linux-headers-6.5.0-1-common/scripts/Makefile.modpost:144: /tmp/modconfig-vbqpgD/vmmon-only/Module.symvers] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-1-common/Makefile:2009: modpost] Error 2
make[1]: *** [/usr/src/linux-headers-6.5.0-1-common/Makefile:246: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-1-amd64'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-vbqpgD/vmmon-only'
make: Entering directory '/tmp/modconfig-vbqpgD/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.5.0-1-amd64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-1-amd64'
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-vbqpgD/vmnet-only/vnetUserListener.o
/tmp/modconfig-vbqpgD/vmnet-only/bridge.c: In function ‘VNetBridgeSendLargePacket’:
/tmp/modconfig-vbqpgD/vmnet-only/bridge.c:1413:11: error: implicit declaration of function ‘skb_gso_segment’; did you mean ‘tcp_gso_segment’? [-Werror=implicit-function-declaration]
 1413 |    segs = skb_gso_segment(skb, 0);
      |           ^~~~~~~~~~~~~~~
      |           tcp_gso_segment
/tmp/modconfig-vbqpgD/vmnet-only/bridge.c:1413:9: warning: assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1413 |    segs = skb_gso_segment(skb, 0);
      |         ^
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.5.0-1-common/scripts/Makefile.build:248: /tmp/modconfig-vbqpgD/vmnet-only/bridge.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-1-common/Makefile:2057: /tmp/modconfig-vbqpgD/vmnet-only] Error 2
make[1]: *** [/usr/src/linux-headers-6.5.0-1-common/Makefile:246: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-1-amd64'
make: *** [Makefile:117: vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-vbqpgD/vmnet-only'
Unable to install all modules.  See log for details.

Let me know if theres any other information I can add, and thanks a lot for your hard work

rakotomandimby commented 1 year ago

@rvazarkar ,

I also have the same error when runing sudo vmware-modconfig --console --install-all.

But runing make ; sudo make install against the tmp/workstation-17.0.2-k6.5 branch of this repo (then reboot in my case) is enough. You dont need to have success on running vmware-modconfig --console --install-all

mkubecek commented 1 year ago

If you want to use vmware-modconfig to build the modules, you have to replace the original tarballs with patched ones. Please read the documentation in INSTALL file and follow the instructions.