Security News

<< Next Post - Previous Post >>

Fix for compiling VMwaretools 9.9.2 on kernel 3_18+

We recently encountered some errors when trying to recompile the VMwaretools on Kali (kernel 3.18) and Security Onion (Kernel 3.2):

  • error: implicit declaration of function ‘smp_mb__after_clear_bit’
  • error: ‘struct dentry’ has no member named ‘d_alias’

    Those errors meant it was not possible to share files between the Host OS and the virtual machines, as compilation was failing in the vmhgfs-only directory.

    Below are a set of instructions to fix those issues.
    Please note the following was Tested with VMwaretools-9.9.2-2496486.tar.gz, and you need to do this as "root"
  • In Fusion/VMWare select reinstall VMwaretools - This will mount a virtual VMWare CDROM
  • Go to that CDROM and copy the VMwaretools tar.gz file onto your /tmp directory.
  • Unmount the CDROM (you may not need to do this, but we did have have issue once with the CDROM still mounted).
  • Uncompress the tar.gz file using "tar xvzf"
  • Go to /tmp/vmware-tools-distrib/lib/modules/source
  • Extract the "vmhgfs.tar" archive using "tar xvf"
  • Go to the "vmhgfs-only" directory and edit the files depending of your Linux distribution (Kali or Security Onion)
  • (Kali and Security Onion): Edit "inode.c"
    -> Search for all instances and replace "d_alias" by "d_u.d_alias" (there were 2 instances at the time of writing this article)
  • (Kali): Edit "page.c"
    -> Search for all instances and replace "smp_mb__before_clear_bit();" by "smp_mb__before_atomic();"
    -> Search for all instances and replace "smp_mb__after_clear_bit();" by "to smp_mb__after_atomic();"

    That's it, you now need to repackage the folder (Kali and Security Onion):
    -> cd ..
    -> tar cvf vmhgfs.tar vmhgfs-only
    -> rm -r vmhgfs-only

    You should now be able to recompile the VMwaretools without any problems.
    -> cd /tmp/vmware-tools-distrib
    -> ./vmware-install.pl
  • << Next Post - Previous Post >>