VMware – 12.5.2 Released – Still Broken With Kernel 4.9..

Just updated the test system to VMware Workstation Pro 12.5.2, and it still fails to compile with Kernel 4.9-rc5

I have – so far – been unable to find any other patches for this issue, but fortunately the nasty hack I documented in the article for 4.9-rc4 still works.. http://rglinuxtech.com/?p=1838

The release notes for 12.5.2 are here:  http://pubs.vmware.com/Release_Notes/en/workstation/12pro/workstation-1252-release-notes.html

Robert Gadsdon.   November 14, 2016.


Comments

VMware – 12.5.2 Released – Still Broken With Kernel 4.9.. — 30 Comments

  1. Steps:
    tar -xf /usr/lib/vmware/modules/source/vmmon.tar
    gedit vmmon-only/linux/hostif.c

    In vmmon-only/linux/hostif.c, around line 1162, change

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    #else
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
    numPages, 0, 0, ppages, NULL);
    #endif

    to

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);
    #else
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    #else
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
    numPages, 0, 0, ppages, NULL);
    #endif
    #endif

    sudo tar -cf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only/
    tar -xf /usr/lib/vmware/modules/source/vmnet.tar
    gedit vmnet-only/userif.c

    In vmnet-only/userif.c, around line 113, change

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
    #else
    retval = get_user_pages(current, current->mm, addr,
    1, 1, 0, &page, NULL);
    #endif

    to

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
    retval = get_user_pages(addr, 1, 0, &page, NULL);
    #else
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
    #else
    retval = get_user_pages(current, current->mm, addr,
    1, 1, 0, &page, NULL);
    #endif
    #endif

    sudo tar -cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only/

    Use at your own risk!

    Credit goes to http://rglinuxtech.com/?p=1838

  2. Good afternoon

    After applying the patch I got the following error:

    2017-01-21T18: 37: 14.499-02: 00 | Vthread-4 | I125: Building module with command “/ usr / bin / make -j8 -C / tmp / modconfig-eP6X4N / vmnet-only auto-build HEADER_DIR = / lib / modules / 4.9.0-1-amd64 / build / include CC = / Usr / bin / gcc IS_GCC_3 = no ”
    2017-01-21T18: 37: 14.501-02: 00 | Vthread-4 | W115: Failed to build vmnet. Failed to execute the build command.

    Do I have to install any dependency?

    My Kernel

    Linux 4.9.0-1-amd64

    My compiler

    Gcc (Debian 6.3.0-3) 6.3.0 20170118
    Copyright (C) 2016 Free Software Foundation, Inc.

    My linuxs readers

    Linux-headers-4.9.0-1-amd64 is already the new version (4.9.2-2).
    Linux-headers-4.9.0-1-amd64 configured to install manually.

    Anyone have any idea what that might be?

    Thanks

  3. Form me too (4.9.0-1-rt2-MANJARO #1 SMP PREEMPT RT Fri Jan 20 16:10:14 UTC 2017 x86_64 GNU/Linux)

  4. Looks like the mm.h header file has changed… this is out of my league anyone care to venture if we can just change the prototype?

    [root@tomservo vmmon-only]# /usr/bin/make -j8 -C /tmp/modconfig/vmmon-only auto-build HEADER_DIR=/lib/modules/4.9.12-200.fc25.x86_64/build/include CC=/usr/bin/gcc IS_GCC_3=no
    make: Entering directory ‘/tmp/modconfig/vmmon-only’
    Using kernel build system.
    /usr/bin/make -C /lib/modules/4.9.12-200.fc25.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory ‘/usr/src/kernels/4.9.12-200.fc25.x86_64’
    CC [M] /tmp/modconfig/vmmon-only/linux/hostif.o
    /tmp/modconfig/vmmon-only/linux/hostif.c: In function ‘HostIFGetUserPages’:
    /tmp/modconfig/vmmon-only/linux/hostif.c:1166:67: error: passing argument 5 of ‘get_user_pages’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    ^~~~~~
    In file included from /tmp/modconfig/vmmon-only/./include/compat_page.h:23:0,
    from /tmp/modconfig/vmmon-only/linux/hostif.c:32:
    ./include/linux/mm.h:1280:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    /tmp/modconfig/vmmon-only/linux/hostif.c:1166:13: error: too many arguments to function ‘get_user_pages’
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    ^~~~~~~~~~~~~~
    In file included from /tmp/modconfig/vmmon-only/./include/compat_page.h:23:0,
    from /tmp/modconfig/vmmon-only/linux/hostif.c:32:
    ./include/linux/mm.h:1280:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    scripts/Makefile.build:293: recipe for target ‘/tmp/modconfig/vmmon-only/linux/hostif.o’ failed
    make[2]: *** [/tmp/modconfig/vmmon-only/linux/hostif.o] Error 1
    Makefile:1494: recipe for target ‘_module_/tmp/modconfig/vmmon-only’ failed
    make[1]: *** [_module_/tmp/modconfig/vmmon-only] Error 2
    make[1]: Leaving directory ‘/usr/src/kernels/4.9.12-200.fc25.x86_64’
    Makefile:120: recipe for target ‘vmmon.ko’ failed
    make: *** [vmmon.ko] Error 2
    make: Leaving directory ‘/tmp/modconfig/vmmon-only’
    [root@tomservo vmmon-only]#

Leave a Reply

Your email address will not be published. Required fields are marked *