jbutter
Contributor
Contributor

Error: filter.c is corrupted preventing at least 3 Workstation 10 bundles from working

Hello all,

At least 3 of the Workstation 10 bundles for x64 Linux have a defective 'filter.c' file. 'filter.c' is a file within the 'vmnet.tar' tarball that gets extracted to /usr/lib/vmware/modules/source/

xxxxxx@yyyyy:/usr/lib/vmware/modules/source/vmnet-only$ ls -l filter.c

-rw-r--r-- 1 root root 0 Apr 28 15:20 filter.c

The 3 bundles which I know to be missing this file are:

VMware-Workstation-Full-10.0.4-2249910.x86_64.bundle

VMware-Workstation-Full-10.0.5-2443746.x86_64.bundle

VMware-Workstation-Full-10.0.6-2700073.x86_64.bundle

The most recent bundle that has a valid filter.c  is the 10.0.3-xxx.x86_64.bundle.  I didn't look at the 32-bit versions.

Anyway, just providing folks a heads-up regarding this.  Have a good day.

-john

0 Kudos
4 Replies
dariusd
Leadership
Leadership

Hi John,

Workstation 10.0.4 and newer do not use filter.c in vmnet; It was deliberately removed between Workstation 10.0.3 and 10.0.4.  The inclusion of a zero-byte file was unintentional, but it is unreferenced and its presence should not have any ill effect.

If you are still encountering problems installing and running Workstation, you can try sharing your host OS distro/version and the vmnet build error message here and we'll see if we can help.

Cheers,

--

Darius

0 Kudos
jbutter
Contributor
Contributor

Thanks for the information. Some of my logged errors were the same as those on a couple other threads for which the solution was to patch that file. 😕

I'll try again and have another look at those logs.  I'll post them if it's still a problem.

Thanks again!

-John

0 Kudos
dariusd
Leadership
Leadership

Ah, OK.  The patches are quite specific to Workstation version and host OS kernel version, so you might need to look for a newer vmnet-only patch for the latest update release of your Workstation version (probably WS10.0.7) on your host kernel version.  There is sometimes a bit of flexibility in the WS and Linux versions supported by a given patch... It depends on what has changed in the Linux kernel and what has changed in Workstation.  We can safely say that any patch which tries to update filter.c is unlikely to help you though.Smiley Wink

Good luck!

--

Darius

0 Kudos
jbutter
Contributor
Contributor

Got it and it's good to see that it works just fine on a system that also has kvm. Turns out the Linux kernel 3.19 .x.xx changed some key structures.  The long and the short of it, for me, was to do the following: (this works for Workstation 10.0.6:

apply this patch:

diff -ur vmnet-only.a/driver.c vmnet-only/driver.c

--- vmnet-only.a/driver.c    2014-11-20 20:13:56.000000000 -0500

+++ vmnet-only/driver.c    2015-02-09 15:40:10.916640592 -0500

@@ -265,10 +265,17 @@

{

    int ret = -ENOTTY;

+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)

    if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {

       ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);

    }

    return ret;

+#else

+   if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {

+      ret = VNetFileOpIoctl(filp->f_path.dentry->d_inode, filp, iocmd, ioarg);

+   }

+   return ret;

+#endif

}

@@ -1191,11 +1198,19 @@

    struct inode *inode = NULL;

    long err;

+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)

    if (filp && filp->f_dentry) {

       inode = filp->f_dentry->d_inode;

    }

    err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);

    return err;

+#else

+   if (filp && filp->f_path.dentry) {

+      inode = filp->f_path.dentry->d_inode;

+   }

+   err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);

+   return err;

+#endif

}

#endif

diff -ur vmnet-only.a/userif.c vmnet-only/userif.c

--- vmnet-only.a/userif.c    2014-11-20 20:13:56.000000000 -0500

+++ vmnet-only/userif.c    2015-02-09 15:41:02.150847338 -0500

@@ -523,7 +523,13 @@

       .iov_base = buf,

       .iov_len  = len,

    };

+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)

    return skb_copy_datagram_iovec(skb, 0, &iov, len);

+#else

+   struct iov_iter to;

+   iov_iter_init(&to, READ, &iov, 1, len);

+   return skb_copy_datagram_iter(skb, 0, &to, len);

+#endif

}

And then, if you see errors related to the alloc_netdev macro (# of args and undeclared function), do this:

In netdev.c, change this call:

dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);

to this:

dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_UNKNOWN, VNetNetIfSetup);

Cheers,

J

0 Kudos