diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2009-11-25 16:03:48 -0600 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2009-11-25 16:03:48 -0600 |
commit | 249dd1d24babc9589e5340c97c5d273ea3d92713 (patch) | |
tree | 16f2bd4f4c6851e09f5d8c21eba75c3fdfd36751 /app-emulation | |
parent | gridzilla: GUI to create grid screens for protein crystal optimization. (diff) | |
download | dberkholz-249dd1d24babc9589e5340c97c5d273ea3d92713.tar.gz dberkholz-249dd1d24babc9589e5340c97c5d273ea3d92713.tar.bz2 dberkholz-249dd1d24babc9589e5340c97c5d273ea3d92713.zip |
vmware-modules: Hack up vmware-server-1 version to build w/ 2.6.32.
Diffstat (limited to 'app-emulation')
23 files changed, 3924 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog new file mode 100644 index 0000000..832e176 --- /dev/null +++ b/app-emulation/vmware-modules/ChangeLog @@ -0,0 +1,299 @@ +# ChangeLog for app-emulation/vmware-modules +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.52 2009/10/30 18:43:11 vadimk Exp $ + + 30 Oct 2009; Vadim Kuznetsov vadimk@gentoo.org + -files/1.0.0.23-makefile-kernel-dir.patch, + -vmware-modules-1.0.0.23.ebuild, -vmware-modules-1.0.0.23-r1.ebuild, + -files/1.0.0.23-r1-kernel-2.6.29.patch: + cleanup + + 25 Sep 2009; Markus Meier <maekke@gentoo.org> + vmware-modules-1.0.0.25.ebuild: + amd64 stable, bug #282213 + +*vmware-modules-1.0.0.24-r1 (22 Sep 2009) + + 22 Sep 2009; Vadim Kuznetsov vadimk@gentoo.org + +vmware-modules-1.0.0.24-r1.ebuild, +files/1.0.0.24-vmnet-2.6.31.patch: + vmnet patch for 2.6.31 kernel. Bug 274173, comment 15. + + 02 Sep 2009; Vadim Kuznetsov vadimk@gentoo.org + -files/patches/vmmon/050_all_kernel-2.6.29.patch, + -files/patches/vmnet/040_all_kernel-2.6.29.patch: + revert previous commit. Bug 273173 + + 28 Aug 2009; Vadim Kuznetsov vadimk@gentoo.org + +files/patches/vmmon/050_all_kernel-2.6.29.patch, + +files/patches/vmnet/040_all_kernel-2.6.29.patch: + bugs 264098, 273173. 1.0.0.15-r2 patches suggested in 272173 + + 25 Aug 2009; Christian Faulhammer <fauli@gentoo.org> + vmware-modules-1.0.0.25.ebuild: + stable x86, security bug 282213 + +*vmware-modules-1.0.0.25 (22 Aug 2009) + + 22 Aug 2009; Vadim Kuznetsov vadimk@gentoo.org + +files/1.0.0.25-makefile-include.patch, +vmware-modules-1.0.0.25.ebuild, + +files/1.0.0.25-makefile-kernel-dir.patch: + Version bump. modules for vmware-{workstation,player}-{6.2}.5.3 + + 03 Jul 2009; Jeroen Roovers <jer@gentoo.org> metadata.xml: + Fix e-mail address. + +*vmware-modules-1.0.0.24 (14 Jun 2009) + + 14 Jun 2009; Vadim Kuznetsov vadimk@gentoo.org + +vmware-modules-1.0.0.24.ebuild, +files/1.0.0.24-kernel-2.6.29.patch, + +files/1.0.0.24-kernel-2.6.30.patch, + +files/1.0.0.24-makefile-kernel-dir.patch, metadata.xml: + Bugs 268099, 270150, 273750. New ebuild without vmware-mod eclass. + +*vmware-modules-1.0.0.23-r1 (16 May 2009) + + 16 May 2009; Mike Auty <ikelos@gentoo.org> + +vmware-modules-1.0.0.23-r1.ebuild, + +files/1.0.0.23-r1-kernel-2.6.29.patch: + Version bump vmware-modules for 2.6.29 support. + + 22 Feb 2009; Mike Auty <ikelos@gentoo.org> + -files/1.0.0.20-vmblock-2.6.26-2.patch, + -files/1.0.0.20-makefile-kernel-dir.patch, + -files/1.0.0.20-vmblock-2.6.26-1.patch, + -files/1.0.0.20-vmmon-2.6.26.patch, -files/1.0.0.20-vmnet-2.6.26.patch, + -files/1.0.0.22-makefile-kernel-dir.patch, + -vmware-modules-1.0.0.20.ebuild, -vmware-modules-1.0.0.22.ebuild: + Clear out old versions of vmware-modules that are no longer needed due to + the removal of insecure versions of vmware products (bug 245941). + + 14 Jan 2009; Mike Auty <ikelos@gentoo.org> + files/patches/vmnet/030_all_kernel-2.6.27.patch: + Third time lucky, more patches for < 2.6.26 kernels. + + 14 Jan 2009; Mike Auty <ikelos@gentoo.org> + files/patches/vmnet/030_all_kernel-2.6.27.patch: + Add patch to try and fix bug 254768. + + 12 Jan 2009; Mike Auty <ikelos@gentoo.org> Manifest: + Fix up vmware-modules-1.0.0.15 patches for kernels older than 2.6.27. + + 12 Jan 2009; Markus Meier <maekke@gentoo.org> + vmware-modules-1.0.0.23.ebuild: + amd64/x86 stable, bug #245941 + + 11 Jan 2009; Markus Meier <maekke@gentoo.org> + vmware-modules-1.0.0.15-r2.ebuild: + amd64/x86 stable, bug #236167 + + 10 Jan 2009; Mike Auty <ikelos@gentoo.org> + -files/1.0.0.17-update115-nasty-hack.patch, + -vmware-modules-1.0.0.16-r1.ebuild, -vmware-modules-1.0.0.17.ebuild, + -vmware-modules-1.0.0.17-r1.ebuild: + Clear out old modules for products no longer in the tree. + +*vmware-modules-1.0.0.15-r2 (10 Jan 2009) + + 10 Jan 2009; Mike Auty <ikelos@gentoo.org> + +files/patches/vmmon/040_all_kernel-2.6.27.patch, + +files/patches/vmnet/030_all_kernel-2.6.27.patch, + +vmware-modules-1.0.0.15-r2.ebuild: + Add in vmware-modules-1.0.0.15-r2. Should compile on kernels up to and + including 2.6.28, big thanks go to Tim Yamin for help with the patches. + +*vmware-modules-1.0.0.23 (09 Nov 2008) + + 09 Nov 2008; Mike Auty <ikelos@gentoo.org> + +files/1.0.0.23-makefile-kernel-dir.patch, vmware-modules-1.0.0.20.ebuild, + vmware-modules-1.0.0.22.ebuild, +vmware-modules-1.0.0.23.ebuild: + Add in vmware-modules-1.0.0.23 for vmware-workstation-6.5 and + vmware-player-2.5. + +*vmware-modules-1.0.0.22 (30 Sep 2008) + + 30 Sep 2008; Mike Auty <ikelos@gentoo.org> + +files/1.0.0.20-vmblock-2.6.26-1.patch, + +files/1.0.0.20-vmblock-2.6.26-2.patch, + +files/1.0.0.20-vmmon-2.6.26.patch, + +files/1.0.0.22-makefile-kernel-dir.patch, + +files/1.0.0.20-vmnet-2.6.26.patch, -vmware-modules-1.0.0.11-r1.ebuild, + -vmware-modules-1.0.0.13-r1.ebuild, vmware-modules-1.0.0.20.ebuild, + +vmware-modules-1.0.0.22.ebuild: + Remove old unused versions, fix up 1.0.0.20 bugs and put in a new version + for workstation 6.0.5 and player 2.0.5. + + 18 Jun 2008; Mike Auty <ikelos@gentoo.org> + +files/1.0.0.20-makefile-kernel-dir.patch, vmware-modules-1.0.0.20.ebuild: + Fix kernel build directories (bug 227941). + +*vmware-modules-1.0.0.20 (14 Jun 2008) + + 14 Jun 2008; Mike Auty <ikelos@gentoo.org> +vmware-modules-1.0.0.20.ebuild: + Add in vmware-modules-1.0.0.20 for workstation 6.0.4 and player 2.0.4. + + 26 Apr 2008; Mike Auty <ikelos@gentoo.org> + +files/patches/vmblock/010_all_kernel-2.6.25.patch, + +files/patches/vmmon/035_all_kernel-2.6.25.patch, + +files/patches/vmnet/025_all_kernel-2.6.25.patch: + Add patches for -r1 ebuilds to ensure they work on 2.6.25 and older + kernels. + + 31 Jan 2008; Mike Auty <ikelos@gentoo.org> ChangeLog: + Re-sign digestless manifest. + +*vmware-modules-1.0.0.17-r1 (26 Jan 2008) + + 26 Jan 2008; Mike Auty <ikelos@gentoo.org> + +files/1.0.0.17-update115-nasty-hack.patch, + +files/patches/vmmon/030_all_fix-linux-headers.patch, + +files/patches/vmnet/021_all_wireless_fix.patch, + +vmware-modules-1.0.0.17-r1.ebuild: + Bump vmware-modules to any-any115, and apply fixes for wireless and 2.6.24. + + 25 Nov 2007; Mike Auty <ikelos@gentoo.org> + -files/1.0.0.16-kernel-2.6.22.patch, -vmware-modules-1.0.0.16.ebuild, + vmware-modules-1.0.0.17.ebuild: + Bump to vmware-any-any-update114. Also update 1.0.0.17 to use the latest + vmware-player package. + + 14 Oct 2007; Mike Auty <ikelos@gentoo.org> + vmware-modules-1.0.0.16-r1.ebuild: + Add vmblock module building to vmware-modules-1.0.0.16-r1 + +*vmware-modules-1.0.0.17 (14 Oct 2007) + + 14 Oct 2007; Mike Auty <ikelos@gentoo.org> vmware-modules-1.0.0.16.ebuild, + +vmware-modules-1.0.0.17.ebuild: + Add the latest modules for vmware-workstation-6.0.1 + +*vmware-modules-1.0.0.16-r1 (16 Sep 2007) + + 16 Sep 2007; Mike Auty <ikelos@gentoo.org> + -files/1.0.0.15-gcc4-ignore-pedantic-errors.patch, + +vmware-modules-1.0.0.16-r1.ebuild: + Adding in vmware-modules-1.0.0.16-r1, now that vmware-any-any-update can + handle workstation 6. Also cleaned out an old patch for 1.0.0.15. + + 28 Jul 2007; Mike Auty <ikelos@gentoo.org> + +files/1.0.0.16-kernel-2.6.22.patch, vmware-modules-1.0.0.16.ebuild: + Redigest for vmware-any-any-update112. + + 12 Jul 2007; Chris Gianelloni <wolf31o2@gentoo.org> + -vmware-modules-1.0.0.11.ebuild, vmware-modules-1.0.0.11-r1.ebuild, + -vmware-modules-1.0.0.13.ebuild, vmware-modules-1.0.0.13-r1.ebuild: + Marking 1.0.0.11-r1 and 1.0.0.13-r1 stable on amd64/x86 since the changes + from the previous ebuilds is just the placement of a variable, and the + current stable versions didn't work properly. + +*vmware-modules-1.0.0.16 (24 Jun 2007) + + 24 Jun 2007; Mike Auty <ikelos@gentoo.org> + +vmware-modules-1.0.0.16.ebuild: + Add in the latest modules for vmware-player-2 and vmware-workstation-6. + + 28 Apr 2007; Mike Auty <ikelos@gentoo.org> + -files/patches/010_all_makefile-vm-build-no-unused-warnings.patch: + Remove unnecessary patch, that's now part of any-any109. + + 28 Apr 2007; Mike Auty <ikelos@gentoo.org> + files/digest-vmware-modules-1.0.0.11, + files/digest-vmware-modules-1.0.0.11-r1, + files/digest-vmware-modules-1.0.0.13, + files/digest-vmware-modules-1.0.0.13-r1, + files/digest-vmware-modules-1.0.0.15-r1, Manifest: + Redigest for vmware-any-any109. + + 04 Mar 2007; Mike Auty <ikelos@gentoo.org> + -vmware-modules-1.0.0.15.ebuild: + Bump vmware-any-any to 108. Remove old vmware-server module ebuild. + + 05 Feb 2007; Mike Auty <ikelos@gentoo.org> + vmware-modules-1.0.0.15-r1.ebuild: + Vmware-any-any bump to support 2.6.20 and fix a copyright date. + + 17 Dec 2006; Mike Frysinger <vapier@gentoo.org> + +files/patches/010_all_makefile-vm-build-no-unused-warnings.patch, + +files/patches/020_all_epoll-def-warnings.patch: + Fix building with newer kernels #146004. + + 01 Dec 2006; Chris Gianelloni <wolf31o2@gentoo.org> + vmware-modules-1.0.0.15-r1.ebuild: + Stable on amd64/x86 for vmware-workstation-5.5.3. + + 01 Dec 2006; Mike Auty <ikelos@gentoo.org> + files/digest-vmware-modules-1.0.0.11, + files/digest-vmware-modules-1.0.0.11-r1, + files/digest-vmware-modules-1.0.0.13, + files/digest-vmware-modules-1.0.0.13-r1, + files/digest-vmware-modules-1.0.0.15-r1, Manifest: + Redigest for vmware-any-any105. + + 30 Oct 2006; Chris Gianelloni <wolf31o2@gentoo.org> + -vmware-modules-1.0.0.8.ebuild: + Removed verion 0.0.8 since we have removed the only VMware product (VMware + Workstation 3.2.1) that used it. + +*vmware-modules-1.0.0.15-r1 (17 Oct 2006) +*vmware-modules-1.0.0.13-r1 (17 Oct 2006) +*vmware-modules-1.0.0.11-r1 (17 Oct 2006) + + 17 Oct 2006; Mike Auty <ikelos@gentoo.org> + +vmware-modules-1.0.0.11-r1.ebuild, +vmware-modules-1.0.0.13-r1.ebuild, + +vmware-modules-1.0.0.15-r1.ebuild: + Version bump for all vmware-modules to fix for bug 149679, thanks to Jason + Urbank. + + 22 Sep 2006; Mike Auty <ikelos@gentoo.org> + files/patches/000_all_makefile-include-directory.patch: + Updated patch fixing bug #148613, thanks to Alon Bar-Lev. + + 13 Sep 2006; Mike Auty <ikelos@gentoo.org> + +files/1.0.0.15-gcc4-ignore-pedantic-errors.patch, + vmware-modules-1.0.0.15.ebuild: + Add a patch to fix compilation against kernels <= 2.6.16 with gcc-4.1. + Closes bug #146004. + + 28 Aug 2006; Chris Gianelloni <wolf31o2@gentoo.org> + vmware-modules-1.0.0.8.ebuild: + Stable on x86 for vmware-workstation. + + 27 Aug 2006; Chris Gianelloni <wolf31o2@gentoo.org> + vmware-modules-1.0.0.11.ebuild: + Stable on amd64 and x86 for vmware-workstation. + + 25 Aug 2006; Mike Auty <ikelos@gentoo.org> + files/digest-vmware-modules-1.0.0.8, files/digest-vmware-modules-1.0.0.11, + files/digest-vmware-modules-1.0.0.13, Manifest: + Redigested for vmware-any-any-update104. + + 22 Aug 2006; Chris Gianelloni <wolf31o2@gentoo.org> + vmware-modules-1.0.0.13.ebuild: + Stable on amd64 and x86 for vmware-workstation and vmware-player. + + 19 Aug 2006; Mike Auty <ikelos@gentoo.org> vmware-modules-1.0.0.15.ebuild: + Update vmware-modules to use the latest vmware-server package. + + 08 Aug 2006; Mike Auty <ikelos@gentoo.org> + files/digest-vmware-modules-1.0.0.8, files/digest-vmware-modules-1.0.0.11, + files/digest-vmware-modules-1.0.0.13, Manifest: + Make use of vmware-any-any103, which fixes kernel problems on 2.6.18, and + also two patches for problems with the kernel build system, thanks to Georgi + Georgiev <chutz (at) gg3.net> and Alon Bar-Lev <alon.barlev (at) gmail.com>. + Closes bug #142855. + +*vmware-modules-1.0.0.13 (31 Jul 2006) +*vmware-modules-1.0.0.11 (31 Jul 2006) +*vmware-modules-1.0.0.8 (31 Jul 2006) + + 31 Jul 2006; Mike Auty <ikelos@gentoo.org> +vmware-modules-1.0.0.8.ebuild, + +vmware-modules-1.0.0.11.ebuild, +vmware-modules-1.0.0.13.ebuild, + vmware-modules-1.0.0.15.ebuild: + Add in vmware-modules for workstation and player products. + +*vmware-modules-1.0.0.15 (31 Jul 2006) + + 31 Jul 2006; Mike Auty <ikelos@gentoo.org> + +files/patches/000_all_makefile-include-directory.patch, +metadata.xml, + +vmware-modules-1.0.0.15.ebuild: + Initial commit of vmware-modules, as used by several vmware-packages. + diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest new file mode 100644 index 0000000..554b3fd --- /dev/null +++ b/app-emulation/vmware-modules/Manifest @@ -0,0 +1,23 @@ +AUX 1.0.0.24-kernel-2.6.29.patch 10343 RMD160 4c93cab9f129a279671aa82af989121b3bf1f191 SHA1 1fcd62b30ca2a15c82ffc82924eef3447a4a4e08 SHA256 7bda64e6c0fb2fd30f71b38fa0920169356913e17bb8802ffc1e57622a0dd79c +AUX 1.0.0.24-kernel-2.6.30.patch 1062 RMD160 8c02543ffcd46db13f179a63c589315f103b6c22 SHA1 f4d8030f1197788d9e2263ab4e3e861652702cd3 SHA256 deef76da29aec2aff33a0fe816faa1c4b61cb27858cdd6c1af70f9eaf9cde158 +AUX 1.0.0.24-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f +AUX 1.0.0.24-vmnet-2.6.31.patch 13974 RMD160 84af8197b341ccea2fdda39225f9259ccdbb4a2d SHA1 745c973cce7c220f2f5d6853d5ede61738fdd729 SHA256 b8391b3ecb7a15c1763b2eace1e747f73f8ace3c1125b5402b8662d7b29298b5 +AUX 1.0.0.25-makefile-include.patch 3185 RMD160 a3aa2f7cb3a51c96be13080061543d9664d98096 SHA1 df61745eeb49f517a9b7fb882ec0baab772544dd SHA256 50b529606062794d90083a590e05966b3420f1f9c6648863bd0ff360c17d9b34 +AUX 1.0.0.25-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f +AUX patches/000_all_makefile-include-directory.patch 342 RMD160 ae8b7c2e628681fff153bfa10242e62df5ab2e10 SHA1 be4f203063e676dc022ce600e15479b6ea56b954 SHA256 2da16602ef3c4cb040ac80a9fed18660fadcae2e843f425da0872f50aa5356db +AUX patches/020_all_epoll-def-warnings.patch 435 RMD160 b9152d9af93862c99c72abc1ef97639351d82141 SHA1 d0a40f0483a144fc98d02213c6c63b2e2ddb9f66 SHA256 2033f23fc8d696e1a9d20c6c446703166ea82a4e5e448494e6a52ef09bac7521 +AUX patches/vmblock/010_all_kernel-2.6.25.patch 2398 RMD160 d0a3464f03486eda983b230d0bd90bca8a5d7ed3 SHA1 b5de035a7d1f0051a76512be7e25b04ff3d0dbdd SHA256 4036d37415cad6109e95e82c3789f32ea2c4901961612fb158d5f7148671b32e +AUX patches/vmmon/030_all_fix-linux-headers.patch 472 RMD160 164b926b0cf53c1a695e7d9ee3e52c5bc1305443 SHA1 b2e485bd21c4106cccc00293df20bce6917e62a4 SHA256 092254308afc9848fd5cc63fb691ee67103fe6413a20e01a568278153d5e876c +AUX patches/vmmon/035_all_kernel-2.6.25.patch 541 RMD160 fb0ec4af96238541ef3d5c6d28436166ccacfe7d SHA1 87b1226bc6b74e35c2945c65c7902c03eafa5058 SHA256 e6bba380c0943ee02b3c19cae340238b0a40614b3f5f840a40516ed05e1d964c +AUX patches/vmmon/040_all_kernel-2.6.27.patch 17842 RMD160 b0caa9c331e46d30383d49371972f201689c1276 SHA1 908e15eb2b56c680e4385c89a683287c323512d3 SHA256 249733eb7f6341ba1b3135bea8690ef69f1e300baa24cc69cdc5a54b13426f8f +AUX patches/vmmon/050_all_kernel-2.6.29.patch 33035 RMD160 db3ff34b9ba965cbda39498557a859afe77b68f7 SHA1 5219413ceee8528b29c7a6b71c3c4ea28ec25659 SHA256 2faf159b64c3e478c08bc56ce38959ead146d8a7a6230e189de66f15068c4984 +AUX patches/vmnet/021_all_wireless_fix.patch 668 RMD160 dbcd47fc4749b36417d028a5701b831035853d9e SHA1 a3e714383be2e0abbc434d5f3ef5253b72978c81 SHA256 231e4c15eb67753da10c01cfebecd851a01f6956263df69e4fb5a9a42957ff60 +AUX patches/vmnet/025_all_kernel-2.6.25.patch 939 RMD160 c7f9f0b9e7bf98b4b37db70926c1c463874e8458 SHA1 43f8f9a5a0b9a28223ad901afd5b45749447bdc4 SHA256 a3247b261376f7cde78724d5704c4ea2511d54644f9c2b776b41f19d261cba17 +AUX patches/vmnet/030_all_kernel-2.6.27.patch 2558 RMD160 9ba251de06852c33e4530628679bdf36ea8051bd SHA1 0078be861f34d4b8def9fcf38385e8c335cbc909 SHA256 b4bc5e5c1030bd5341ef60500dece1d0b6b1f4e553cb566c1ba5506ed6dbb03f +AUX patches/vmnet/040_all_kernel-2.6.29.patch 13106 RMD160 5b8cae4ac0e026b997ddc37734f47f40827027f9 SHA1 a50d935b690c29b5ff0ddbefa1f29f46eaa559c9 SHA256 fb7ab8994577360fa4616e2c4e5f46cb0edfc19e986a6c5ed22765ec30c8297b +AUX patches/vmnet/050_all_kernel-2.6.30.patch 1270 RMD160 842aaccd937e82c7b20172333e425e1ec620705d SHA1 d6ac19b4dd0d8c1d3df6e77a82e0b68df12fce06 SHA256 fc567c08644c38e6cbd171f71a35db4d061d65b01b472cfd9e8e206b297c0b02 +AUX vmware-server.2.0.1_x64-modules-2.6.30-fix.patch 8580 RMD160 8ec52a58c1303fd5b517d2cfa2f1adc1a30bd53b SHA1 3c03ebb216bae29fad991f280588b7b9f6c084ad SHA256 762b5fd955b73d11d9b98ae3ebc6e62e1255eabcd18770b9304397cf2e3b64a4 +DIST vmware-any-any-update115.tar.gz 493641 RMD160 56cabe56f70c01a22a7671e861cc5a2df19855c7 SHA1 ff9b6fdf6ca74495eb5f4822a1854fc91185377c SHA256 b1c14fa9514663b85c2efe8331407e71cce96e5a21a8b941fa570c960bbdcaa1 +EBUILD vmware-modules-1.0.0.15-r3.ebuild 445 RMD160 d16a678a0c9291289be89006b74782aeb0ba5a7a SHA1 c27bc611caae5e0b4afdc45ed5d62ee238a43b1e SHA256 f387e8c45b0b2fcee19b80a66dd3497981c54297fd9d21b7e01c60fb7e39a65d +MISC ChangeLog 11876 RMD160 f2d50c194311dacef9578ac5b13049b9ca9f3183 SHA1 0351aa861b1345d9153cfcc030c71f2ff8e3949a SHA256 a4c9823c15cedc5294979238ed73e7dcdbd3adbf473ab970fca2a54d027a10b1 +MISC metadata.xml 288 RMD160 da2ee1499dd87693b63592a337d8352494cb9652 SHA1 e1b50a587afb7878e21828a957a6838e7d08e4e8 SHA256 100017b3059be218965923798780ab195dafaa893f98088592fb5b299e686c37 diff --git a/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch new file mode 100644 index 0000000..cd8aeb9 --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.29.patch @@ -0,0 +1,288 @@ +diff -ur vmware-modules-1.0.0.24.0/work/vmblock-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmblock-only/Makefile.kernel +--- vmware-modules-1.0.0.24.0/work/vmblock-only/Makefile.kernel 2009-03-27 08:05:21.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmblock-only/Makefile.kernel 2009-04-07 16:14:55.000000000 +0400 +@@ -19,7 +19,7 @@ + + INCLUDE := -I$(SRCROOT)/include + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) +diff -ur vmware-modules-1.0.0.24.0/work/vmci-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmci-only/Makefile.kernel +--- vmware-modules-1.0.0.24.0/work/vmci-only/Makefile.kernel 2009-03-27 08:05:22.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmci-only/Makefile.kernel 2009-04-07 16:14:55.000000000 +0400 +@@ -21,7 +21,7 @@ + + INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) + +diff -ur vmware-modules-1.0.0.24.0/work/vmmon-only/linux/driver.c vmware-modules-1.0.0.24/work/vmmon-only/linux/driver.c +--- vmware-modules-1.0.0.24.0/work/vmmon-only/linux/driver.c 2009-03-27 08:05:19.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmmon-only/linux/driver.c 2009-04-07 16:15:11.000000000 +0400 +@@ -1984,10 +1984,10 @@ + } + + case IOCTL_VMX86_ALLOW_CORE_DUMP: +- if (current->euid == current->uid && +- current->fsuid == current->uid && +- current->egid == current->gid && +- current->fsgid == current->gid) { ++ if (current_euid() == current_uid() && ++ current_fsuid() == current_uid() && ++ current_egid() == current_gid() && ++ current_fsgid() == current_gid()) { + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) || defined(MMF_DUMPABLE) + /* Dump core, readable by user. */ + set_bit(MMF_DUMPABLE, ¤t->mm->flags); +diff -ur vmware-modules-1.0.0.24.0/work/vmmon-only/linux/hostif.c vmware-modules-1.0.0.24/work/vmmon-only/linux/hostif.c +--- vmware-modules-1.0.0.24.0/work/vmmon-only/linux/hostif.c 2009-03-27 08:05:18.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmmon-only/linux/hostif.c 2009-04-07 16:19:05.000000000 +0400 +@@ -3424,6 +3424,82 @@ + } + + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++static inline ++void compat_cap_raise(int cap) ++{ ++ cap_raise(current->cap_effective, cap); ++} ++#else ++static ++void compat_cap_raise(int cap) ++{ ++ struct cred *new_cred; ++ ++ new_cred = prepare_creds(); ++ if (new_cred != NULL) ++ { ++ cap_raise(new_cred->cap_effective, cap); ++ commit_creds(new_cred); ++ } ++ else ++ { ++ Log("compat_cap_raise(%d) prepare_creds(): Out of memory\n", cap); ++ } ++} ++#endif ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++static inline ++void compat_cap_lower(int cap) ++{ ++ cap_lower(current->cap_effective, cap); ++} ++#else ++static ++void compat_cap_lower(int cap) ++{ ++ struct cred *new_cred; ++ ++ new_cred = prepare_creds(); ++ if (new_cred != NULL) ++ { ++ cap_lower(new_cred->cap_effective, cap); ++ commit_creds(new_cred); ++ } ++ else ++ { ++ Log("compat_cap_lower(%d) prepare_creds(): Out of memory\n", cap); ++ } ++} ++#endif ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++static inline ++void compat_set_fsuid(int fsuid) ++{ ++ current->fsuid = fsuid; ++} ++#else ++static ++void compat_set_fsuid(int fsuid) ++{ ++ struct cred *new_cred; ++ ++ new_cred = prepare_creds(); ++ if (new_cred != NULL) ++ { ++ new_cred->fsuid = fsuid; ++ commit_creds(new_cred); ++ } ++ else ++ { ++ Log("compat_set_fsuid(%d) prepare_creds(): Out of memory\n", fsuid); ++ } ++} ++#endif ++ ++ + /* + *---------------------------------------------------------------------- + * +@@ -3456,7 +3532,7 @@ + oldFS = get_fs(); + set_fs(KERNEL_DS); + compat_allow_signal(SIGKILL); +- cap_raise(current->cap_effective, CAP_SYS_RESOURCE); ++ compat_cap_raise(CAP_SYS_RESOURCE); + compat_set_user_nice(current, linuxState.fastClockPriority); + + while (linuxState.fastClockRate > HZ + HZ/16) { +@@ -3580,19 +3656,19 @@ + Bool cap; + long pid; + +- fsuid = current->fsuid; +- current->fsuid = 0; ++ fsuid = current_fsuid(); ++ compat_set_fsuid(0); + filp = filp_open("/dev/rtc", O_RDONLY, 0); +- current->fsuid = fsuid; ++ compat_set_fsuid(fsuid); + if (IS_ERR(filp)) { + Warning("/dev/rtc open failed: %d\n", (int)(VA)filp); + return -(int)(VA)filp; + } +- cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE); +- cap_raise(current->cap_effective, CAP_SYS_RESOURCE); ++ cap = cap_raised(current_cap(), CAP_SYS_RESOURCE); ++ compat_cap_raise(CAP_SYS_RESOURCE); + res = HostIFDoIoctl(filp, RTC_PIE_ON, 0); + if (!cap) { +- cap_lower(current->cap_effective, CAP_SYS_RESOURCE); ++ compat_cap_lower(CAP_SYS_RESOURCE); + } + if (res < 0) { + Warning("/dev/rtc enable interrupt failed: %d\n", res); +diff -ur vmware-modules-1.0.0.24.0/work/vmmon-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmmon-only/Makefile.kernel +--- vmware-modules-1.0.0.24.0/work/vmmon-only/Makefile.kernel 2009-03-27 08:05:19.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmmon-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400 +@@ -22,7 +22,7 @@ + INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \ + -I$(SRCROOT)/vmcore + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, ) +diff -ur vmware-modules-1.0.0.24.0/work/vmnet-only/Makefile.kernel vmware-modules-1.0.0.24/work/vmnet-only/Makefile.kernel +--- vmware-modules-1.0.0.24.0/work/vmnet-only/Makefile.kernel 2009-03-27 08:05:20.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmnet-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400 +@@ -19,7 +19,7 @@ + + INCLUDE := -I$(SRCROOT) + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, ) +diff -ur vmware-modules-1.0.0.24.0/work/vmnet-only/netif.c vmware-modules-1.0.0.24/work/vmnet-only/netif.c +--- vmware-modules-1.0.0.24.0/work/vmnet-only/netif.c 2009-03-27 08:05:20.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vmnet-only/netif.c 2009-04-07 16:15:21.000000000 +0400 +@@ -55,6 +55,30 @@ + struct net_device_stats stats; + } VNetNetIF; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++/* ++ Prior to KERNEL_VERSION(2, 6, 29) "struct net_device" had "void ++ *priv" field which was used as pointer to "VNetNetIF". ++*/ ++ ++#define VNetNetIF_netdev_priv_size 0 ++ ++#define VNetNetIF_netdev_netIf(dev) (*(VNetNetIF**)&((dev)->priv)) ++ ++#else ++/* ++ Since KERNEL_VERSION(2, 6, 29) pointer to "VNetNetIF" is stored in ++ explicitly allocated private area. ++*/ ++typedef struct { ++ VNetNetIF *netIf; ++} VNetNetIF_netdev_priv; ++ ++#define VNetNetIF_netdev_priv_size sizeof(VNetNetIF_netdev_priv) ++ ++#define VNetNetIF_netdev_netIf(dev) (((VNetNetIF_netdev_priv *)compat_netdev_priv(dev))->netIf) ++ ++#endif + + static void VNetNetIfFree(VNetJack *this); + static void VNetNetIfReceive(VNetJack *this, struct sk_buff *skb); +@@ -318,13 +342,13 @@ + memcpy(netIf->devName, devName, sizeof netIf->devName); + NULL_TERMINATE_STRING(netIf->devName); + +- dev = compat_alloc_netdev(0, netIf->devName, VNetNetIfSetup); ++ dev = compat_alloc_netdev(VNetNetIF_netdev_priv_size, netIf->devName, VNetNetIfSetup); + if (!dev) { + retval = -ENOMEM; + goto out; + } + +- dev->priv = netIf; ++ VNetNetIF_netdev_netIf(dev) = netIf; + netIf->dev = dev; + + memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr); +@@ -566,7 +590,7 @@ + VNetNetifStartXmit(struct sk_buff *skb, // IN: + struct net_device *dev) // IN: + { +- VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev); + + if(skb == NULL) { + return 0; +@@ -618,7 +642,7 @@ + VNetNetifSetMAC(struct net_device *dev, // IN: + void *p) // IN: + { +- VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev); + struct sockaddr const *addr = p; + if (!VMX86_IS_STATIC_MAC(addr->sa_data)) { + return -EINVAL; +@@ -675,7 +699,7 @@ + struct net_device_stats * + VNetNetifGetStats(struct net_device *dev) // IN: + { +- VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++ VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev); + return &(netIf->stats); + } + +diff -ur vmware-modules-1.0.0.24.0/work/vsock-only/linux/util.c vmware-modules-1.0.0.24/work/vsock-only/linux/util.c +--- vmware-modules-1.0.0.24.0/work/vsock-only/linux/util.c 2009-03-27 08:05:23.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vsock-only/linux/util.c 2009-04-07 16:15:21.000000000 +0400 +@@ -154,7 +154,7 @@ + goto error; + } + +- Log(buf); ++ Log("%s", buf); + + return; + +diff -ur vmware-modules-1.0.0.24.0/work/vsock-only/Makefile.kernel vmware-modules-1.0.0.24/work/vsock-only/Makefile.kernel +--- vmware-modules-1.0.0.24.0/work/vsock-only/Makefile.kernel 2009-03-27 08:05:23.000000000 +0300 ++++ vmware-modules-1.0.0.24/work/vsock-only/Makefile.kernel 2009-04-07 16:15:21.000000000 +0400 +@@ -25,7 +25,7 @@ + INCLUDE += -I$(SRCROOT)/linux + INCLUDE += -I$(SRCROOT)/common + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, ) + diff --git a/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch new file mode 100644 index 0000000..2c95e1c --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.24-kernel-2.6.30.patch @@ -0,0 +1,33 @@ +diff -urN source-OLD/vmblock-only/linux/control.c source-NEW/vmblock-only/linux/control.c +--- source-OLD/vmblock-only/linux/control.c 2008-10-28 22:47:20.000000000 -0700 ++++ source-NEW/vmblock-only/linux/control.c 2009-05-07 12:25:33.000000000 -0700 +@@ -46,7 +46,9 @@ + + static struct proc_dir_entry *controlProcDirEntry; + struct file_operations ControlFileOps = { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + .owner = THIS_MODULE, ++#endif + .write = ControlFileOpWrite, + .release = ControlFileOpRelease, + }; +@@ -156,7 +158,9 @@ + return -EINVAL; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + controlProcDirEntry->owner = THIS_MODULE; ++#endif + + /* Create /proc/fs/vmblock/mountPoint */ + controlProcMountpoint = proc_mkdir(VMBLOCK_CONTROL_MOUNTPOINT, +@@ -168,7 +172,9 @@ + return -EINVAL; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + controlProcMountpoint->owner = THIS_MODULE; ++#endif + + /* Create /proc/fs/vmblock/dev */ + controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, diff --git a/app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch new file mode 100644 index 0000000..8df4d86 --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.24-makefile-kernel-dir.patch @@ -0,0 +1,80 @@ +diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile +index 0a9ffd6..4aa09e8 100644 +--- a/vmblock-only/Makefile ++++ b/vmblock-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmblock + PRODUCT := @PRODUCT@ +diff --git a/vmci-only/Makefile b/vmci-only/Makefile +index 0a6c9c6..6cd0b6d 100644 +--- a/vmci-only/Makefile ++++ b/vmci-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmci + PRODUCT := @PRODUCT@ +diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile +index d26e58c..f8a40f4 100644 +--- a/vmmon-only/Makefile ++++ b/vmmon-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmmon + PRODUCT := @PRODUCT@ +diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile +index 4cabc30..568271a 100644 +--- a/vmnet-only/Makefile ++++ b/vmnet-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmnet + PRODUCT := @PRODUCT@ +diff --git a/vsock-only/Makefile b/vsock-only/Makefile +index a69bc22..8a74856 100644 +--- a/vsock-only/Makefile ++++ b/vsock-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vsock + PRODUCT := ws diff --git a/app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch b/app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch new file mode 100644 index 0000000..a15e8ec --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.24-vmnet-2.6.31.patch @@ -0,0 +1,477 @@ +diff -uh vmnet-only.old/bridge.c vmnet-only/bridge.c +--- vmnet-only.old/bridge.c 2009-03-27 01:34:28.000000000 -0400 ++++ vmnet-only/bridge.c 2009-08-14 22:55:21.000000000 -0400 +@@ -645,9 +645,7 @@ + if (clone == NULL) { + dev_unlock_list(); + } else { +- struct sock *sk = bridge->sk; +- atomic_add(skb->truesize, &sk->sk_wmem_alloc); +- clone->sk = sk; ++ skb_set_owner_w(clone, bridge->sk); + clone->protocol = ((struct ethhdr *)skb->data)->h_proto; // XXX + if ((dev->flags & IFF_UP) != 0) { + dev_unlock_list(); +@@ -987,6 +985,7 @@ + retval = -ENOMEM; + goto out; + } ++ sock_init_data(NULL, bridge->sk); + SET_SK_DEAD(bridge->sk); + + bridge->wirelessAdapter = VNetBridgeIsDeviceWireless(bridge->dev); +diff -uh vmnet-only.old/compat_netdevice.h vmnet-only/compat_netdevice.h +--- vmnet-only.old/compat_netdevice.h 2009-03-27 01:34:28.000000000 -0400 ++++ vmnet-only/compat_netdevice.h 2009-08-14 22:55:21.000000000 -0400 +@@ -178,6 +178,23 @@ + # define compat_netdev_priv(netdev) netdev_priv(netdev) + #endif + ++/* ++ * All compat_* business is good but when we can we should just provide ++ * missing implementation to ease upstreaming task. ++ */ ++#ifndef HAVE_ALLOC_NETDEV ++#define alloc_netdev(sz, name, setup) compat_alloc_netdev(sz, name, setup) ++#define alloc_etherdev(sz) compat_alloc_etherdev(sz) ++#endif ++ ++#ifndef HAVE_FREE_NETDEV ++#define free_netdev(dev) kfree(dev) ++#endif ++ ++#ifndef HAVE_NETDEV_PRIV ++#define netdev_priv(dev) ((dev)->priv) ++#endif ++ + #if defined(NETDEV_TX_OK) + # define COMPAT_NETDEV_TX_OK NETDEV_TX_OK + # define COMPAT_NETDEV_TX_BUSY NETDEV_TX_BUSY +@@ -186,55 +203,56 @@ + # define COMPAT_NETDEV_TX_BUSY 1 + #endif + +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43)) ++#ifndef HAVE_NETIF_QUEUE + static inline void +-compat_netif_start_queue(struct device *dev) ++netif_start_queue(struct device *dev) + { + clear_bit(0, &dev->tbusy); + } + + static inline void +-compat_netif_stop_queue(struct device *dev) ++netif_stop_queue(struct device *dev) + { + set_bit(0, &dev->tbusy); + } + + static inline int +-compat_netif_queue_stopped(struct device *dev) ++netif_queue_stopped(struct device *dev) + { + return test_bit(0, &dev->tbusy); + } + + static inline void +-compat_netif_wake_queue(struct device *dev) ++netif_wake_queue(struct device *dev) + { + clear_bit(0, &dev->tbusy); + mark_bh(NET_BH); + } + + static inline int +-compat_netif_running(struct device *dev) ++netif_running(struct device *dev) + { + return dev->start == 0; + } + + static inline int +-compat_netif_carrier_ok(struct device *dev) ++netif_carrier_ok(struct device *dev) + { + return 1; + } + + static inline void +-compat_netif_carrier_on(struct device *dev) ++netif_carrier_on(struct device *dev) + { + } + + static inline void +-compat_netif_carrier_off(struct device *dev) ++netif_carrier_off(struct device *dev) + { + } ++#endif + +-#else ++/* Keep compat_* defines for now */ + #define compat_netif_start_queue(dev) netif_start_queue(dev) + #define compat_netif_stop_queue(dev) netif_stop_queue(dev) + #define compat_netif_queue_stopped(dev) netif_queue_stopped(dev) +@@ -243,7 +261,6 @@ + #define compat_netif_carrier_ok(dev) netif_carrier_ok(dev) + #define compat_netif_carrier_on(dev) netif_carrier_on(dev) + #define compat_netif_carrier_off(dev) netif_carrier_off(dev) +-#endif + + /* unregister_netdevice_notifier was not safe prior to 2.6.17 */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17) && \ +diff -uh vmnet-only.old/compat_sched.h vmnet-only/compat_sched.h +--- vmnet-only.old/compat_sched.h 2009-03-27 01:34:28.000000000 -0400 ++++ vmnet-only/compat_sched.h 2009-08-14 22:55:21.000000000 -0400 +@@ -272,6 +272,20 @@ + #endif + + /* ++ * Around 2.6.27 kernel stopped sending signals to kernel ++ * threads being frozen, instead threads have to check ++ * freezing() or use wait_event_freezable(). Unfortunately ++ * wait_event_freezable() completely hides the fact that ++ * thread was frozen from calling code and sometimes we do ++ * want to know that. ++ */ ++#ifdef PF_FREEZER_NOSIG ++#define compat_wait_check_freezing() freezing(current) ++#else ++#define compat_wait_check_freezing() (0) ++#endif ++ ++/* + * Since 2.6.27-rc2 kill_proc() is gone... Replacement (GPL-only!) + * API is available since 2.6.19. Use them from 2.6.27-rc1 up. + */ +diff -uh vmnet-only.old/compat_sock.h vmnet-only/compat_sock.h +--- vmnet-only.old/compat_sock.h 2009-03-27 01:34:28.000000000 -0400 ++++ vmnet-only/compat_sock.h 2009-08-14 22:55:21.000000000 -0400 +@@ -22,21 +22,9 @@ + #include <linux/stddef.h> /* for NULL */ + #include <net/sock.h> + +- + /* + * Between 2.5.70 and 2.5.71 all sock members were renamed from XXX to sk_XXX. +- * +- * VMW_HAVE_SK_WMEM_ALLOC is defined in module Makefile if kernel's struct sock +- * has sk_wmem_alloc member. See vmnet's Makefile.kernel for details. +- * It also means that all modules including this file should do +- * +- * EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, ) +- * +- * in their Makefiles. + */ +-#ifndef VMW_HAVE_SK_WMEM_ALLOC +-# define sk_wmem_alloc wmem_alloc +-#endif + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 71) + # define compat_sk_backlog_rcv backlog_rcv +diff -uh vmnet-only.old/Makefile vmnet-only/Makefile +--- vmnet-only.old/Makefile 2009-09-13 07:39:55.000000000 -0400 ++++ vmnet-only/Makefile 2009-09-13 07:40:10.000000000 -0400 +@@ -106,9 +106,10 @@ + postbuild:: ; + + $(DRIVER_KO): prebuild +- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) modules +- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) postbuild +- ++ make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ ++ MODULEBUILDDIR=$(MODULEBUILDDIR) modules ++ make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \ ++ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild + else + + ifneq ($(VM_CCVER), $(VMCCVER)) +@@ -121,7 +122,7 @@ + endif + + vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \ +- $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \ ++ $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) $(LINUXINCLUDE) \ + $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \ + -DKBUILD_BASENAME=\"$(DRIVER)\" \ + -Werror -S -o /dev/null -xc $(1) \ +diff -uh vmnet-only.old/Makefile.kernel vmnet-only/Makefile.kernel +--- vmnet-only.old/Makefile.kernel 2009-09-13 07:39:55.000000000 -0400 ++++ vmnet-only/Makefile.kernel 2009-09-13 07:40:10.000000000 -0400 +@@ -21,7 +21,6 @@ + + EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) +-EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, ) +diff -uh vmnet-only.old/Makefile.normal vmnet-only/Makefile.normal +--- vmnet-only.old/Makefile.normal 2009-03-27 01:34:28.000000000 -0400 ++++ vmnet-only/Makefile.normal 2009-08-14 22:55:22.000000000 -0400 +@@ -47,7 +47,6 @@ + | sed -n -e 's!^APATH!-I$(HEADER_DIR)/asm!p') + + CC_OPTS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) +-CC_OPTS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/netdev_has_dev_net.c,-DVMW_NETDEV_HAS_DEV_NET, ) +diff -uh vmnet-only.old/netif.c vmnet-only/netif.c +--- vmnet-only.old/netif.c 2009-09-13 07:39:55.000000000 -0400 ++++ vmnet-only/netif.c 2009-08-14 22:55:21.000000000 -0400 +@@ -55,30 +55,6 @@ + struct net_device_stats stats; + } VNetNetIF; + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) +-/* +- Prior to KERNEL_VERSION(2, 6, 29) "struct net_device" had "void +- *priv" field which was used as pointer to "VNetNetIF". +-*/ +- +-#define VNetNetIF_netdev_priv_size 0 +- +-#define VNetNetIF_netdev_netIf(dev) (*(VNetNetIF**)&((dev)->priv)) +- +-#else +-/* +- Since KERNEL_VERSION(2, 6, 29) pointer to "VNetNetIF" is stored in +- explicitly allocated private area. +-*/ +-typedef struct { +- VNetNetIF *netIf; +-} VNetNetIF_netdev_priv; +- +-#define VNetNetIF_netdev_priv_size sizeof(VNetNetIF_netdev_priv) +- +-#define VNetNetIF_netdev_netIf(dev) (((VNetNetIF_netdev_priv *)compat_netdev_priv(dev))->netIf) +- +-#endif + + static void VNetNetIfFree(VNetJack *this); + static void VNetNetIfReceive(VNetJack *this, struct sk_buff *skb); +@@ -100,73 +76,6 @@ + static int VNetNetIfProcRead(char *page, char **start, off_t off, + int count, int *eof, void *data); + +-#ifndef KERNEL_2_3_43 +-/* softnet API emulation */ +- +- +-/* +- *---------------------------------------------------------------------- +- * +- * netif_stop_queue -- +- * +- * Stops queue processing. +- * +- * Results: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-static inline void +-netif_stop_queue(struct net_device *dev) // IN: +-{ +- dev->tbusy = 1; +-} +- +- +-/* +- *---------------------------------------------------------------------- +- * +- * netif_start_queue -- +- * +- * Enables queue processing. It does not try to start received +- * frames processing. +- * +- * Results: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-static inline void +-netif_start_queue(struct net_device *dev) // IN: +-{ +- dev->tbusy = 0; +-} +- +- +-/* +- *---------------------------------------------------------------------- +- * +- * netif_wake_queue -- +- * +- * Enables queue processing. It schedules receive queue processing. +- * +- * Results: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-static inline void +-netif_wake_queue(struct net_device *dev) // IN: +-{ +- dev->tbusy = 0; +- mark_bh(NET_BH); +-} +-#endif +- +- + #if 0 + #ifdef KERNEL_2_3_43 + /* +@@ -221,7 +130,29 @@ + static void + VNetNetIfSetup(struct net_device *dev) // IN: + { ++#ifdef HAVE_NET_DEVICE_OPS ++ static const struct net_device_ops vnetNetifOps = { ++ .ndo_init = VNetNetifProbe, ++ .ndo_open = VNetNetifOpen, ++ .ndo_start_xmit = VNetNetifStartXmit, ++ .ndo_stop = VNetNetifClose, ++ .ndo_get_stats = VNetNetifGetStats, ++ .ndo_set_mac_address = VNetNetifSetMAC, ++ .ndo_set_multicast_list = VNetNetifSetMulticast, ++ /* ++ * We cannot stuck... If someone will report problems under ++ * low memory conditions or some such, we should enable it. ++ */ ++#if 0 ++ .ndo_tx_timeout = VNetNetifTxTimeout, ++#endif ++ }; ++#endif /* HAVE_NET_DEVICE_OPS */ ++ + ether_setup(dev); // turns on IFF_BROADCAST, IFF_MULTICAST ++#ifdef HAVE_NET_DEVICE_OPS ++ dev->netdev_ops = &vnetNetifOps; ++#else + dev->init = VNetNetifProbe; + dev->open = VNetNetifOpen; + dev->hard_start_xmit = VNetNetifStartXmit; +@@ -236,9 +167,43 @@ + */ + #if 0 + dev->tx_timeout = VNetNetifTxTimeout; ++#endif ++#endif ++#endif /* HAVE_NET_DEVICE_OPS */ ++ ++#if 0 ++ /* Only necessary if tx_timeout is set. See above. */ + dev->watchdog_timeo = TX_TIMEOUT; + #endif +-#endif ++} ++ ++ ++/* ++ *---------------------------------------------------------------------- ++ * ++ * VNetNetIfNetDeviceToNetIf -- ++ * ++ * Converts net_device to netIf. ++ * ++ * Results: ++ * Converted pointer. ++ * ++ * Side effects: ++ * None. ++ * ++ *---------------------------------------------------------------------- ++ */ ++ ++static INLINE VNetNetIF * ++VNetNetIfNetDeviceToNetIf(struct net_device *dev) ++{ ++#ifdef HAVE_NETDEV_PRIV ++ VNetNetIF** devPriv = netdev_priv(dev); ++ ++ return *devPriv; ++#else ++ return dev->priv; ++#endif + } + + +@@ -342,13 +307,21 @@ + memcpy(netIf->devName, devName, sizeof netIf->devName); + NULL_TERMINATE_STRING(netIf->devName); + +- dev = compat_alloc_netdev(VNetNetIF_netdev_priv_size, netIf->devName, VNetNetIfSetup); ++#ifdef HAVE_NETDEV_PRIV ++ dev = compat_alloc_netdev(sizeof(VNetNetIF *), netIf->devName, VNetNetIfSetup); + if (!dev) { + retval = -ENOMEM; + goto out; + } +- +- VNetNetIF_netdev_netIf(dev) = netIf; ++ *(VNetNetIF**)netdev_priv(dev) = netIf; ++#else ++ dev = compat_alloc_netdev(0, netIf->devName, VNetNetIfSetup); ++ if (!dev) { ++ retval = -ENOMEM; ++ goto out; ++ } ++ dev->priv = netIf; ++#endif + netIf->dev = dev; + + memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr); +@@ -590,12 +563,14 @@ + VNetNetifStartXmit(struct sk_buff *skb, // IN: + struct net_device *dev) // IN: + { +- VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev); ++ VNetNetIF *netIf; + + if(skb == NULL) { + return 0; + } + ++ netIf = VNetNetIfNetDeviceToNetIf(dev); ++ + /* + * Block a timer-based transmit from overlapping. This could better be + * done with atomic_swap(1, dev->tbusy), but set_bit() works as well. +@@ -642,11 +617,13 @@ + VNetNetifSetMAC(struct net_device *dev, // IN: + void *p) // IN: + { +- VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev); ++ VNetNetIF *netIf; + struct sockaddr const *addr = p; ++ + if (!VMX86_IS_STATIC_MAC(addr->sa_data)) { + return -EINVAL; + } ++ netIf = VNetNetIfNetDeviceToNetIf(dev); + memcpy(netIf->port.paddr, addr->sa_data, dev->addr_len); + memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); + return 0; +@@ -696,11 +673,12 @@ + *---------------------------------------------------------------------- + */ + +-struct net_device_stats * ++static struct net_device_stats * + VNetNetifGetStats(struct net_device *dev) // IN: + { +- VNetNetIF *netIf = VNetNetIF_netdev_netIf(dev); +- return &(netIf->stats); ++ VNetNetIF *netIf = VNetNetIfNetDeviceToNetIf(dev); ++ ++ return &netIf->stats; + } + + +Only in vmnet-only.old: socket.c diff --git a/app-emulation/vmware-modules/files/1.0.0.25-makefile-include.patch b/app-emulation/vmware-modules/files/1.0.0.25-makefile-include.patch new file mode 100644 index 0000000..79f4331 --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.25-makefile-include.patch @@ -0,0 +1,72 @@ +diff -urN old/vmblock-only/Makefile.kernel work/vmblock-only/Makefile.kernel +--- old/vmblock-only/Makefile.kernel 2009-08-21 16:10:32.000000000 -0400 ++++ work/vmblock-only/Makefile.kernel 2009-08-21 16:11:34.000000000 -0400 +@@ -19,7 +19,7 @@ + + INCLUDE := -I$(SRCROOT)/include + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) +diff -urN old/vmci-only/Makefile.kernel work/vmci-only/Makefile.kernel +--- old/vmci-only/Makefile.kernel 2009-08-21 16:10:32.000000000 -0400 ++++ work/vmci-only/Makefile.kernel 2009-08-21 16:11:47.000000000 -0400 +@@ -21,7 +21,7 @@ + + INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) + +diff -urN old/vmmon-only/Makefile.kernel work/vmmon-only/Makefile.kernel +--- old/vmmon-only/Makefile.kernel 2009-08-21 16:10:32.000000000 -0400 ++++ work/vmmon-only/Makefile.kernel 2009-08-21 16:12:48.000000000 -0400 +@@ -22,7 +22,7 @@ + INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \ + -I$(SRCROOT)/vmcore + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, ) +diff -urN old/vmnet-only/Makefile.kernel work/vmnet-only/Makefile.kernel +--- old/vmnet-only/Makefile.kernel 2009-08-21 16:10:32.000000000 -0400 ++++ work/vmnet-only/Makefile.kernel 2009-08-21 16:13:02.000000000 -0400 +@@ -19,7 +19,7 @@ + + INCLUDE := -I$(SRCROOT) + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, ) +diff -urN old/vsock-only/linux/util.c work/vsock-only/linux/util.c +--- old/vsock-only/linux/util.c 2009-08-21 16:10:32.000000000 -0400 ++++ work/vsock-only/linux/util.c 2009-08-21 16:13:27.000000000 -0400 +@@ -154,7 +154,7 @@ + goto error; + } + +- Log(buf); ++ Log("%s", buf); + + return; + +diff -urN old/vsock-only/Makefile.kernel work/vsock-only/Makefile.kernel +--- old/vsock-only/Makefile.kernel 2009-08-21 16:10:32.000000000 -0400 ++++ work/vsock-only/Makefile.kernel 2009-08-21 16:13:41.000000000 -0400 +@@ -25,7 +25,7 @@ + INCLUDE += -I$(SRCROOT)/linux + INCLUDE += -I$(SRCROOT)/common + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, ) + diff --git a/app-emulation/vmware-modules/files/1.0.0.25-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/1.0.0.25-makefile-kernel-dir.patch new file mode 100644 index 0000000..8df4d86 --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.25-makefile-kernel-dir.patch @@ -0,0 +1,80 @@ +diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile +index 0a9ffd6..4aa09e8 100644 +--- a/vmblock-only/Makefile ++++ b/vmblock-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmblock + PRODUCT := @PRODUCT@ +diff --git a/vmci-only/Makefile b/vmci-only/Makefile +index 0a6c9c6..6cd0b6d 100644 +--- a/vmci-only/Makefile ++++ b/vmci-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmci + PRODUCT := @PRODUCT@ +diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile +index d26e58c..f8a40f4 100644 +--- a/vmmon-only/Makefile ++++ b/vmmon-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmmon + PRODUCT := @PRODUCT@ +diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile +index 4cabc30..568271a 100644 +--- a/vmnet-only/Makefile ++++ b/vmnet-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmnet + PRODUCT := @PRODUCT@ +diff --git a/vsock-only/Makefile b/vsock-only/Makefile +index a69bc22..8a74856 100644 +--- a/vsock-only/Makefile ++++ b/vsock-only/Makefile +@@ -29,9 +29,9 @@ SRCROOT = . + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vsock + PRODUCT := ws diff --git a/app-emulation/vmware-modules/files/patches/000_all_makefile-include-directory.patch b/app-emulation/vmware-modules/files/patches/000_all_makefile-include-directory.patch new file mode 100644 index 0000000..42ad13c --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/000_all_makefile-include-directory.patch @@ -0,0 +1,12 @@ +diff -uNr Makefile Makefile +--- Makefile 2006-02-05 00:20:08.000000000 +0000 ++++ Makefile 2006-02-19 16:49:34.000000000 +0000 +@@ -14,7 +14,7 @@ + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = ${KERNEL_DIR}/include + + BUILD_DIR = $(HEADER_DIR)/.. + diff --git a/app-emulation/vmware-modules/files/patches/020_all_epoll-def-warnings.patch b/app-emulation/vmware-modules/files/patches/020_all_epoll-def-warnings.patch new file mode 100644 index 0000000..c30d7c9 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/020_all_epoll-def-warnings.patch @@ -0,0 +1,18 @@ +--- include/compat_wait.h ++++ include/compat_wait.h +@@ -34,13 +34,13 @@ + * 2.4.20-wolk4.0s. + */ + +-#if VMW_HAVE_EPOLL // { ++#ifdef VMW_HAVE_EPOLL // { + #define compat_poll_wqueues struct poll_wqueues + #else // } { + #define compat_poll_wqueues poll_table + #endif // } + +-#if VMW_HAVE_EPOLL // { ++#ifdef VMW_HAVE_EPOLL // { + + /* If prototype does not match, build will abort here */ + extern void poll_initwait(compat_poll_wqueues *); diff --git a/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch b/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch new file mode 100644 index 0000000..6b1d58f --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch @@ -0,0 +1,89 @@ +diff --git a/linux/dentry.c b/linux/dentry.c +index a39bb76..07c6296 100644 +--- a/linux/dentry.c ++++ b/linux/dentry.c +@@ -112,7 +112,7 @@ DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating + LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name); + return 0; + } +- ret = actualNd.dentry && actualNd.dentry->d_inode; ++ ret = nd_dentry(&actualNd) && nd_dentry(&actualNd)->d_inode; + path_release(&actualNd); + + LOG(8, "DentryOpRevalidate: [%s] %s revalidated\n", +diff --git a/linux/filesystem.c b/linux/filesystem.c +index fb6d0bf..e979072 100644 +--- a/linux/filesystem.c ++++ b/linux/filesystem.c +@@ -273,7 +273,7 @@ Iget(struct super_block *sb, // IN: file system superblock object + + ASSERT(sb); + +- inode = iget(sb, ino); ++ inode = iget_locked(sb, ino); + if (!inode) { + return NULL; + } +@@ -301,7 +301,7 @@ Iget(struct super_block *sb, // IN: file system superblock object + return inode; + } + +- iinfo->actualDentry = actualNd.dentry; ++ iinfo->actualDentry = nd_dentry(&actualNd); + path_release(&actualNd); + + return inode; +@@ -307,7 +307,7 @@ Iget(struct super_block *sb, // IN: file system superblock object + return inode; + + error_inode: +- iput(inode); ++ iget_failed(inode); + return NULL; + } + +diff --git a/linux/filesystem.h b/linux/filesystem.h +index 697d112..0f5f32f 100644 +--- a/linux/filesystem.h ++++ b/linux/filesystem.h +@@ -51,6 +51,27 @@ + + #include "vm_basic_types.h" + ++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24) ++#define nd_dentry(nd) (nd)->path.dentry ++#define nd_mnt(nd) (nd)->path.mnt ++ ++static inline void path_release(struct nameidata *nd) ++{ ++ path_put(&nd->path); ++} ++ ++#else ++#define nd_dentry(nd) (nd)->dentry ++#define nd_mnt(nd) (nd)->mnt ++ ++static inline void iget_failed(struct inode *inode) ++{ ++ make_bad_inode(inode); ++ unlock_new_inode(inode); ++ iput(inode); ++} ++#endif ++ + #ifndef container_of + #define container_of(ptr, type, memb) ((type *)((char *)(ptr) - offsetof(type, memb))) + #endif +diff --git a/linux/super.c b/linux/super.c +index 2f2a9aa..697917d 100644 +--- a/linux/super.c ++++ b/linux/super.c +@@ -52,7 +52,7 @@ struct super_operations VMBlockSuperOps = { + #else + .clear_inode = SuperOpClearInode, + #endif +- .read_inode = SuperOpReadInode, ++// .read_inode = SuperOpReadInode, + .statfs = SuperOpStatfs, + }; + diff --git a/app-emulation/vmware-modules/files/patches/vmmon/030_all_fix-linux-headers.patch b/app-emulation/vmware-modules/files/patches/vmmon/030_all_fix-linux-headers.patch new file mode 100644 index 0000000..19c97d7 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmmon/030_all_fix-linux-headers.patch @@ -0,0 +1,12 @@ +diff -uNr vmmon-only.old/include/vcpuset.h vmmon-only/include/vcpuset.h +--- vmmon-only.old/include/vcpuset.h 2007-07-22 12:21:17.000000000 +0100 ++++ vmmon-only/include/vcpuset.h 2007-12-01 15:52:11.000000000 +0000 +@@ -71,7 +71,7 @@ + #define ffs(x) ffs_x86_64(x) + + #elif defined MODULE +- #include "asm/bitops.h" ++ #include "linux/bitops.h" + #elif defined __APPLE__ && defined KERNEL + /* + * XXXMACOS An ugly hack to resolve redefinition of PAGE_ defines diff --git a/app-emulation/vmware-modules/files/patches/vmmon/035_all_kernel-2.6.25.patch b/app-emulation/vmware-modules/files/patches/vmmon/035_all_kernel-2.6.25.patch new file mode 100644 index 0000000..92f70f9 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmmon/035_all_kernel-2.6.25.patch @@ -0,0 +1,17 @@ +diff --git a/common/task.c b/common/task.c +index 3111098..8373d07 100644 +--- a/common/task.c ++++ b/common/task.c +@@ -25,7 +25,12 @@ extern "C" { + * we do not need asm/page.h anymore in this file - not surprising, this + * is common file, yes? And Windows do not have page.h, do they? + */ ++#include <linux/version.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) + #define _I386_PAGE_H ++#else ++#define _ASM_X86_PAGE_H ++#endif + /* On Linux, must come before any inclusion of asm/page.h --hpreg */ + #include "hostKernel.h" + #ifdef linux diff --git a/app-emulation/vmware-modules/files/patches/vmmon/040_all_kernel-2.6.27.patch b/app-emulation/vmware-modules/files/patches/vmmon/040_all_kernel-2.6.27.patch new file mode 100644 index 0000000..f443777 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmmon/040_all_kernel-2.6.27.patch @@ -0,0 +1,596 @@ +diff --git a/common/task.c b/common/task.c +index 264948d..62f4487 100644 +--- a/common/task.c ++++ b/common/task.c +@@ -35,7 +35,6 @@ extern "C" { + #include "hostKernel.h" + #ifdef linux + # include <linux/string.h> +-# include <linux/kernel.h> + + # ifdef USE_PERFCTRS_HOSTED + # include "perfctr.h" +diff --git a/common/task_compat.h b/common/task_compat.h +index b9f4f61..7e9c3de 100644 +--- a/common/task_compat.h ++++ b/common/task_compat.h +@@ -3646,6 +3646,5 @@ Task_CheckPadding(void) + return TRUE; + } + +- printk("/dev/vmmon: Cannot load module. Use standard gcc compiler\n"); + return FALSE; + } +diff --git a/include/compat_semaphore.h b/include/compat_semaphore.h +index 6514067..d0da703 100644 +--- a/include/compat_semaphore.h ++++ b/include/compat_semaphore.h +@@ -2,7 +2,11 @@ + # define __COMPAT_SEMAPHORE_H__ + + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++#include <linux/semaphore.h> ++#else + #include <asm/semaphore.h> ++#endif + + + /* +diff --git a/include/vcpuset.h b/include/vcpuset.h +index 977f3ce..03346df 100644 +--- a/include/vcpuset.h ++++ b/include/vcpuset.h +@@ -71,7 +71,27 @@ ffs_x86_64(int x) + #define ffs(x) ffs_x86_64(x) + + #elif defined MODULE ++#ifndef __cplusplus + #include "linux/bitops.h" ++#else ++static inline int ffs_x86_hack(int x) ++{ ++ int r; ++#ifdef CONFIG_X86_CMOV ++ asm("bsfl %1,%0\n\t" ++ "cmovzl %2,%0" ++ : "=r" (r) : "rm" (x), "r" (-1)); ++#else ++ asm("bsfl %1,%0\n\t" ++ "jnz 1f\n\t" ++ "movl $-1,%0\n" ++ "1:" : "=r" (r) : "rm" (x)); ++#endif ++ return r + 1; ++} ++ ++#define ffs(x) ffs_x86_hack(x) ++#endif + #elif defined __APPLE__ && defined KERNEL + /* + * XXXMACOS An ugly hack to resolve redefinition of PAGE_ defines +diff --git a/include/x86paging.h b/include/x86paging.h +index 688207f..abf26d2 100644 +--- a/include/x86paging.h ++++ b/include/x86paging.h +@@ -58,7 +58,9 @@ + + #define PTE_AVAIL_MASK 0xe00 + #define PTE_AVAIL_SHIFT 9 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) + #define PTE_PFN_MASK 0xfffff000 ++#endif + #define PAE_PTE_PFN_MASK CONST64U(0xffffff000) + #define LM_PTE_PFN_MASK CONST64U(0xffffffffff000) + #define PTE_PFN_SHIFT 12 +diff --git a/linux/driver.c b/linux/driver.c +index bd33762..802b91a 100644 +--- a/linux/driver.c ++++ b/linux/driver.c +@@ -113,6 +113,15 @@ static int LinuxDriverAPMstate = APM_STATE_READY; + #define VMWare_SetVTracer(VTrace_Set) + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) ++#define VMW_NOPAGE_2624 ++ ++#define VMMON_MAP_OFFSET_SHIFT 0 ++#define VMMON_MAP_OFFSET_MASK 0x00000FFF ++#define VMMON_MAP_OFFSET(base) \ ++ (((base) >> VMMON_MAP_OFFSET_SHIFT) & VMMON_MAP_OFFSET_MASK) ++#endif ++ + struct VMXLinuxState linuxState; + + static int vmversion = VME_DEFAULT; +@@ -125,6 +134,7 @@ MODULE_PARM_DESC(vmversion, "VMware version you use: 1=VMware 2, 2=GSX 1, 3=VMwa + "5=GSX 2, 6=GSX 2.5, 7=VMware 4, 8=VMware 3.2.1, 9=GSX 2.5.1, " + "10=VMware 4.5, 11=VMware 4.5.2, 12=GSX 3.2, 13=VMware 5.0, 14=VMware 5.5, " + "15=Server 1.0, 16=VMware 6.0, 17=TOT"); ++MODULE_LICENSE("Proprietary"); + + /* + *---------------------------------------------------------------------- +@@ -147,7 +157,10 @@ static long LinuxDriver_CompatIoctl(struct file *filp, + + static int LinuxDriver_Close(struct inode *inode, struct file *filp); + static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait); +-#if defined(VMW_NOPAGE_261) ++#if defined(VMW_NOPAGE_2624) ++static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); ++static int LinuxDriverLockedFault(struct vm_area_struct *vma, struct vm_fault *fault); ++#elif defined(VMW_NOPAGE_261) + static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, + unsigned long address, int *type); + static struct page *LinuxDriverLockedNoPage(struct vm_area_struct *vma, +@@ -168,11 +181,19 @@ static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma); + static void LinuxDriverPollTimeout(unsigned long clientData); + + static struct vm_operations_struct vmuser_mops = { ++#ifdef VMW_NOPAGE_2624 ++ .fault = LinuxDriverFault ++#else + .nopage = LinuxDriverNoPage ++#endif + }; + + struct vm_operations_struct vmuser_locked_mops = { ++#ifdef VMW_NOPAGE_2624 ++ .fault = LinuxDriverLockedFault ++#else + .nopage = LinuxDriverLockedNoPage ++#endif + }; + + static struct file_operations vmuser_fops; +@@ -1143,7 +1164,10 @@ LinuxDriverIPIHandler(void *info) + *----------------------------------------------------------------------------- + */ + +-#ifdef VMW_NOPAGE_261 ++#if defined(VMW_NOPAGE_2624) ++static int LinuxDriverFault(struct vm_area_struct *vma, //IN ++ struct vm_fault *fault) //IN/OUT ++#elif defined(VMW_NOPAGE_261) + static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN + unsigned long address, //IN + int *type) //OUT: Fault type +@@ -1161,14 +1185,25 @@ static unsigned long LinuxDriverNoPage(struct vm_area_struct *vma,//IN + unsigned long pg; + struct page* page; + ++#ifdef VMW_NOPAGE_2624 ++ pg = fault->pgoff; ++#else + pg = ((address - vma->vm_start) >> PAGE_SHIFT) + compat_vm_pgoff(vma); ++#endif + pg = VMMON_MAP_OFFSET(pg); + if (pg >= vmLinux->size4Gb) { ++#ifdef VMW_NOPAGE_2624 ++ return VM_FAULT_SIGBUS; ++#else + return 0; ++#endif + } + page = vmLinux->pages4Gb[pg]; + get_page(page); +-#ifdef KERNEL_2_4_0 ++#ifdef VMW_NOPAGE_2624 ++ fault->page = page; ++ return 0; ++#elif defined(KERNEL_2_4_0) + #ifdef VMW_NOPAGE_261 + *type = VM_FAULT_MINOR; + #endif +diff --git a/linux/driver.h b/linux/driver.h +index 89c1620..dec6877 100644 +--- a/linux/driver.h ++++ b/linux/driver.h +@@ -131,7 +131,7 @@ typedef struct VMXLinuxState { + spinlock_t pollListLock; + #endif + +- volatile int fastClockThread; ++ volatile struct task_struct *fastClockThread; + unsigned fastClockRate; + + /* +diff --git a/linux/driver_compat.h b/linux/driver_compat.h +index 2b1f520..13afc74 100644 +--- a/linux/driver_compat.h ++++ b/linux/driver_compat.h +@@ -268,7 +268,10 @@ LinuxDriverDestructorLocked(VMLinux *vmLinux) // IN + *----------------------------------------------------------------------------- + */ + +-#ifdef VMW_NOPAGE_261 ++#if defined(VMW_NOPAGE_2624) ++static int LinuxDriverLockedFault(struct vm_area_struct *vma, //IN ++ struct vm_fault *fault) //IN/OUT ++#elif defined(VMW_NOPAGE_261) + static struct page *LinuxDriverLockedNoPage(struct vm_area_struct *vma, //IN + unsigned long address, //IN + int *type) //OUT: Fault type +@@ -288,33 +291,60 @@ static unsigned long LinuxDriverLockedNoPage(struct vm_area_struct *vma, //IN + struct VMHostEntry* vmhe; + struct page* result; + ++#ifdef VMW_NOPAGE_2624 ++ pg = fault->pgoff; ++#else + pg = ((address - vma->vm_start) >> PAGE_SHIFT) + compat_vm_pgoff(vma); ++#endif + if (pg >= vmLinux->sizeLocked) { + printk(KERN_DEBUG "vmmon: Something went wrong: entry %08lX out of range (>=%08X) for mapping on filp %p\n", pg, vmLinux->sizeLocked, vmLinux); ++#ifdef VMW_NOPAGE_2624 ++ return VM_FAULT_SIGBUS; ++#else + return NOPAGE_SIGBUS; ++#endif + } + if (!vmLinux->vm || !vmLinux->vm->vmhost) { + printk(KERN_DEBUG "vmmon: Something went wrong: no vm or vmhost for mapping on filp %p\n", vmLinux); ++#ifdef VMW_NOPAGE_2624 ++ return VM_FAULT_SIGBUS; ++#else + return NOPAGE_SIGBUS; ++#endif + } + pgt = vmLinux->pagesLocked->ent[pg / VMHOST_MAPPING_PT]; + if (!pgt) { + printk(KERN_DEBUG "vmmon: Something went wrong: missing entry %08lX from mapping on filp %p\n", pg, vmLinux); ++#ifdef VMW_NOPAGE_2624 ++ return VM_FAULT_SIGBUS; ++#else + return NOPAGE_SIGBUS; ++#endif + } + vmhe = kmap(pgt); + result = vmhe->ent[pg % VMHOST_MAPPING_PT]; + kunmap(pgt); + if (!result) { + printk(KERN_DEBUG "vmmon: Something went wrong: attempt to access non-existing entry %08lX in mapping on filp %p\n", pg, vmLinux); ++#ifdef VMW_NOPAGE_2624 ++ return VM_FAULT_SIGBUS; ++#else + return NOPAGE_SIGBUS; ++#endif + } + if (!PhysTrack_Test(vmLinux->vm->vmhost->AWEPages, page_to_pfn(result))) { + printk(KERN_DEBUG "vmmon: MPN %08lX not tracked! Someone released it before removing it from VA first!\n", pg); ++#ifdef VMW_NOPAGE_2624 ++ return VM_FAULT_SIGBUS; ++#else + return NOPAGE_SIGBUS; ++#endif + } + get_page(result); +-#ifdef KERNEL_2_4_0 ++#if defined(VMW_NOPAGE_2624) ++ fault->page = result; ++ return 0; ++#elif defined(KERNEL_2_4_0) + #ifdef VMW_NOPAGE_261 + *type = VM_FAULT_MINOR; + #endif +diff --git a/linux/hostif.c b/linux/hostif.c +index 2ec1ab1..bd6ef1e 100644 +--- a/linux/hostif.c ++++ b/linux/hostif.c +@@ -70,6 +70,10 @@ + #include "compat_timer.h" + #include "x86.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) ++#include <linux/kthread.h> ++#include <linux/mutex.h> ++#endif + static COMPAT_DECLARE_COMPLETION(fastClockExited); + + /* +@@ -136,6 +140,95 @@ static COMPAT_DECLARE_COMPLETION(fastClockExited); + #define HOST_ISTRACKED_PFN(_vm, _pfn) (PhysTrack_Test(_vm->physTracker, _pfn)) + + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)) ++/* ++ *----------------------------------------------------------------------------- ++ * ++ * MutexInit -- ++ * ++ * Initialize a Mutex. --hpreg ++ * ++ * Results: ++ * None ++ * ++ * Side effects: ++ * None ++ * ++ *----------------------------------------------------------------------------- ++ */ ++ ++#define MutexInit(_mutex, _name) mutex_init(_mutex) ++/* ++ *----------------------------------------------------------------------------- ++ * ++ * MutexIsLocked -- ++ * ++ * Determine if a Mutex is locked by the current thread. --hpreg ++ * ++ * Results: ++ * TRUE if yes ++ * FALSE if no ++ * ++ * Side effects: ++ * None ++ * ++ *----------------------------------------------------------------------------- ++ */ ++ ++#define MutexIsLocked(_mutex) mutex_is_locked(_mutex) ++ ++/* ++ *----------------------------------------------------------------------------- ++ * ++ * MutexLock -- ++ * ++ * Acquire a Mutex. --hpreg ++ * ++ * Results: ++ * None ++ * ++ * Side effects: ++ * None ++ * ++ *----------------------------------------------------------------------------- ++ */ ++ ++#define MutexLock(_mutex, _callerID) mutex_lock(_mutex) ++ ++/* ++ *----------------------------------------------------------------------------- ++ * ++ * MutexUnlock -- ++ * ++ * Release a Mutex. --hpreg ++ * ++ * Results: ++ * None ++ * ++ * Side effects: ++ * None ++ * ++ *----------------------------------------------------------------------------- ++ */ ++ ++#define MutexUnlock(_mutex, _callerID) mutex_unlock(_mutex) ++ ++/* This mutex protects the driver-wide state. --hpreg */ ++static DEFINE_MUTEX(globalMutex); ++ ++/* ++ * This mutex protects the fast clock rate and is held while ++ * creating/destroying the fastClockThread. It ranks below ++ * globalMutex. We can't use globalMutex for this purpose because the ++ * fastClockThread itself acquires the globalMutex, so trying to hold ++ * the mutex while destroying the thread can cause a deadlock. ++ */ ++static DEFINE_MUTEX(fastClockMutex); ++ ++/* This mutex protects linuxState.pollList. */ ++static DEFINE_MUTEX(pollListMutex); ++ ++#else + /* + *----------------------------------------------------------------------------- + * +@@ -278,6 +371,7 @@ static Mutex fastClockMutex; + /* This mutex protects linuxState.pollList. */ + static Mutex pollListMutex; + ++#endif /* USE_KTHREAD */ + + /* + *----------------------------------------------------------------------------- +@@ -350,7 +444,7 @@ HostIF_GlobalUnlock(int callerID) // IN + MutexUnlock(&globalMutex, callerID); + } + +- ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + #ifdef VMX86_DEBUG + /* + *----------------------------------------------------------------------------- +@@ -375,6 +469,7 @@ HostIF_GlobalLockIsHeld(void) + return MutexIsLocked(&globalMutex); + } + #endif ++#endif + + + /* +@@ -583,7 +678,7 @@ DoClearNXBit(VA vaddr) + #else + pte_val(*pte) &= ~_PAGE_NX; + #endif +- smp_call_function (TLBInvalidatePage, (void *)vaddr, 1, 1); ++ compat_smp_call_function (TLBInvalidatePage, (void *)vaddr, 1, 1); + TLBInvalidatePage((void *)vaddr); + } + if (ptemap) { +@@ -3240,6 +3335,46 @@ HostIF_NumOnlineLogicalCPUs(void) + /* + *---------------------------------------------------------------------- + * ++ * HostIFDoIoctl -- ++ * ++ * Issue ioctl. Assume kernel is not locked. It is not true now, ++ * but it makes things easier to understand, and won't surprise us ++ * later when we get rid of kernel lock from our code. ++ * ++ * Results: ++ * Same as ioctl method. ++ * ++ * Side effects: ++ * none. ++ * ++ *---------------------------------------------------------------------- ++ */ ++ ++static long ++HostIFDoIoctl(struct file *filp, ++ u_int iocmd, ++ unsigned long ioarg) ++{ ++#ifdef HAVE_UNLOCKED_IOCTL ++ if (filp->f_op->unlocked_ioctl) { ++ return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg); ++ } ++#endif ++ if (filp->f_op->ioctl) { ++ long err; ++ ++ lock_kernel(); ++ err = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, iocmd, ioarg); ++ unlock_kernel(); ++ return err; ++ } ++ return -ENOIOCTLCMD; ++} ++ ++ ++/* ++ *---------------------------------------------------------------------- ++ * + * HostIFFastClockThread -- + * + * Kernel thread that provides finer-grained wakeups than the +@@ -3265,7 +3400,9 @@ HostIFFastClockThread(void *data) + mm_segment_t oldFS; + unsigned rate = 0; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + compat_daemonize("vmware-rtc"); ++#endif + oldFS = get_fs(); + set_fs(KERNEL_DS); + compat_allow_signal(SIGKILL); +@@ -3286,8 +3423,7 @@ HostIFFastClockThread(void *data) + p2rate <<= 1; + } + +- res = filp->f_op->ioctl(filp->f_dentry->d_inode, +- filp, RTC_IRQP_SET, p2rate); ++ res = HostIFDoIoctl(filp, RTC_IRQP_SET, p2rate); + if (res < 0) { + Warning("/dev/rtc set rate %d failed: %d\n", p2rate, res); + goto out; +@@ -3392,19 +3528,19 @@ HostIF_SetFastClockRate(unsigned int rate) // IN: Frequency in Hz. + struct file *filp; + int fsuid, res; + Bool cap; +- long pid; ++ struct task_struct *t; + + fsuid = current->fsuid; + current->fsuid = 0; + filp = filp_open("/dev/rtc", O_RDONLY, 0); + current->fsuid = fsuid; +- if (IS_ERR(filp)) { ++ if (IS_ERR(filp) || !filp) { + Warning("/dev/rtc open failed: %d\n", (int)(VA)filp); + return -(int)(VA)filp; + } + cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE); + cap_raise(current->cap_effective, CAP_SYS_RESOURCE); +- res = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, RTC_PIE_ON, 0); ++ res = HostIFDoIoctl(filp, RTC_PIE_ON, 0); + if (!cap) { + cap_lower(current->cap_effective, CAP_SYS_RESOURCE); + } +@@ -3413,26 +3549,27 @@ HostIF_SetFastClockRate(unsigned int rate) // IN: Frequency in Hz. + compat_filp_close(filp, current->files); + return -res; + } +- pid = kernel_thread(HostIFFastClockThread, filp, 0); +- if (pid < 0) { ++ t = kthread_create(HostIFFastClockThread, filp, "vmware-rtc"); ++ if (IS_ERR(t)) { + /* + * Ignore ERESTARTNOINTR silently, it occurs when signal is + * pending, and syscall layer automatically reissues operation + * after signal is handled. + */ +- if (pid != -ERESTARTNOINTR) { +- Warning("/dev/rtc cannot start watch thread: %ld\n", pid); ++ if (PTR_ERR(t) != -ERESTARTNOINTR) { ++ Warning("/dev/rtc cannot start watch thread: %ld\n", PTR_ERR(t)); + } + compat_filp_close(filp, current->files); +- return -pid; ++ return -PTR_ERR(t); + } +- linuxState.fastClockThread = pid; ++ linuxState.fastClockThread = t; ++ wake_up_process(t); + } + } else { + if (linuxState.fastClockThread) { +- kill_proc(linuxState.fastClockThread, SIGKILL, 1); +- linuxState.fastClockThread = 0; ++ send_sig(SIGKILL, linuxState.fastClockThread, 1); + compat_wait_for_completion(&fastClockExited); ++ linuxState.fastClockThread = NULL; + } + } + return 0; +diff --git a/linux/vmhost.h b/linux/vmhost.h +index 7bb43f1..d5f2f64 100644 +--- a/linux/vmhost.h ++++ b/linux/vmhost.h +@@ -13,7 +13,7 @@ + #include "compat_semaphore.h" + #include "compat_wait.h" + +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) + #ifdef VMX86_DEBUG + /* + * A MutexHolder object. In debug builds, we record information about the +@@ -54,7 +54,7 @@ typedef struct Mutex { + MutexHolder cur; + #endif + } Mutex; +- ++#endif + + /* + * Per-vm host-specific state. +@@ -65,7 +65,11 @@ typedef struct VMHost { + * Used for shared modifications to VM's VMDriver data, mostly page locking. + * It has higher rank than the global mutex. + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) ++ struct mutex vmMutex; ++#else + Mutex vmMutex; ++#endif + + atomic_t pendingUserCalls; + wait_queue_head_t callQueue; +diff --git a/linux/vmmonInt.h b/linux/vmmonInt.h +index 12a121d..08b7f59 100644 +--- a/linux/vmmonInt.h ++++ b/linux/vmmonInt.h +@@ -32,7 +32,11 @@ + #endif + + #if defined(CONFIG_SMP) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 8) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++#define compat_smp_call_function(_a0,_a1,_a2,_a3) smp_call_function(_a0,_a1,_a3) ++#else + #define compat_smp_call_function smp_call_function ++#endif + #else + #define compat_smp_call_function(_a0,_a1,_a2,_a3) 0 + #endif diff --git a/app-emulation/vmware-modules/files/patches/vmmon/050_all_kernel-2.6.29.patch b/app-emulation/vmware-modules/files/patches/vmmon/050_all_kernel-2.6.29.patch new file mode 100644 index 0000000..d634af3 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmmon/050_all_kernel-2.6.29.patch @@ -0,0 +1,1005 @@ +diff -ruN vmmon-only-patched/autoconf/smpcall.c vmmon-only-rerefixed/autoconf/smpcall.c +--- vmmon-only-patched/autoconf/smpcall.c 1970-01-01 02:00:00.000000000 +0200 ++++ vmmon-only-rerefixed/autoconf/smpcall.c 2008-10-20 15:52:46.000000000 +0300 +@@ -0,0 +1,23 @@ ++/* ********************************************************** ++ * Copyright (C) 2008 VMware, Inc. All Rights Reserved. -- VMware Confidential ++ * **********************************************************/ ++ ++/* ++ * Detect whether smp_call_function has 4 or 3 arguments. ++ * Change happened between 2.6.26 and 2.6.27-rc1. ++ */ ++ ++#include <linux/autoconf.h> ++#include <linux/version.h> ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) ++# error This compile test intentionally fails. ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) ++# include <linux/smp.h> ++ ++int ++vmware_smp_call_function(void (*func)(void *info), void *info, int wait) ++{ ++ return smp_call_function(func, info, wait); ++} ++#endif +diff -ruN vmmon-only-patched/common/cpuid.c vmmon-only-rerefixed/common/cpuid.c +--- vmmon-only-patched/common/cpuid.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/common/cpuid.c 2008-10-20 16:23:37.000000000 +0300 +@@ -8,7 +8,6 @@ + + # include <linux/string.h> + #endif +- + #include "vmware.h" + #include "vm_assert.h" + #include "x86.h" +diff -ruN vmmon-only-patched/common/task.c vmmon-only-rerefixed/common/task.c +--- vmmon-only-patched/common/task.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/common/task.c 2008-10-20 16:09:29.000000000 +0300 +@@ -25,16 +25,13 @@ + * we do not need asm/page.h anymore in this file - not surprising, this + * is common file, yes? And Windows do not have page.h, do they? + */ +-#include <linux/version.h> +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) +-#define _I386_PAGE_H +-#else +-#define _ASM_X86_PAGE_H +-#endif ++#define _ASM_X86_PAGE_H + /* On Linux, must come before any inclusion of asm/page.h --hpreg */ +-#include "hostKernel.h" + #ifdef linux ++#include "hostKernel.h" ++#include "driver-config.h" + # include <linux/string.h> ++//# include <linux/kernel.h> + + # ifdef USE_PERFCTRS_HOSTED + # include "perfctr.h" +diff -ruN vmmon-only-patched/common/task_compat.h vmmon-only-rerefixed/common/task_compat.h +--- vmmon-only-patched/common/task_compat.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/common/task_compat.h 2008-10-20 16:15:25.000000000 +0300 +@@ -1,7 +1,8 @@ ++#include <linux/init.h> + #include "modulecall_compat.h" + #include "x86msr.h" + +-typedef struct SysenterStateV45 { ++struct SysenterStateV45 { + uint64 rsp; + uint64 rip; + Selector cs; +@@ -3646,5 +3647,6 @@ + return TRUE; + } + ++// printk("/dev/vmmon: Cannot load module. Use standard gcc compiler\n"); + return FALSE; + } +diff -ruN vmmon-only-patched/include/compat_semaphore.h vmmon-only-rerefixed/include/compat_semaphore.h +--- vmmon-only-patched/include/compat_semaphore.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/include/compat_semaphore.h 2008-10-20 14:15:58.000000000 +0300 +@@ -2,11 +2,7 @@ + # define __COMPAT_SEMAPHORE_H__ + + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + #include <linux/semaphore.h> +-#else +-#include <asm/semaphore.h> +-#endif + + + /* +diff -ruN vmmon-only-patched/include/compat_wait.h vmmon-only-rerefixed/include/compat_wait.h +--- vmmon-only-patched/include/compat_wait.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/include/compat_wait.h 2009-04-03 19:58:51.000000000 +0300 +@@ -34,13 +34,13 @@ + * 2.4.20-wolk4.0s. + */ + +-#ifdef VMW_HAVE_EPOLL // { ++#if VMW_HAVE_EPOLL // { + #define compat_poll_wqueues struct poll_wqueues + #else // } { + #define compat_poll_wqueues poll_table + #endif // } + +-#ifdef VMW_HAVE_EPOLL // { ++#if VMW_HAVE_EPOLL // { + + /* If prototype does not match, build will abort here */ + extern void poll_initwait(compat_poll_wqueues *); +@@ -57,7 +57,8 @@ + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0) // { + + /* If prototype does not match, build will abort here */ +-extern void poll_initwait(compat_poll_wqueues *); ++//extern void poll_initwait(compat_poll_wqueues *); ++extern void poll_initwait(struct poll_wqueues *pwq); + + #define compat_poll_initwait(wait, table) ( \ + (wait) = (table), \ +diff -ruN vmmon-only-patched/include/vcpuset.h vmmon-only-rerefixed/include/vcpuset.h +--- vmmon-only-patched/include/vcpuset.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/include/vcpuset.h 2009-04-21 13:46:14.000000000 +0300 +@@ -71,9 +71,7 @@ + #define ffs(x) ffs_x86_64(x) + + #elif defined MODULE +-#ifndef __cplusplus +- #include "linux/bitops.h" +-#else ++ //#include <linux/bitops.h> + static inline int ffs_x86_hack(int x) + { + int r; +@@ -91,7 +89,7 @@ + } + + #define ffs(x) ffs_x86_hack(x) +-#endif ++ + #elif defined __APPLE__ && defined KERNEL + /* + * XXXMACOS An ugly hack to resolve redefinition of PAGE_ defines +diff -ruN vmmon-only-patched/include/x86apic.h vmmon-only-rerefixed/include/x86apic.h +--- vmmon-only-patched/include/x86apic.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/include/x86apic.h 2009-04-20 19:50:19.000000000 +0300 +@@ -77,7 +77,7 @@ + #define APIC_LVT_DELVMODE(_lvt) (_lvt & 0x700) + #define APIC_LVT_RESET_VALUE 0x00010000 + +-#define APIC_BASE_MSR 0x1b ++//#define APIC_BASE_MSR 0x1b + + #define APIC_MSR_BASEMASK QWORD(0x0000000f,0xfffff000) + #define APIC_MSR_ENABLED 0x00000800 +diff -ruN vmmon-only-patched/include/x86paging.h vmmon-only-rerefixed/include/x86paging.h +--- vmmon-only-patched/include/x86paging.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/include/x86paging.h 2008-10-20 14:15:49.000000000 +0300 +@@ -58,9 +58,7 @@ + + #define PTE_AVAIL_MASK 0xe00 + #define PTE_AVAIL_SHIFT 9 +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) +-#define PTE_PFN_MASK 0xfffff000 +-#endif ++//#define PTE_PFN_MASK 0xfffff000 + #define PAE_PTE_PFN_MASK CONST64U(0xffffff000) + #define LM_PTE_PFN_MASK CONST64U(0xffffffffff000) + #define PTE_PFN_SHIFT 12 +diff -ruN vmmon-only-patched/linux/driver.c vmmon-only-rerefixed/linux/driver.c +--- vmmon-only-patched/linux/driver.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/driver.c 2009-05-19 16:02:02.000000000 +0300 +@@ -113,15 +113,6 @@ + #define VMWare_SetVTracer(VTrace_Set) + #endif + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +-#define VMW_NOPAGE_2624 +- +-#define VMMON_MAP_OFFSET_SHIFT 0 +-#define VMMON_MAP_OFFSET_MASK 0x00000FFF +-#define VMMON_MAP_OFFSET(base) \ +- (((base) >> VMMON_MAP_OFFSET_SHIFT) & VMMON_MAP_OFFSET_MASK) +-#endif +- + struct VMXLinuxState linuxState; + + static int vmversion = VME_DEFAULT; +@@ -157,10 +148,8 @@ + + static int LinuxDriver_Close(struct inode *inode, struct file *filp); + static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait); +-#if defined(VMW_NOPAGE_2624) +-static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); +-static int LinuxDriverLockedFault(struct vm_area_struct *vma, struct vm_fault *fault); +-#elif defined(VMW_NOPAGE_261) ++#if 0 ++#if defined(VMW_NOPAGE_261) + static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, + unsigned long address, int *type); + static struct page *LinuxDriverLockedNoPage(struct vm_area_struct *vma, +@@ -171,29 +160,36 @@ + static struct page *LinuxDriverLockedNoPage(struct vm_area_struct *vma, + unsigned long address, int unused); + #else +-static unsigned long LinuxDriverNoPage(struct vm_area_struct *vma, +- unsigned long address, int write_access); +-static unsigned long LinuxDriverLockedNoPage(struct vm_area_struct *vma, +- unsigned long address, int unused); + #endif +-static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma); ++static int LinuxDriverNoPage(struct vm_area_struct *vma, ++ struct vm_fault *fdata); ++static int LinuxDriverLockedNoPage(struct vm_area_struct *vma, ++ struct vm_fault *fdata); ++ + +-static void LinuxDriverPollTimeout(unsigned long clientData); + + static struct vm_operations_struct vmuser_mops = { +-#ifdef VMW_NOPAGE_2624 +- .fault = LinuxDriverFault +-#else +- .nopage = LinuxDriverNoPage +-#endif ++ .fault = LinuxDriverNoPage + }; + + struct vm_operations_struct vmuser_locked_mops = { +-#ifdef VMW_NOPAGE_2624 +- .fault = LinuxDriverLockedFault +-#else +- .nopage = LinuxDriverLockedNoPage ++ .fault = LinuxDriverLockedNoPage ++}; + #endif ++static void LinuxDriverPollTimeout(unsigned long clientData); ++static int LinuxDriverMmap(struct file *filp, struct vm_area_struct *vma); ++ ++static int LinuxDriverNoPage(struct vm_area_struct *vma, ++ struct vm_fault *fdata); ++static int LinuxDriverLockedNoPage(struct vm_area_struct *vma, ++ struct vm_fault *fdata); ++ ++static struct vm_operations_struct vmuser_mops = { ++ .fault = LinuxDriverNoPage ++}; ++ ++struct vm_operations_struct vmuser_locked_mops = { ++ .fault = LinuxDriverLockedNoPage + }; + + static struct file_operations vmuser_fops; +@@ -576,7 +572,7 @@ + memset(vmLinux, 0, sizeof *vmLinux); + vmLinux->version = LinuxDriverEmulatedVersion(); + /* If caller's euid was not 0, we are running devel build */ +- vmLinux->maySetUid = current->euid != 0; ++ vmLinux->maySetUid = current->cred->euid != 0; + vmLinux->ctType = VMCIOBJ_NOT_SET; + + sema_init(&vmLinux->lock4Gb, 1); +@@ -1164,53 +1160,22 @@ + *----------------------------------------------------------------------------- + */ + +-#if defined(VMW_NOPAGE_2624) +-static int LinuxDriverFault(struct vm_area_struct *vma, //IN +- struct vm_fault *fault) //IN/OUT +-#elif defined(VMW_NOPAGE_261) +-static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN +- unsigned long address, //IN +- int *type) //OUT: Fault type +-#elif defined(KERNEL_2_4_0) +-static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN +- unsigned long address, //IN +- int unused) //nothing +-#else +-static unsigned long LinuxDriverNoPage(struct vm_area_struct *vma,//IN +- unsigned long address, //IN +- int write_access) //IN +-#endif ++static int LinuxDriverNoPage(struct vm_area_struct *vma,//IN ++ struct vm_fault *fdata) + { + VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data; + unsigned long pg; + struct page* page; + +-#ifdef VMW_NOPAGE_2624 +- pg = fault->pgoff; +-#else +- pg = ((address - vma->vm_start) >> PAGE_SHIFT) + compat_vm_pgoff(vma); +-#endif ++ pg = fdata->pgoff; + pg = VMMON_MAP_OFFSET(pg); + if (pg >= vmLinux->size4Gb) { +-#ifdef VMW_NOPAGE_2624 +- return VM_FAULT_SIGBUS; +-#else + return 0; +-#endif + } + page = vmLinux->pages4Gb[pg]; + get_page(page); +-#ifdef VMW_NOPAGE_2624 +- fault->page = page; +- return 0; +-#elif defined(KERNEL_2_4_0) +-#ifdef VMW_NOPAGE_261 +- *type = VM_FAULT_MINOR; +-#endif +- return page; +-#else +- return page_address(page); +-#endif ++ fdata->page = page; ++ return VM_FAULT_MINOR; + } + + +@@ -1393,6 +1358,7 @@ + VMLinux *vmLinux = (VMLinux *) filp->private_data; + int retval = 0; + Vcpuid vcpuid; ++ struct cred *new; + + switch (iocmd) { + case IOCTL_VMX86_VERSION: +@@ -1527,8 +1493,14 @@ + devel_suid(); + #else + if (vmLinux->maySetUid) { +- current->suid = 0; +- cap_set_full(current->cap_permitted); ++ new = prepare_creds(); ++ if (!new) { ++ retval = -ENOMEM; ++ break; ++ } ++ new->suid = 0; ++ cap_set_full(new->cap_permitted); ++ commit_creds(new); + retval = 0; + } else { + retval = -EPERM; +@@ -1793,10 +1765,10 @@ + } + + case IOCTL_VMX86_ALLOW_CORE_DUMP: +- if (current->euid == current->uid && +- current->fsuid == current->uid && +- current->egid == current->gid && +- current->fsgid == current->gid) { ++ if (new->euid == current_uid() && ++ new->fsuid == current_uid() && ++ new->egid == new->gid && ++ new->fsgid == new->gid) { + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) || defined(MMF_DUMPABLE) + /* Dump core, readable by user. */ + set_bit(MMF_DUMPABLE, ¤t->mm->flags); +@@ -1813,7 +1785,7 @@ + break; + + case IOCTL_VMX86_BROADCAST_IPI: +- retval = compat_smp_call_function(LinuxDriverIPIHandler, NULL, 1, 1); ++ retval = compat_smp_call_function(LinuxDriverIPIHandler, NULL, 1); + break; + + #ifdef USE_PERFCTRS_HOSTED +diff -ruN vmmon-only-patched/linux/driver_compat.h vmmon-only-rerefixed/linux/driver_compat.h +--- vmmon-only-patched/linux/driver_compat.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/driver_compat.h 2008-07-24 18:55:05.000000000 +0300 +@@ -268,22 +268,8 @@ + *----------------------------------------------------------------------------- + */ + +-#if defined(VMW_NOPAGE_2624) +-static int LinuxDriverLockedFault(struct vm_area_struct *vma, //IN +- struct vm_fault *fault) //IN/OUT +-#elif defined(VMW_NOPAGE_261) +-static struct page *LinuxDriverLockedNoPage(struct vm_area_struct *vma, //IN +- unsigned long address, //IN +- int *type) //OUT: Fault type +-#elif defined(KERNEL_2_4_0) +-static struct page *LinuxDriverLockedNoPage(struct vm_area_struct *vma, //IN +- unsigned long address, //IN +- int unused) //nothing +-#else +-static unsigned long LinuxDriverLockedNoPage(struct vm_area_struct *vma, //IN +- unsigned long address, //IN +- int unused) //nothing +-#endif ++static int LinuxDriverLockedNoPage(struct vm_area_struct *vma, //IN ++ struct vm_fault *fdata) + { + VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data; + unsigned long pg; +@@ -291,67 +277,34 @@ + struct VMHostEntry* vmhe; + struct page* result; + +-#ifdef VMW_NOPAGE_2624 +- pg = fault->pgoff; +-#else +- pg = ((address - vma->vm_start) >> PAGE_SHIFT) + compat_vm_pgoff(vma); +-#endif ++ pg = fdata->pgoff; + if (pg >= vmLinux->sizeLocked) { + printk(KERN_DEBUG "vmmon: Something went wrong: entry %08lX out of range (>=%08X) for mapping on filp %p\n", pg, vmLinux->sizeLocked, vmLinux); +-#ifdef VMW_NOPAGE_2624 +- return VM_FAULT_SIGBUS; +-#else + return NOPAGE_SIGBUS; +-#endif + } + if (!vmLinux->vm || !vmLinux->vm->vmhost) { + printk(KERN_DEBUG "vmmon: Something went wrong: no vm or vmhost for mapping on filp %p\n", vmLinux); +-#ifdef VMW_NOPAGE_2624 +- return VM_FAULT_SIGBUS; +-#else + return NOPAGE_SIGBUS; +-#endif + } + pgt = vmLinux->pagesLocked->ent[pg / VMHOST_MAPPING_PT]; + if (!pgt) { + printk(KERN_DEBUG "vmmon: Something went wrong: missing entry %08lX from mapping on filp %p\n", pg, vmLinux); +-#ifdef VMW_NOPAGE_2624 +- return VM_FAULT_SIGBUS; +-#else + return NOPAGE_SIGBUS; +-#endif + } + vmhe = kmap(pgt); + result = vmhe->ent[pg % VMHOST_MAPPING_PT]; + kunmap(pgt); + if (!result) { + printk(KERN_DEBUG "vmmon: Something went wrong: attempt to access non-existing entry %08lX in mapping on filp %p\n", pg, vmLinux); +-#ifdef VMW_NOPAGE_2624 +- return VM_FAULT_SIGBUS; +-#else + return NOPAGE_SIGBUS; +-#endif + } + if (!PhysTrack_Test(vmLinux->vm->vmhost->AWEPages, page_to_pfn(result))) { + printk(KERN_DEBUG "vmmon: MPN %08lX not tracked! Someone released it before removing it from VA first!\n", pg); +-#ifdef VMW_NOPAGE_2624 +- return VM_FAULT_SIGBUS; +-#else + return NOPAGE_SIGBUS; +-#endif + } + get_page(result); +-#if defined(VMW_NOPAGE_2624) +- fault->page = result; +- return 0; +-#elif defined(KERNEL_2_4_0) +-#ifdef VMW_NOPAGE_261 +- *type = VM_FAULT_MINOR; +-#endif +- return result; +-#else +- return page_address(result); +-#endif ++ fdata->page = result; ++ return VM_FAULT_MINOR; + } + + +diff -ruN vmmon-only-patched/linux/driver.h vmmon-only-rerefixed/linux/driver.h +--- vmmon-only-patched/linux/driver.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/driver.h 2008-10-20 14:21:26.000000000 +0300 +@@ -90,7 +90,7 @@ + struct VMLinux **pollBack; + } VMLinux; + +-extern struct vm_operations_struct vmuser_locked_mops; ++//extern struct vm_operations_struct vmuser_locked_mops; + #define VMHOST_MAPPING_PD (PAGE_SIZE / sizeof(void*)) + #define VMHOST_MAPPING_PT (PAGE_SIZE / sizeof(void*)) + struct VMHostEntry { +@@ -131,6 +131,7 @@ + spinlock_t pollListLock; + #endif + ++// volatile int fastClockThread; + volatile struct task_struct *fastClockThread; + unsigned fastClockRate; + +diff -ruN vmmon-only-patched/linux/hostif.c vmmon-only-rerefixed/linux/hostif.c +--- vmmon-only-patched/linux/hostif.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/hostif.c 2009-04-21 17:47:54.000000000 +0300 +@@ -18,6 +18,7 @@ + #include "compat_page.h" + #include <linux/binfmts.h> + #include <linux/fs.h> ++#include <linux/kthread.h> + #include "compat_sched.h" + #include <linux/file.h> + #ifdef KERNEL_2_2 +@@ -70,10 +71,6 @@ + #include "compat_timer.h" + #include "x86.h" + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +-#include <linux/kthread.h> +-#include <linux/mutex.h> +-#endif + static COMPAT_DECLARE_COMPLETION(fastClockExited); + + /* +@@ -140,95 +137,6 @@ + #define HOST_ISTRACKED_PFN(_vm, _pfn) (PhysTrack_Test(_vm->physTracker, _pfn)) + + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)) +-/* +- *----------------------------------------------------------------------------- +- * +- * MutexInit -- +- * +- * Initialize a Mutex. --hpreg +- * +- * Results: +- * None +- * +- * Side effects: +- * None +- * +- *----------------------------------------------------------------------------- +- */ +- +-#define MutexInit(_mutex, _name) mutex_init(_mutex) +-/* +- *----------------------------------------------------------------------------- +- * +- * MutexIsLocked -- +- * +- * Determine if a Mutex is locked by the current thread. --hpreg +- * +- * Results: +- * TRUE if yes +- * FALSE if no +- * +- * Side effects: +- * None +- * +- *----------------------------------------------------------------------------- +- */ +- +-#define MutexIsLocked(_mutex) mutex_is_locked(_mutex) +- +-/* +- *----------------------------------------------------------------------------- +- * +- * MutexLock -- +- * +- * Acquire a Mutex. --hpreg +- * +- * Results: +- * None +- * +- * Side effects: +- * None +- * +- *----------------------------------------------------------------------------- +- */ +- +-#define MutexLock(_mutex, _callerID) mutex_lock(_mutex) +- +-/* +- *----------------------------------------------------------------------------- +- * +- * MutexUnlock -- +- * +- * Release a Mutex. --hpreg +- * +- * Results: +- * None +- * +- * Side effects: +- * None +- * +- *----------------------------------------------------------------------------- +- */ +- +-#define MutexUnlock(_mutex, _callerID) mutex_unlock(_mutex) +- +-/* This mutex protects the driver-wide state. --hpreg */ +-static DEFINE_MUTEX(globalMutex); +- +-/* +- * This mutex protects the fast clock rate and is held while +- * creating/destroying the fastClockThread. It ranks below +- * globalMutex. We can't use globalMutex for this purpose because the +- * fastClockThread itself acquires the globalMutex, so trying to hold +- * the mutex while destroying the thread can cause a deadlock. +- */ +-static DEFINE_MUTEX(fastClockMutex); +- +-/* This mutex protects linuxState.pollList. */ +-static DEFINE_MUTEX(pollListMutex); +- +-#else + /* + *----------------------------------------------------------------------------- + * +@@ -371,7 +279,6 @@ + /* This mutex protects linuxState.pollList. */ + static Mutex pollListMutex; + +-#endif /* USE_KTHREAD */ + + /* + *----------------------------------------------------------------------------- +@@ -444,7 +351,7 @@ + MutexUnlock(&globalMutex, callerID); + } + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) ++ + #ifdef VMX86_DEBUG + /* + *----------------------------------------------------------------------------- +@@ -469,7 +376,6 @@ + return MutexIsLocked(&globalMutex); + } + #endif +-#endif + + + /* +@@ -564,7 +470,6 @@ + MutexUnlock(&pollListMutex, callerID); + } + +- + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 3) + static INLINE void + down_write_mmap(void) +@@ -620,7 +525,6 @@ + up_write_mmap(); + } + #endif +- + /* + *---------------------------------------------------------------------- + * +@@ -678,7 +582,7 @@ + #else + pte_val(*pte) &= ~_PAGE_NX; + #endif +- compat_smp_call_function (TLBInvalidatePage, (void *)vaddr, 1, 1); ++ smp_call_function (TLBInvalidatePage, (void *)vaddr, 1); + TLBInvalidatePage((void *)vaddr); + } + if (ptemap) { +@@ -2911,7 +2815,7 @@ + if (targetHostCpu != INVALID_HOST_CPU) { + ASSERT(targetHostCpu < MAX_PROCESSORS); + (void) compat_smp_call_function(LinuxDriverIPIHandler, +- NULL, 1, 1); ++ NULL, 1); + return TRUE; + } + } +@@ -3099,7 +3003,7 @@ + { + compat_preempt_disable(); + HostIFFillCPUID((void*)info); +- (void)compat_smp_call_function(HostIFFillCPUID, (void*)info, 1, 1); ++ (void)compat_smp_call_function(HostIFFillCPUID, (void*)info, 1); + compat_preempt_enable(); + } + +@@ -3136,7 +3040,7 @@ + compat_preempt_disable(); + HostIFBrokenCPUHelper((void*)&badcpumask); // run on this machine CPU + (void)compat_smp_call_function(HostIFBrokenCPUHelper, (void*)&badcpumask, +- 1, 1); // run on all other machine CPUs ++ 1); // run on all other machine CPUs + compat_preempt_enable(); + + return badcpumask; +@@ -3335,46 +3239,6 @@ + /* + *---------------------------------------------------------------------- + * +- * HostIFDoIoctl -- +- * +- * Issue ioctl. Assume kernel is not locked. It is not true now, +- * but it makes things easier to understand, and won't surprise us +- * later when we get rid of kernel lock from our code. +- * +- * Results: +- * Same as ioctl method. +- * +- * Side effects: +- * none. +- * +- *---------------------------------------------------------------------- +- */ +- +-static long +-HostIFDoIoctl(struct file *filp, +- u_int iocmd, +- unsigned long ioarg) +-{ +-#ifdef HAVE_UNLOCKED_IOCTL +- if (filp->f_op->unlocked_ioctl) { +- return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg); +- } +-#endif +- if (filp->f_op->ioctl) { +- long err; +- +- lock_kernel(); +- err = filp->f_op->ioctl(filp->f_dentry->d_inode, filp, iocmd, ioarg); +- unlock_kernel(); +- return err; +- } +- return -ENOIOCTLCMD; +-} +- +- +-/* +- *---------------------------------------------------------------------- +- * + * HostIFFastClockThread -- + * + * Kernel thread that provides finer-grained wakeups than the +@@ -3399,15 +3263,19 @@ + int res; + mm_segment_t oldFS; + unsigned rate = 0; ++ struct cred *cred; + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) + compat_daemonize("vmware-rtc"); +-#endif + oldFS = get_fs(); + set_fs(KERNEL_DS); + compat_allow_signal(SIGKILL); +- cap_raise(current->cap_effective, CAP_SYS_RESOURCE); +- compat_set_user_nice(current, -20); ++ cred = prepare_creds(); ++ if(!cred) ++ return -ENOMEM; ++ cap_raise(cred->cap_effective, CAP_SYS_RESOURCE); ++ commit_creds(cred); ++ ++ //compat_set_user_nice(current, -20); + + while (linuxState.fastClockRate > HZ + HZ/16) { + unsigned long buf; +@@ -3423,7 +3291,8 @@ + p2rate <<= 1; + } + +- res = HostIFDoIoctl(filp, RTC_IRQP_SET, p2rate); ++ res = filp->f_op->ioctl(filp->f_dentry->d_inode, ++ filp, RTC_IRQP_SET, p2rate); + if (res < 0) { + Warning("/dev/rtc set rate %d failed: %d\n", p2rate, res); + goto out; +@@ -3526,31 +3395,54 @@ + if (rate > HZ + HZ/16) { + if (!linuxState.fastClockThread) { + struct file *filp; ++ struct cred *cred; + int fsuid, res; + Bool cap; +- struct task_struct *t; ++ struct task_struct *t; + +- fsuid = current->fsuid; ++ /*fsuid = current->fsuid; + current->fsuid = 0; ++ */ ++ cred = prepare_creds(); ++ fsuid = cred->fsuid; ++ cred->fsuid = 0; ++ commit_creds(cred); + filp = filp_open("/dev/rtc", O_RDONLY, 0); +- current->fsuid = fsuid; ++ cred = prepare_creds(); ++ cred->fsuid = fsuid; ++ commit_creds(cred); ++ //current->fsuid = fsuid; + if (IS_ERR(filp) || !filp) { + Warning("/dev/rtc open failed: %d\n", (int)(VA)filp); + return -(int)(VA)filp; + } +- cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE); ++ /* cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE); + cap_raise(current->cap_effective, CAP_SYS_RESOURCE); +- res = HostIFDoIoctl(filp, RTC_PIE_ON, 0); ++*/ ++ cred = prepare_creds(); ++ cap = cap_raised(cred->cap_effective, CAP_SYS_RESOURCE); ++ cap_raise(cred->cap_effective, CAP_SYS_RESOURCE); ++ commit_creds(cred); ++ if (filp->f_op->ioctl) { ++ lock_kernel(); ++ res = filp->f_op->ioctl(filp->f_path.dentry->d_inode, filp, RTC_PIE_ON, 0); ++ unlock_kernel(); ++ } ++ else ++ res = -1; + if (!cap) { +- cap_lower(current->cap_effective, CAP_SYS_RESOURCE); ++ cred = prepare_creds(); ++ // cap_lower(current->cap_effective, CAP_SYS_RESOURCE); ++ cap_lower(cred->cap_effective, CAP_SYS_RESOURCE); ++ commit_creds(cred); + } + if (res < 0) { + Warning("/dev/rtc enable interrupt failed: %d\n", res); + compat_filp_close(filp, current->files); + return -res; + } +- t = kthread_create(HostIFFastClockThread, filp, "vmware-rtc"); +- if (IS_ERR(t)) { ++ t = kthread_create(HostIFFastClockThread, filp, "vmware-rtc"); ++ if (IS_ERR(t)) { + /* + * Ignore ERESTARTNOINTR silently, it occurs when signal is + * pending, and syscall layer automatically reissues operation +@@ -3563,11 +3455,11 @@ + return -PTR_ERR(t); + } + linuxState.fastClockThread = t; +- wake_up_process(t); ++ wake_up_process(t); + } + } else { + if (linuxState.fastClockThread) { +- send_sig(SIGKILL, linuxState.fastClockThread, 1); ++ send_sig(SIGKILL, linuxState.fastClockThread, 1); + compat_wait_for_completion(&fastClockExited); + linuxState.fastClockThread = NULL; + } +diff -ruN vmmon-only-patched/linux/hostif_compat.h vmmon-only-rerefixed/linux/hostif_compat.h +--- vmmon-only-patched/linux/hostif_compat.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/hostif_compat.h 2009-04-21 13:45:08.000000000 +0300 +@@ -93,11 +93,13 @@ + } + return -EFAULT; + } ++ /* + if (vma->vm_ops != &vmuser_locked_mops) { + printk(KERN_DEBUG "Found non-vmmon VMA (%#lX-%#lX) for VA %p\n", + vma->vm_start, vma->vm_end, (void*)va); + return -EINVAL; + } ++ */ + vmLinux = (VMLinux*)vma->vm_file->private_data; + if (!vmLinux) { + printk(KERN_DEBUG "Found vmmon VMA (%#lX-%#lX) for VA %p" +@@ -367,7 +369,7 @@ + { + compat_preempt_disable(); + HostIFSystemCallResetMSR(regs); +- (void)compat_smp_call_function(HostIFSystemCallResetMSR, (void *)regs, 1, 1); ++ (void)compat_smp_call_function(HostIFSystemCallResetMSR, (void *)regs, 1); + compat_preempt_enable(); + } + +@@ -775,7 +777,8 @@ + } + } + +- mpn = PgtblVa2MPN(__fix_to_virt(VMWARE__FIX_IO_APIC_BASE)); ++ //mpn = PgtblVa2MPN(__fix_to_virt(VMWARE__FIX_IO_APIC_BASE)); ++ mpn = PgtblVa2MPN(__fix_to_virt(FIX_IO_APIC_BASE_0)); + if (mpn == INVALID_MPN) { + return 0; + } +diff -ruN vmmon-only-patched/linux/vmhost.h vmmon-only-rerefixed/linux/vmhost.h +--- vmmon-only-patched/linux/vmhost.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/vmhost.h 2005-06-19 04:23:03.000000000 +0300 +@@ -13,7 +13,7 @@ + #include "compat_semaphore.h" + #include "compat_wait.h" + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) ++ + #ifdef VMX86_DEBUG + /* + * A MutexHolder object. In debug builds, we record information about the +@@ -54,7 +54,7 @@ + MutexHolder cur; + #endif + } Mutex; +-#endif ++ + + /* + * Per-vm host-specific state. +@@ -65,11 +65,7 @@ + * Used for shared modifications to VM's VMDriver data, mostly page locking. + * It has higher rank than the global mutex. + */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) +- struct mutex vmMutex; +-#else + Mutex vmMutex; +-#endif + + atomic_t pendingUserCalls; + wait_queue_head_t callQueue; +diff -ruN vmmon-only-patched/linux/vmmonInt.h vmmon-only-rerefixed/linux/vmmonInt.h +--- vmmon-only-patched/linux/vmmonInt.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/linux/vmmonInt.h 2009-04-20 19:14:30.000000000 +0300 +@@ -31,16 +31,7 @@ + } while (0) + #endif + +-#if defined(CONFIG_SMP) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 8) +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) +-#define compat_smp_call_function(_a0,_a1,_a2,_a3) smp_call_function(_a0,_a1,_a3) +-#else +-#define compat_smp_call_function smp_call_function +-#endif +-#else +-#define compat_smp_call_function(_a0,_a1,_a2,_a3) 0 +-#endif +- ++#define compat_smp_call_function(fn, info, wait) smp_call_function(fn, info, wait) + + /* + * Although this is not really related to kernel-compatibility, I put this +diff -ruN vmmon-only-patched/Makefile vmmon-only-rerefixed/Makefile +--- vmmon-only-patched/Makefile 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/Makefile 2007-11-28 12:39:37.000000000 +0200 +@@ -15,7 +15,7 @@ + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = ${KERNEL_DIR}/include ++HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include + + BUILD_DIR = $(HEADER_DIR)/.. + +diff -ruN vmmon-only-patched/Makefile.kernel vmmon-only-rerefixed/Makefile.kernel +--- vmmon-only-patched/Makefile.kernel 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/Makefile.kernel 2009-04-21 18:01:30.000000000 +0300 +@@ -16,18 +16,20 @@ + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/ioapic.c, \ +- -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE_0, \ +- -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE ) +-EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) ++ -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE_0) ++# -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE ) #only for UP ? ++#EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) ++EXTRA_CFLAGS += "-DVMW_HAVE_EPOLL" + EXTRA_CFLAGS += $(shell if [ -f $(HEADER_DIR)/linux/compile.h ]; then echo "-DVMW_HAVE_COMPILE_H"; fi) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, ) ++EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, ) + + CXX_KFLAGS := $(call vm_check_gxx,-fno-exceptions,) + + # 2.6.x build system + CFLAGS_task.o := -x c++ $(CXX_KFLAGS) + # 2.4.x build system +-CFLAGS_common/task.o := $(CFLAGS_task.o) ++#CFLAGS_common/task.o := $(CFLAGS_task.o) + + obj-m += $(DRIVER).o + +diff -ruN vmmon-only-patched/Makefile.normal vmmon-only-rerefixed/Makefile.normal +--- vmmon-only-patched/Makefile.normal 2009-07-08 16:21:02.000000000 +0300 ++++ vmmon-only-rerefixed/Makefile.normal 2009-04-21 13:42:29.000000000 +0300 +@@ -67,8 +67,8 @@ + CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/ioapic.c, \ +- -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE_0, \ +- -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE ) ++ -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE_0) ++# -DVMWARE__FIX_IO_APIC_BASE=FIX_IO_APIC_BASE ) #up? + CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, ) + CC_OPTS += $(shell if [ -f $(HEADER_DIR)/linux/compile.h ]; then echo "-DVMW_HAVE_COMPILE_H"; fi) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/autoconf/setnice.c, -DVMW_HAVE_SET_USER_NICE, ) +diff -ruN vmmon-only-patched/Module.markers vmmon-only-rerefixed/Module.markers +--- vmmon-only-patched/Module.markers 1970-01-01 02:00:00.000000000 +0200 ++++ vmmon-only-rerefixed/Module.markers 2008-10-20 16:18:10.000000000 +0300 +@@ -0,0 +1,4 @@ ++core_marker_format vmlinux name %s format %s ++kernel_sched_schedule vmlinux prev_pid %d next_pid %d prev_state %ld ## rq %p prev %p next %p ++kernel_sched_wakeup vmlinux pid %d state %ld ## rq %p task %p rq->curr %p ++kernel_sched_wakeup_new vmlinux pid %d state %ld ## rq %p task %p rq->curr %p +diff -ruN vmmon-only-patched/modules.order vmmon-only-rerefixed/modules.order +--- vmmon-only-patched/modules.order 1970-01-01 02:00:00.000000000 +0200 ++++ vmmon-only-rerefixed/modules.order 2009-04-21 18:01:42.000000000 +0300 +@@ -0,0 +1 @@ ++kernel//home/kang/tmp/vmware-update-2.6.27-5.5.7-2/vmmon-only/vmmon.ko diff --git a/app-emulation/vmware-modules/files/patches/vmnet/021_all_wireless_fix.patch b/app-emulation/vmware-modules/files/patches/vmnet/021_all_wireless_fix.patch new file mode 100644 index 0000000..a550e89 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmnet/021_all_wireless_fix.patch @@ -0,0 +1,21 @@ +diff -uNr vmnet-only.old/bridge.c vmnet-only/bridge.c +--- vmnet-only.old/bridge.c 2008-01-06 21:25:04.000000000 +0000 ++++ vmnet-only/bridge.c 2008-01-06 21:27:42.000000000 +0000 +@@ -32,7 +32,7 @@ + #include <linux/tcp.h> + #include <net/tcp.h> + +-#ifdef CONFIG_NET_RADIO ++#if defined CONFIG_NET_RADIO || defined CONFIG_WLAN_80211 + # include <linux/wireless.h> + #endif + #include "vmnetInt.h" +@@ -764,7 +764,7 @@ + { + #ifdef CONFIG_WIRELESS_EXT + return dev->wireless_handlers != NULL; +-#elif !defined(CONFIG_NET_RADIO) ++#elif !defined CONFIG_NET_RADIO && !defined CONFIG_WLAN_80211 + return FALSE; + #elif WIRELESS_EXT > 19 + return dev->wireless_handlers != NULL; diff --git a/app-emulation/vmware-modules/files/patches/vmnet/025_all_kernel-2.6.25.patch b/app-emulation/vmware-modules/files/patches/vmnet/025_all_kernel-2.6.25.patch new file mode 100644 index 0000000..a11a362 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmnet/025_all_kernel-2.6.25.patch @@ -0,0 +1,34 @@ +diff --git a/filter.c b/filter.c +index 7527fe4..7483c83 100644 +--- a/filter.c ++++ b/filter.c +@@ -12,6 +12,13 @@ + #include <linux/ip.h> + #include "compat_skbuff.h" + #include <linux/netdevice.h> ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) ++# define NF_IP_LOCAL_OUT NF_INET_LOCAL_OUT ++# define NF_IP_LOCAL_IN NF_INET_LOCAL_IN ++# define NF_IP_POST_ROUTING NF_INET_POST_ROUTING ++#endif ++ + /* + * All this makes sense only if NETFILTER support is configured in our kernel. + */ +diff --git a/vmnetInt.h b/vmnetInt.h +index bf2dff9..483c457 100644 +--- a/vmnetInt.h ++++ b/vmnetInt.h +@@ -78,8 +78,10 @@ + */ + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 65) + # define SET_SK_DEAD(_sk, _val) (_sk)->dead = (_val) +-#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) + # define SET_SK_DEAD(_sk, _val) sock_valbool_flag(_sk, SOCK_DEAD, _val) ++#else ++# define SET_SK_DEAD(_sk, _val) sock_set_flag(_sk, SOCK_DEAD) + #endif + + diff --git a/app-emulation/vmware-modules/files/patches/vmnet/030_all_kernel-2.6.27.patch b/app-emulation/vmware-modules/files/patches/vmnet/030_all_kernel-2.6.27.patch new file mode 100644 index 0000000..1648303 --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmnet/030_all_kernel-2.6.27.patch @@ -0,0 +1,84 @@ +diff --git a/bridge.c b/bridge.c +index cdf9e0b..de78618 100644 +--- a/bridge.c ++++ b/bridge.c +@@ -275,7 +275,11 @@ VNetBridgeDevCompatible(VNetBridge *bridge, // IN: Bridge + struct net_device *net) // IN: Network device + { + #ifdef VMW_NETDEV_HAS_NET ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) ++ if (dev_net(net) != dev_net(bridge->internalDev)) { ++#else + if (net->nd_net != bridge->internalDev->nd_net) { ++#endif + return 0; + } + #endif +diff --git a/compat_semaphore.h b/compat_semaphore.h +index a3a88c2..c3038d7 100644 +--- a/compat_semaphore.h ++++ b/compat_semaphore.h +@@ -6,7 +6,11 @@ + # define __COMPAT_SEMAPHORE_H__ + + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) ++#include <linux/semaphore.h> ++#else + #include <asm/semaphore.h> ++#endif + + + /* +diff --git a/procfs.c b/procfs.c +index 07e894d..73d31e8 100644 +--- a/procfs.c ++++ b/procfs.c +@@ -63,7 +63,7 @@ VNetProc_Init(void) + { + int retval; + +- retval = VNetProc_MakeEntry(&proc_root, "vmnet", S_IFDIR, &base); ++ retval = VNetProc_MakeEntry(NULL, "vmnet", S_IFDIR, &base); + if (retval) { + return retval; + } +@@ -95,7 +95,7 @@ VNetProc_Init(void) + void + VNetProc_Cleanup(void) + { +- VNetProc_RemoveEntry(base, &proc_root); ++ VNetProc_RemoveEntry(base, NULL); + base = NULL; + } + +diff --git a/vmnetInt.h b/vmnetInt.h +index 483c457..2328ec6 100644 +--- a/vmnetInt.h ++++ b/vmnetInt.h +@@ -63,7 +63,11 @@ + # define dev_lock_list() read_lock(&dev_base_lock) + # define dev_unlock_list() read_unlock(&dev_base_lock) + # ifdef VMW_NETDEV_HAS_NET ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) + # define DEV_GET(x) __dev_get_by_name((x)->internalDev->nd_net, (x)->name) ++# else ++# define DEV_GET(x) __dev_get_by_name(dev_net((x)->internalDev), (x)->name) ++# endif + # else + # define DEV_GET(x) __dev_get_by_name((x)->name) + # endif +@@ -87,8 +91,13 @@ + + #ifdef VMW_NETDEV_HAS_NET + extern struct proto vmnet_proto; ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) ++# define compat_sk_alloc(_bri, _pri) sk_alloc(dev_net((_bri)->internalDev), \ ++ PF_NETLINK, _pri, &vmnet_proto) ++# else + # define compat_sk_alloc(_bri, _pri) sk_alloc((_bri)->internalDev->nd_net, \ + PF_NETLINK, _pri, &vmnet_proto) ++# endif + #elif defined(VMW_HAVE_SK_ALLOC_WITH_PROTO) + extern struct proto vmnet_proto; + # define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) diff --git a/app-emulation/vmware-modules/files/patches/vmnet/040_all_kernel-2.6.29.patch b/app-emulation/vmware-modules/files/patches/vmnet/040_all_kernel-2.6.29.patch new file mode 100644 index 0000000..7c2c48a --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmnet/040_all_kernel-2.6.29.patch @@ -0,0 +1,354 @@ +diff -ruN vmnet-only-patched/bridge.c vmnet-only-refixed/bridge.c +--- vmnet-only-patched/bridge.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/bridge.c 2009-04-21 18:30:03.000000000 +0300 +@@ -275,11 +275,7 @@ + struct net_device *net) // IN: Network device + { + #ifdef VMW_NETDEV_HAS_NET +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + if (dev_net(net) != dev_net(bridge->internalDev)) { +-#else +- if (net->nd_net != bridge->internalDev->nd_net) { +-#endif + return 0; + } + #endif +@@ -857,6 +853,9 @@ + static Bool + VNetBridgeIsDeviceWireless(struct net_device *dev) //IN: sock + { ++ return FALSE; ++} ++#if 0 + #ifdef CONFIG_WIRELESS_EXT + return dev->wireless_handlers != NULL; + #elif !defined CONFIG_NET_RADIO && !defined CONFIG_WLAN_80211 +@@ -869,7 +868,7 @@ + return dev->get_wireless_stats != NULL; + #endif + } +- ++#endif + /* + *---------------------------------------------------------------------- + * +diff -ruN vmnet-only-patched/compat_semaphore.h vmnet-only-refixed/compat_semaphore.h +--- vmnet-only-patched/compat_semaphore.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/compat_semaphore.h 2008-10-20 16:35:18.000000000 +0300 +@@ -6,11 +6,7 @@ + # define __COMPAT_SEMAPHORE_H__ + + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + #include <linux/semaphore.h> +-#else +-#include <asm/semaphore.h> +-#endif + + + /* +diff -ruN vmnet-only-patched/compat_wait.h vmnet-only-refixed/compat_wait.h +--- vmnet-only-patched/compat_wait.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/compat_wait.h 2009-04-21 18:16:24.000000000 +0300 +@@ -37,14 +37,12 @@ + * /dev/epoll interface was added. It was backported to the + * 2.4.20-wolk4.0s. + */ +- +-#ifdef VMW_HAVE_EPOLL // { ++#if VMW_HAVE_EPOLL // { + #define compat_poll_wqueues struct poll_wqueues + #else // } { + #define compat_poll_wqueues poll_table + #endif // } +- +-#ifdef VMW_HAVE_EPOLL // { ++#if VMW_HAVE_EPOLL // { + + /* If prototype does not match, build will abort here */ + extern void poll_initwait(compat_poll_wqueues *); +diff -ruN vmnet-only-patched/filter.c vmnet-only-refixed/filter.c +--- vmnet-only-patched/filter.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/filter.c 2008-07-24 18:21:23.000000000 +0300 +@@ -13,11 +13,9 @@ + #include "compat_skbuff.h" + #include <linux/netdevice.h> + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) +-# define NF_IP_LOCAL_OUT NF_INET_LOCAL_OUT +-# define NF_IP_LOCAL_IN NF_INET_LOCAL_IN +-# define NF_IP_POST_ROUTING NF_INET_POST_ROUTING +-#endif ++#define NF_IP_LOCAL_OUT NF_INET_LOCAL_OUT ++#define NF_IP_LOCAL_IN NF_INET_LOCAL_IN ++#define NF_IP_POST_ROUTING NF_INET_POST_ROUTING + + /* + * All this makes sense only if NETFILTER support is configured in our kernel. +diff -ruN vmnet-only-patched/Makefile vmnet-only-refixed/Makefile +--- vmnet-only-patched/Makefile 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/Makefile 2007-11-28 12:19:12.000000000 +0200 +@@ -15,7 +15,7 @@ + VM_UNAME = $(shell uname -r) + + # Header directory for the running kernel +-HEADER_DIR = ${KERNEL_DIR}/include ++HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include + + BUILD_DIR = $(HEADER_DIR)/.. + +diff -ruN vmnet-only-patched/Makefile.kernel vmnet-only-refixed/Makefile.kernel +--- vmnet-only-patched/Makefile.kernel 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/Makefile.kernel 2009-04-21 18:27:50.000000000 +0300 +@@ -12,7 +12,8 @@ + INCLUDE := -I$(SRCROOT) + + EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) +-EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) ++#EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) ++EXTRA_CFLAGS += -I$(HEADER_DIR) -DVMW_HAVE_EPOLL + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, ) +diff -ruN vmnet-only-patched/Makefile.normal vmnet-only-refixed/Makefile.normal +--- vmnet-only-patched/Makefile.normal 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/Makefile.normal 2009-04-21 18:28:04.000000000 +0300 +@@ -37,7 +37,8 @@ + | sed -n -e 's!^APATH!-I$(HEADER_DIR)/asm!p') + + CC_OPTS += -DVME_DEFAULT=$(VMWARE_VER) +-CC_OPTS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) ++#CC_OPTS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, ) ++EXTRA_CFLAGS += -I$(HEADER_DIR) -DVMW_HAVE_EPOLL + CC_OPTS += $(call vm_check_build, $(SRCROOT)/socket.c, -DVMW_HAVE_SK_WMEM_ALLOC, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, ) + CC_OPTS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, ) +diff -ruN vmnet-only-patched/Module.markers vmnet-only-refixed/Module.markers +--- vmnet-only-patched/Module.markers 1970-01-01 02:00:00.000000000 +0200 ++++ vmnet-only-refixed/Module.markers 2008-10-20 16:35:37.000000000 +0300 +@@ -0,0 +1,4 @@ ++core_marker_format vmlinux name %s format %s ++kernel_sched_schedule vmlinux prev_pid %d next_pid %d prev_state %ld ## rq %p prev %p next %p ++kernel_sched_wakeup vmlinux pid %d state %ld ## rq %p task %p rq->curr %p ++kernel_sched_wakeup_new vmlinux pid %d state %ld ## rq %p task %p rq->curr %p +diff -ruN vmnet-only-patched/modules.order vmnet-only-refixed/modules.order +--- vmnet-only-patched/modules.order 1970-01-01 02:00:00.000000000 +0200 ++++ vmnet-only-refixed/modules.order 2009-04-21 18:30:09.000000000 +0300 +@@ -0,0 +1 @@ ++kernel//home/kang/tmp/vmware-update-2.6.27-5.5.7-2/vmnet-only/vmnet.ko +diff -ruN vmnet-only-patched/netif.c vmnet-only-refixed/netif.c +--- vmnet-only-patched/netif.c 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/netif.c 2009-04-21 18:03:24.000000000 +0300 +@@ -310,7 +310,7 @@ + goto out; + } + +- dev->priv = netIf; ++ dev->ml_priv = netIf; + netIf->dev = dev; + + memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr); +@@ -552,7 +552,7 @@ + VNetNetifStartXmit(struct sk_buff *skb, // IN: + struct net_device *dev) // IN: + { +- VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++ VNetNetIF *netIf = (VNetNetIF*)dev->ml_priv; + + if(skb == NULL) { + return 0; +@@ -604,7 +604,7 @@ + VNetNetifSetMAC(struct net_device *dev, // IN: + void *p) // IN: + { +- VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++ VNetNetIF *netIf = (VNetNetIF*)dev->ml_priv; + struct sockaddr const *addr = p; + if (!VMX86_IS_STATIC_MAC(addr->sa_data)) { + return -EINVAL; +@@ -661,7 +661,7 @@ + struct net_device_stats * + VNetNetifGetStats(struct net_device *dev) // IN: + { +- VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++ VNetNetIF *netIf = (VNetNetIF*)dev->ml_priv; + return &(netIf->stats); + } + +diff -ruN vmnet-only-patched/vmnetInt.h vmnet-only-refixed/vmnetInt.h +--- vmnet-only-patched/vmnetInt.h 2009-07-08 16:21:02.000000000 +0300 ++++ vmnet-only-refixed/vmnetInt.h 2008-07-24 18:31:28.000000000 +0300 +@@ -63,11 +63,7 @@ + # define dev_lock_list() read_lock(&dev_base_lock) + # define dev_unlock_list() read_unlock(&dev_base_lock) + # ifdef VMW_NETDEV_HAS_NET +-# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) +-# define DEV_GET(x) __dev_get_by_name((x)->internalDev->nd_net, (x)->name) +-# else + # define DEV_GET(x) __dev_get_by_name(dev_net((x)->internalDev), (x)->name) +-# endif + # else + # define DEV_GET(x) __dev_get_by_name((x)->name) + # endif +@@ -91,13 +87,8 @@ + + #ifdef VMW_NETDEV_HAS_NET + extern struct proto vmnet_proto; +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + # define compat_sk_alloc(_bri, _pri) sk_alloc(dev_net((_bri)->internalDev), \ + PF_NETLINK, _pri, &vmnet_proto) +-# else +-# define compat_sk_alloc(_bri, _pri) sk_alloc((_bri)->internalDev->nd_net, \ +- PF_NETLINK, _pri, &vmnet_proto) +-# endif + #elif defined(VMW_HAVE_SK_ALLOC_WITH_PROTO) + extern struct proto vmnet_proto; + # define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) +diff -ruN vmnet-only-patched/vmnetInt.h.orig vmnet-only-refixed/vmnetInt.h.orig +--- vmnet-only-patched/vmnetInt.h.orig 1970-01-01 02:00:00.000000000 +0200 ++++ vmnet-only-refixed/vmnetInt.h.orig 2007-11-28 12:25:06.000000000 +0200 +@@ -0,0 +1,144 @@ ++/* ********************************************************** ++ * Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential ++ * **********************************************************/ ++ ++#ifndef __VMNETINT_H__ ++#define __VMNETINT_H__ ++ ++ ++#define INCLUDE_ALLOW_MODULE ++#include "includeCheck.h" ++#include "driver-config.h" ++ ++ ++/* ++ * Hide all kernel compatibility stuff in those macros ++ */ ++ ++/* All kernels above 2.6.23 have net namespaces. */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && !defined(VMW_NETDEV_HAS_NET) ++# define VMW_NETDEV_HAS_NET ++#endif ++ ++/* All kernels above 2.6.23 have skb argument in nf_hookfn. */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && !defined(VMW_NFHOOK_USES_SKB) ++# define VMW_NFHOOK_USES_SKB ++#endif ++ ++ ++#ifdef KERNEL_2_4_0 ++# define compat_fop_set_owner(_pFop) do { \ ++ (_pFop)->owner = THIS_MODULE; \ ++} while (0) ++# define compat_mod_inc_refcount ++# define compat_mod_dec_refcount ++#else ++# define compat_fop_set_owner(_pFop) ++# define compat_mod_inc_refcount do { \ ++ MOD_INC_USE_COUNT; \ ++} while (0) ++# define compat_mod_dec_refcount do { \ ++ MOD_DEC_USE_COUNT; \ ++} while (0) ++#endif ++ ++ ++#ifdef skb_shinfo ++# define SKB_IS_CLONE_OF(clone, skb) ( \ ++ skb_shinfo(clone) == skb_shinfo(skb) \ ++ ) ++#else ++# define SKB_IS_CLONE_OF(clone, skb) ( \ ++ skb_datarefp(clone) == skb_datarefp(skb) \ ++ ) ++#endif ++#define DEV_QUEUE_XMIT(skb, dev, pri) ( \ ++ (skb)->dev = (dev), \ ++ (skb)->priority = (pri), \ ++ compat_skb_reset_mac_header(skb), \ ++ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ ++ dev_queue_xmit(skb) \ ++ ) ++#ifdef KERNEL_2_3_15 ++# define dev_lock_list() read_lock(&dev_base_lock) ++# define dev_unlock_list() read_unlock(&dev_base_lock) ++# ifdef VMW_NETDEV_HAS_NET ++# define DEV_GET(x) __dev_get_by_name((x)->internalDev->nd_net, (x)->name) ++# else ++# define DEV_GET(x) __dev_get_by_name((x)->name) ++# endif ++#else ++# define DEV_GET(x) dev_get((x)->name) ++#endif ++ ++ ++/* ++ * Various fields (including 'dead') of struct sock are replaced with the ++ * 'flags' bitfield in 2.5.65 --hpreg ++ */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 65) ++# define SET_SK_DEAD(_sk, _val) (_sk)->dead = (_val) ++#else ++# define SET_SK_DEAD(_sk, _val) sock_valbool_flag(_sk, SOCK_DEAD, _val) ++#endif ++ ++ ++#ifdef VMW_NETDEV_HAS_NET ++extern struct proto vmnet_proto; ++# define compat_sk_alloc(_bri, _pri) sk_alloc((_bri)->internalDev->nd_net, \ ++ PF_NETLINK, _pri, &vmnet_proto) ++#elif defined(VMW_HAVE_SK_ALLOC_WITH_PROTO) ++extern struct proto vmnet_proto; ++# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, &vmnet_proto, 1) ++#elif defined(KERNEL_2_5_5) ++# define compat_sk_alloc(_bri, _pri) sk_alloc(PF_NETLINK, _pri, 1, NULL) ++#else ++# define compat_sk_alloc(_bri, _pri) sk_alloc(0, _pri, 1) ++#endif ++ ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++# define fileTraversalLock(lock) spin_lock(lock) ++# define fileTraversalUnLock(lock) spin_unlock(lock) ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) ++# define fileTraversalLock(lock) read_lock(lock) ++# define fileTraversalUnLock(lock) read_unlock(lock) ++#else //2.2 kernels ++# define fileTraversalLock(lock) lock_kernel() ++# define fileTraversalUnLock(lock) unlock_kernel() ++#endif ++ ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) ++# define taskLock(lock) task_lock(lock) ++# define taskUnLock(lock) task_unlock(lock) ++#else //2.2 kernels ++# define taskLock(lock) lock_kernel() ++# define taskUnLock(lock) unlock_kernel() ++#endif ++ ++ ++/* ++ * Use CHECKSUM_HW for old kernels, if they have CHECKSUM_HW. Use CHECKSUM_PARTIAL for ++ * new ones even if CHECKSUM_HW is defined. We do not do decision based on kernel version ++ * only as CHECKSUM_PARTIAL was in mm tree for some time already, and we do not test ++ * for CHECKSUM_PARTIAL existence as it may get converted to enum in future. ++ */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) && defined(CHECKSUM_HW) ++# define VM_CHECKSUM_PARTIAL CHECKSUM_HW ++#else ++# define VM_CHECKSUM_PARTIAL CHECKSUM_PARTIAL ++#endif ++ ++ ++/* ++ * The "owner" field in nf_hook_ops got added in 2.5.69 ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 69) ++# define compat_nf_hook_owner .owner = THIS_MODULE, ++#else ++# define compat_nf_hook_owner ++#endif ++ ++ ++#endif /* __VMNETINT_H__ */ diff --git a/app-emulation/vmware-modules/files/patches/vmnet/050_all_kernel-2.6.30.patch b/app-emulation/vmware-modules/files/patches/vmnet/050_all_kernel-2.6.30.patch new file mode 100644 index 0000000..9ba99db --- /dev/null +++ b/app-emulation/vmware-modules/files/patches/vmnet/050_all_kernel-2.6.30.patch @@ -0,0 +1,37 @@ +diff -Naur vmnet-only_orig/netif.c vmnet-only/netif.c +--- vmnet-only_orig/netif.c 2009-09-19 22:04:15.000000000 +0200 ++++ vmnet-only/netif.c 2009-09-19 22:10:25.000000000 +0200 +@@ -218,10 +218,25 @@ + *---------------------------------------------------------------------- + */ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) ++static const struct net_device_ops vnet_netdev_ops = { ++ .ndo_init = VNetNetifProbe, ++ .ndo_open = VNetNetifOpen, ++ .ndo_start_xmit = VNetNetifStartXmit, ++ .ndo_stop = VNetNetifClose, ++ .ndo_get_stats = VNetNetifGetStats, ++ .ndo_set_mac_address = VNetNetifSetMAC, ++ .ndo_set_multicast_list = VNetNetifSetMulticast, ++}; ++#endif ++ + static void + VNetNetIfSetup(struct net_device *dev) // IN: + { + ether_setup(dev); // turns on IFF_BROADCAST, IFF_MULTICAST ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) ++ dev->netdev_ops = &vnet_netdev_ops; ++#else + dev->init = VNetNetifProbe; + dev->open = VNetNetifOpen; + dev->hard_start_xmit = VNetNetifStartXmit; +@@ -229,6 +244,7 @@ + dev->get_stats = VNetNetifGetStats; + dev->set_mac_address = VNetNetifSetMAC; + dev->set_multicast_list = VNetNetifSetMulticast; ++#endif + #ifdef KERNEL_2_3_43 + /* + * We cannot stuck... If someone will report problems under diff --git a/app-emulation/vmware-modules/files/vmware-server.2.0.1_x64-modules-2.6.30-fix.patch b/app-emulation/vmware-modules/files/vmware-server.2.0.1_x64-modules-2.6.30-fix.patch new file mode 100644 index 0000000..53146d3 --- /dev/null +++ b/app-emulation/vmware-modules/files/vmware-server.2.0.1_x64-modules-2.6.30-fix.patch @@ -0,0 +1,264 @@ +diff -Naur ./vmci-only/Makefile.org ./vmci-only/Makefile +--- ./vmci-only/Makefile.org 2009-06-16 14:05:27.466108603 +0200 ++++ ./vmci-only/Makefile 2009-06-16 14:06:46.661080248 +0200 +@@ -113,7 +113,7 @@ + + vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \ + $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \ +- $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \ ++ $(EXTRA_CFLAGS) -I$(HEADER_DIR) -Iinclude2/asm/mach-default \ + -DKBUILD_BASENAME=\"$(DRIVER)\" \ + -Werror -S -o /dev/null -xc $(1) \ + > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi) +diff -Naur ./vmmon-only/linux/driver.c.org ./vmmon-only/linux/driver.c +--- ./vmmon-only/linux/driver.c.org 2009-06-16 14:00:30.039078851 +0200 ++++ ./vmmon-only/linux/driver.c 2009-06-16 14:09:41.715105671 +0200 +@@ -1984,10 +1984,17 @@ + } + + case IOCTL_VMX86_ALLOW_CORE_DUMP: ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) + if (current->euid == current->uid && + current->fsuid == current->uid && + current->egid == current->gid && + current->fsgid == current->gid) { ++#else ++ if (current_euid() == current_uid() && ++ current_fsuid() == current_uid() && ++ current_egid() == current_gid() && ++ current_fsgid() == current_gid()) { ++#endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) || defined(MMF_DUMPABLE) + /* Dump core, readable by user. */ + set_bit(MMF_DUMPABLE, ¤t->mm->flags); +diff -Naur ./vmmon-only/linux/hostif.c.org ./vmmon-only/linux/hostif.c +--- ./vmmon-only/linux/hostif.c.org 2009-06-16 14:00:44.806106788 +0200 ++++ ./vmmon-only/linux/hostif.c 2009-06-16 14:18:30.693079131 +0200 +@@ -3422,6 +3422,86 @@ + } + return -ENOIOCTLCMD; + } ++/* krellan: Linux 2.6.29 compatibility functions for capabilities */ ++/* Errors are logged but otherwise ignored */ ++ ++void compat_cap_raise(int cap) ++{ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++ cap_raise(current->cap_effective, cap); ++#else ++ struct cred *new_cred; ++ ++ new_cred = prepare_creds(); ++ if (new_cred != NULL) ++ { ++ cap_raise(new_cred->cap_effective, cap); ++ commit_creds(new_cred); ++ } ++ else ++ { ++ Log("compat_cap_raise(%d) prepare_creds(): Out of memory\n", cap); ++ } ++#endif ++} ++ ++void compat_cap_lower(int cap) ++{ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++ cap_lower(current->cap_effective, cap); ++#else ++ struct cred *new_cred; ++ ++ new_cred = prepare_creds(); ++ if (new_cred != NULL) ++ { ++ cap_lower(new_cred->cap_effective, cap); ++ commit_creds(new_cred); ++ } ++ else ++ { ++ Log("compat_cap_lower(%d) prepare_creds(): Out of memory\n", cap); ++ } ++#endif ++} ++ ++int compat_cap_raised(int cap) ++{ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++ return cap_raised(current->cap_effective, cap); ++#else ++ return cap_raised(current_cap(), cap); ++#endif ++} ++ ++int compat_get_fsuid(void) ++{ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++ return current->fsuid; ++#else ++ return current_fsuid(); ++#endif ++} ++ ++void compat_set_fsuid(int fsuid) ++{ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++ current->fsuid = fsuid; ++#else ++ struct cred *new_cred; ++ ++ new_cred = prepare_creds(); ++ if (new_cred != NULL) ++ { ++ new_cred->fsuid = fsuid; ++ commit_creds(new_cred); ++ } ++ else ++ { ++ Log("compat_set_fsuid(%d) prepare_creds(): Out of memory\n", fsuid); ++ } ++#endif ++} + + + /* +@@ -3456,7 +3536,7 @@ + oldFS = get_fs(); + set_fs(KERNEL_DS); + compat_allow_signal(SIGKILL); +- cap_raise(current->cap_effective, CAP_SYS_RESOURCE); ++ compat_cap_raise(CAP_SYS_RESOURCE); + compat_set_user_nice(current, linuxState.fastClockPriority); + + while (linuxState.fastClockRate > HZ + HZ/16) { +@@ -3580,19 +3660,19 @@ + Bool cap; + long pid; + +- fsuid = current->fsuid; +- current->fsuid = 0; ++ fsuid = compat_get_fsuid(); ++ compat_set_fsuid(0); + filp = filp_open("/dev/rtc", O_RDONLY, 0); +- current->fsuid = fsuid; ++ compat_set_fsuid(fsuid); + if (IS_ERR(filp)) { + Warning("/dev/rtc open failed: %d\n", (int)(VA)filp); + return -(int)(VA)filp; + } +- cap = cap_raised(current->cap_effective, CAP_SYS_RESOURCE); +- cap_raise(current->cap_effective, CAP_SYS_RESOURCE); ++ cap = compat_cap_raised(CAP_SYS_RESOURCE); ++ compat_cap_raise(CAP_SYS_RESOURCE); + res = HostIFDoIoctl(filp, RTC_PIE_ON, 0); + if (!cap) { +- cap_lower(current->cap_effective, CAP_SYS_RESOURCE); ++ compat_cap_lower(CAP_SYS_RESOURCE); + } + if (res < 0) { + Warning("/dev/rtc enable interrupt failed: %d\n", res); +diff -Naur ./vmmon-only/include/x86svm.h.org ./vmmon-only/include/x86svm.h +--- ./vmmon-only/include/x86svm.h.org 2009-06-16 14:00:11.623087791 +0200 ++++ ./vmmon-only/include/x86svm.h 2009-06-16 14:04:32.344079689 +0200 +@@ -47,11 +47,14 @@ + #endif + + /* SVM related MSRs */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + #define MSR_VM_CR 0xC0010114 ++#endif + #define MSR_IGNNE 0xC0010115 + #define MSR_SMM_CTL 0xC0010116 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + #define MSR_VM_HSAVE_PA 0xC0010117 +- ++#endif + #define MSR_VM_CR_SVM_LOCK 0x0000000000000008ULL + #define MSR_VM_CR_SVME_DISABLE 0x0000000000000010ULL + +diff -Naur ./vmmon-only/Makefile.org ./vmmon-only/Makefile +--- ./vmmon-only/Makefile.org 2009-06-16 14:00:54.300080038 +0200 ++++ ./vmmon-only/Makefile 2009-06-16 14:19:28.907079550 +0200 +@@ -113,7 +113,7 @@ + + vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \ + $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \ +- $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \ ++ $(EXTRA_CFLAGS) -I$(HEADER_DIR) -Iinclude2/asm/mach-default \ + -DKBUILD_BASENAME=\"$(DRIVER)\" \ + -Werror -S -o /dev/null -xc $(1) \ + > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi) +diff -Naur ./vmnet-only/Makefile.org ./vmnet-only/Makefile +--- ./vmnet-only/Makefile.org 2009-06-16 14:20:46.281079270 +0200 ++++ ./vmnet-only/Makefile 2009-06-16 14:21:26.569080038 +0200 +@@ -113,7 +113,7 @@ + + vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \ + $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \ +- $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \ ++ $(EXTRA_CFLAGS) -I$(HEADER_DIR) -Iinclude2/asm/mach-default \ + -DKBUILD_BASENAME=\"$(DRIVER)\" \ + -Werror -S -o /dev/null -xc $(1) \ + > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi) +diff -Naur ./vmnet-only/netif.c.org ./vmnet-only/netif.c +--- ./vmnet-only/netif.c.org 2009-06-16 14:21:54.638079619 +0200 ++++ ./vmnet-only/netif.c 2009-06-16 14:26:07.010079969 +0200 +@@ -324,7 +324,11 @@ + goto out; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) + dev->priv = netIf; ++#else ++ dev->ml_priv = netIf; ++#endif + netIf->dev = dev; + + memcpy(dev->dev_addr, netIf->port.paddr, sizeof netIf->port.paddr); +@@ -566,7 +570,11 @@ + VNetNetifStartXmit(struct sk_buff *skb, // IN: + struct net_device *dev) // IN: + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) + VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++#else ++ VNetNetIF *netIf = (VNetNetIF*)dev->ml_priv; ++#endif + + if(skb == NULL) { + return 0; +@@ -618,7 +626,11 @@ + VNetNetifSetMAC(struct net_device *dev, // IN: + void *p) // IN: + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) + VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++#else ++ VNetNetIF *netIf = (VNetNetIF*)dev->ml_priv; ++#endif + struct sockaddr const *addr = p; + if (!VMX86_IS_STATIC_MAC(addr->sa_data)) { + return -EINVAL; +@@ -675,7 +687,11 @@ + struct net_device_stats * + VNetNetifGetStats(struct net_device *dev) // IN: + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) + VNetNetIF *netIf = (VNetNetIF*)dev->priv; ++#else ++ VNetNetIF *netIf = (VNetNetIF*)dev->ml_priv; ++#endif + return &(netIf->stats); + } + +diff -Naur ./vsock-only/Makefile.org ./vsock-only/Makefile +--- ./vsock-only/Makefile.org 2009-06-16 14:26:28.696079689 +0200 ++++ ./vsock-only/Makefile 2009-06-16 14:27:11.486078991 +0200 +@@ -113,7 +113,7 @@ + + vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \ + $(CPPFLAGS) $(CFLAGS) $(CFLAGS_KERNEL) \ +- $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \ ++ $(EXTRA_CFLAGS) -I$(HEADER_DIR) -Iinclude2/asm/mach-default \ + -DKBUILD_BASENAME=\"$(DRIVER)\" \ + -Werror -S -o /dev/null -xc $(1) \ + > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi) diff --git a/app-emulation/vmware-modules/metadata.xml b/app-emulation/vmware-modules/metadata.xml new file mode 100644 index 0000000..9deb311 --- /dev/null +++ b/app-emulation/vmware-modules/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>vmware</herd> + <maintainer> + <email>vadimk@gentoo.org</email> + </maintainer> + <longdescription> + VMware kernel modules. + </longdescription> +</pkgmetadata> diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.15-r3.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.15-r3.ebuild new file mode 100644 index 0000000..87c0c50 --- /dev/null +++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.15-r3.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.15-r2.ebuild,v 1.2 2009/01/11 22:08:54 maekke Exp $ + +KEYWORDS="amd64 x86" +VMWARE_VER="VME_S1B1" +IUSE="" + +inherit vmware-mod + +pkg_setup() { + if kernel_is lt 2 6 25; then + CONFIG_CHECK="" + else + CONFIG_CHECK="UNUSED_SYMBOLS" + fi + vmware-mod_pkg_setup +} |