Comments

VMware – 12.5.2 Released – Still Broken With Kernel 4.9.. — 33 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]#

    • Hi Servicefuzzi,

      i am facing the same issue on Ubuntu 17.4. Can you please help me to resolve this issue.

      Also find the last 10 line of the log file:

      2017-06-10T00:41:58.739+05:30| vthread-3| I120: Setting destination path for vmmon to “/lib/modules/4.10.0-22-generic/misc/vmmon.ko”.
      2017-06-10T00:41:58.739+05:30| vthread-3| I120: Extracting the vmmon source from “/usr/lib/vmware/modules/source/vmmon.tar”.
      2017-06-10T00:41:58.746+05:30| vthread-3| I120: Successfully extracted the vmmon source.
      2017-06-10T00:41:58.747+05:30| vthread-3| I120: Building module with command “/usr/bin/make -j4 -C /tmp/modconfig-SHaYyl/vmmon-only auto-build HEADER_DIR=/lib/modules/4.10.0-22-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no”
      2017-06-10T00:42:00.932+05:30| vthread-3| W110: Failed to build vmmon. Failed to execute the build command.
      2017-06-10T00:42:00.934+05:30| vthread-3| I120: Setting destination path for vmnet to “/lib/modules/4.10.0-22-generic/misc/vmnet.ko”.
      2017-06-10T00:42:00.934+05:30| vthread-3| I120: Extracting the vmnet source from “/usr/lib/vmware/modules/source/vmnet.tar”.
      2017-06-10T00:42:00.943+05:30| vthread-3| I120: Successfully extracted the vmnet source.
      2017-06-10T00:42:00.943+05:30| vthread-3| I120: Building module with command “/usr/bin/make -j4 -C /tmp/modconfig-SHaYyl/vmnet-only auto-build HEADER_DIR=/lib/modules/4.10.0-22-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no”
      2017-06-10T00:42:31.645+05:30| vthread-3| W110: Failed to build vmnet. Failed to execute the build command.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.