Here is something I'm proud of: a complete patch for getting VMware Workstation 6.5.1 to correctly compile its kernel modules against the new Linux 2.6.29 kernel.
It's attached.
I read the other threads here:
http://communities.vmware.com/message/1210084
http://communities.vmware.com/message/1141306
There were also patches posted to these threads, but after looking at them, I was concerned. There seems to be a serious error, as cap_raise() has been blindly changed to cap_raised(), which is actually a different API that has a completely different effect (it's a query instead of a set). Linux 2.6.29 changed capabilities a lot, evidently, and broke a lot of old code. I had to put in wrapper functions to call the capabilities change, because the new kernel shuffled things around quite a bit.
Also, the Makefile itself was failing to find the Linux kernel headers in many situations. This was a bug in VMware's Makefile: it wasn't including the $(HEADER_DIR) in its check for various features, which was causing misdetection of a lot of things earlier (the poll_initwait() problem).
I made what I believe are the minimum possible changes in order to get it to compile and load cleanly against 2.6.29. It's also in a single, unified, patch, that covers all 5 of the known working VMware modules (ignore vmppuser, it's pretty much dead code, I don't know why VMware still ships it, since it's not used by vmware-modconfig in any way that I could find).
To use this patch, download it from the attachment, gunzip it, then go to your /usr/lib/vmware/modules/source directory. Untar all of the files. Apply the patch with "patch -p1". After the patch has applied, re-tar all the files. Then, run "vmware-modconfig --console --install-all" again, under Linux 2.6.29, and it should now work. Please let me know your results, if it doesn't work. I tested it on an x86_64 machine with VMware Workstation 6.5.1 and it worked, but anything else is untested.
Exercises left to the reader:
1) Make a script to help people install this patch easier. It's error-prone to have to untar and re-tar files by hand.
2) Add in the KERNEL_VERSION checks to the code. Right now, I changed it just for 2.6.29. It could be made portable to other kernel versions as well by isolating the 2.6.29 changes in their own #if blocks.
Hope this helps!
Josh
It's attached.
I read the other threads here:
http://communities.vmware.com/message/1210084
http://communities.vmware.com/message/1141306
There were also patches posted to these threads, but after looking at them, I was concerned. There seems to be a serious error, as cap_raise() has been blindly changed to cap_raised(), which is actually a different API that has a completely different effect (it's a query instead of a set). Linux 2.6.29 changed capabilities a lot, evidently, and broke a lot of old code. I had to put in wrapper functions to call the capabilities change, because the new kernel shuffled things around quite a bit.
Also, the Makefile itself was failing to find the Linux kernel headers in many situations. This was a bug in VMware's Makefile: it wasn't including the $(HEADER_DIR) in its check for various features, which was causing misdetection of a lot of things earlier (the poll_initwait() problem).
I made what I believe are the minimum possible changes in order to get it to compile and load cleanly against 2.6.29. It's also in a single, unified, patch, that covers all 5 of the known working VMware modules (ignore vmppuser, it's pretty much dead code, I don't know why VMware still ships it, since it's not used by vmware-modconfig in any way that I could find).
To use this patch, download it from the attachment, gunzip it, then go to your /usr/lib/vmware/modules/source directory. Untar all of the files. Apply the patch with "patch -p1". After the patch has applied, re-tar all the files. Then, run "vmware-modconfig --console --install-all" again, under Linux 2.6.29, and it should now work. Please let me know your results, if it doesn't work. I tested it on an x86_64 machine with VMware Workstation 6.5.1 and it worked, but anything else is untested.
Exercises left to the reader:
1) Make a script to help people install this patch easier. It's error-prone to have to untar and re-tar files by hand.
2) Add in the KERNEL_VERSION checks to the code. Right now, I changed it just for 2.6.29. It could be made portable to other kernel versions as well by isolating the 2.6.29 changes in their own #if blocks.
Hope this helps!
Josh
Attachments:
- vmware-modules-2.6.29.patch.gz (2.0 K)