-
Notifications
You must be signed in to change notification settings - Fork 428
modules: fix build with kernel >= 6.16.0 + Workstation 17.6.4 #320
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
base: workstation
Are you sure you want to change the base?
Conversation
|
Tested and functional on: Kernel: 6.16.7-200.fc42.x86_64 NAME="Fedora Linux" This fixed issues I had had with getting vmmon and vmnet to load after upgrading to this kernel. |
|
Compiling with a kernel earlier than 6.15.4 will fail. |
…ld for kernel earlier than 6.15.4
|
Good catch @tssj666 |
|
I compiled using Pop!_OS 24.04 LTS x86_64 with kernel ❯ uname -r
6.16.3-76061603-genericand I get this error: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK buildFull output: ❯ sudo make
[sudo] password for ccp:
make -C vmmon-only
make[1]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.16.3-76061603-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[3]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
You are using: gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
CC [M] common/crosspage.o
common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2Sadly, I don't know enough to propose a solution :(. |
Same here. Pop 24.04. |
Recent kernels built with CONFIG_RETHUNK enable objtool checks which forbid "naked" returns. vmmon's CrossPage_CodePage() ended with NOT_REACHED_MINIMAL() (i.e. __builtin_unreachable()), which caused: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build Fix by conditionally replacing the unreachable marker with an explicit "ret" instruction when CONFIG_RETHUNK is enabled. On kernels without CONFIG_RETHUNK, the existing logic is preserved. This allows vmmon to build cleanly on 6.1+ kernels with rethunk enabled while keeping the old behavior otherwise.
|
@ziprasidone146939277 & @cncastillo please can you try again ? I have updated the fork |
|
Ok, I tried the latest version: ❯ git pull
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 5 (delta 4), reused 5 (delta 4), pack-reused 0 (from 0)
Unpacking objects: 100% (5/5), 995 bytes | 331.00 KiB/s, done.
From github.com:aurelihein/vmware-host-modules
04c953e..abf2d45 workstation-17.6.4 -> origin/workstation-17.6.4
Updating 04c953e..abf2d45
Fast-forward
vmmon-only/common/crosspage.c | 9 +++++++++
1 file changed, 9 insertions(+)but I get the same error (after common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK buildFull output: ❯ sudo make
make -C vmmon-only
make[1]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.16.3-76061603-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[3]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
You are using: gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
CC [M] linux/driver.o
linux/driver.c:272:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
272 | LinuxDriverInit(void)
| ^~~~~~~~~~~~~~~
linux/driver.c:340:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
340 | LinuxDriverExit(void)
| ^~~~~~~~~~~~~~~
CC [M] linux/driverLog.o
CC [M] linux/hostif.o
linux/hostif.c:2930:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
2930 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
| ^~~~~~~~~~~~~~~~~~~~~
linux/hostif.c:3050:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
3050 | HostIFWritePhysicalWork(MA ma, // MA to be written to
| ^~~~~~~~~~~~~~~~~~~~~~~
linux/hostif.c:3209:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
3209 | HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
| ^~~~~~~~~~~~~~~~
CC [M] common/apic.o
CC [M] common/comport.o
CC [M] common/cpuid.o
CC [M] common/crosspage.o
common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2 |
Hello, now the error is: Thank You |
|
Kernel 6.17 is proving problematic. Any solutions or advice? sudo dkms add -m vmware-host-modules -v ${DKMS_VER} Building module(s)...(bad exit status: 2) Error! Bad return status for module build on kernel: 6.17.7-200.nobara.fc42.x86_64 (x86_64) Building module(s)...(bad exit status: 2) Error! Bad return status for module build on kernel: 6.17.7-200.nobara.fc42.x86_64 (x86_64) |
This a branch which fix build with kernel >= 6.16.0 + Workstation 17.6.4
Tested with
To test :
Thank you
Aurelien BOUIN