summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vmware-modules/Manifest3
-rw-r--r--app-emulation/vmware-modules/files/hardened.patch170
-rw-r--r--app-emulation/vmware-modules/vmware-modules-264.2.ebuild3
3 files changed, 174 insertions, 2 deletions
diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest
index 9143e23..ba62c16 100644
--- a/app-emulation/vmware-modules/Manifest
+++ b/app-emulation/vmware-modules/Manifest
@@ -16,6 +16,7 @@ AUX 264-makefile-kernel-dir.patch 2201 RMD160 22b81e2c3c347ac6bad3afef15eea31250
AUX 264-netdevice.patch 833 RMD160 552fa78378ac721865a0629a4a29318a11e6b1bd SHA1 16d95a575ea14de67d11f4faf72842c3edb96dea SHA256 8f17ce379abda45a8f94e1dcd6e43367273f97f76edd41f9941beb3b1730a751
AUX 264.2-3.2.0.patch 2949 RMD160 e343db72eeb80e43ab5fbd5b4c2efebcb81c2c5e SHA1 bf88b0be9fcdc9705de846452d44833e0b146c11 SHA256 4105952362a9bf8a054df1c23f2562e86f79b3bef70696422548c01db248c1b0
AUX apic.patch 294 RMD160 ab0d6fea359f66ccd735cd3bc830442f6f6baa39 SHA1 537f1a903b94ea379003cf4e50c9507ae403c595 SHA256 6902f8dd82d48f479a3e5647e3bd7125d073f242dd85a5b2ddfd51f4ea8f663c
+AUX hardened.patch 5052 RMD160 818caeb51a5fa7aae556e465beadc0ff684b54a7 SHA1 8a5feac39756fd476c087af247e853b0321a4823 SHA256 191cf892bfb9a6288d110191de824bf6243bc6f48f1e62ab49f3582c7ade5af6
AUX iommu_map.patch 1630 RMD160 b403a19350d3a73e6ecf74159763b31d6d20b630 SHA1 d021dbbdb59273048806c09b8f59bd97a8883017 SHA256 6253ba1c6bd211d68e79ce9e811cdcc60ebc022a7787874922db552b32ef2b09
AUX sk_sleep.patch 6937 RMD160 e15642e34906138278563d57e9647e4e579d437e SHA1 ce9a3e9069bb85cb9793c59d38ad4f217ba8d5b2 SHA256 67a019290204b36410996ecd1bbe4e630b2022970ddb236a120abf1b810f05b4
DIST vmware-modules-138.10-genpatches-7.tar.bz2 14498 RMD160 a6927bad3eb2b797eb5d8d2a90c6447ebb1fd709 SHA1 57a1524149f976bccfbc0789cd40863f1ab012f0 SHA256 2b3209e71543904eb39919b3da19df4b1c702b00e5f2def9c9d53b3ca9b7e2b6
@@ -23,5 +24,5 @@ DIST vmware-modules-208.2.patch.bz2 7239 RMD160 f66781709bb18dc370717c32fa72b290
EBUILD vmware-modules-138.10.7.ebuild 1825 RMD160 3e4999c91f97217815c9d8ad852a63f0d452995d SHA1 c2bd1e62e0418f62b5f62261811734ba9e8f34b2 SHA256 573f1080031bf394cde783ef5d574da7934546d586e3dc942037fde0b1d2e6be
EBUILD vmware-modules-208.2.ebuild 1861 RMD160 6641f57a7906ff1eb243e14561c37475eda6d910 SHA1 aab9187681ca6b88b4178b98d259116130c39037 SHA256 140d78cc98da4cd19a24d593bec01417793592212273d632adfc465fe80ff311
EBUILD vmware-modules-238.5.ebuild 2087 RMD160 4ce59dbfcd91b1c7fb7890db44598b712bd4a167 SHA1 81b125573edfa561de02b9f8c4dd4dd96a44002b SHA256 25544d4c0c21e3ccd72f6730a9336487e5020c743bfa400c01d5c0623a504f2f
-EBUILD vmware-modules-264.2.ebuild 1941 RMD160 ad9cc388f6d82f8b7f33f9a3032036aed448be0f SHA1 95d3da2a3f25625ba6497a42fe4f06008fa2782a SHA256 3813bf34959246399ebaf64aac5bdb5ff746b9b39a4b739a1dc3a3b98fd96b5c
+EBUILD vmware-modules-264.2.ebuild 2002 RMD160 f22df59a56b628866e97c25aa0cb86f4bbba66f4 SHA1 9b58cb8c562c762b44f5bb2b2dce58234f173d38 SHA256 3b29b808d758ea9e452104695652b8a2526dd1f3aecbf005d247b617cb768c50
MISC metadata.xml 159 RMD160 fc7f68a382390e5916b0fb43f37a893fad4f9798 SHA1 f46b02a39bcd0165558de67ff4256cfc812418a3 SHA256 8581ae1c90a48f50fa0542c7fb28cb8984baaf12f50fa18f33e467081effb215
diff --git a/app-emulation/vmware-modules/files/hardened.patch b/app-emulation/vmware-modules/files/hardened.patch
new file mode 100644
index 0000000..ea1b0f3
--- /dev/null
+++ b/app-emulation/vmware-modules/files/hardened.patch
@@ -0,0 +1,170 @@
+diff --git a/vmci-only/linux/driver.c b/vmci-only/linux/driver.c
+index 921f25c..41a39e3 100644
+--- a/vmci-only/linux/driver.c
++++ b/vmci-only/linux/driver.c
+@@ -241,7 +241,24 @@ static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
+ #define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0)
+ #endif
+
+-static struct file_operations vmuser_fops;
++/*
++ * Moved file operations initialize here because of incompatibilites
++ * with Gentoo hardened profile/hardend Linux 3.
++ */
++static struct file_operations vmuser_fops = {
++ .owner = THIS_MODULE,
++ .poll = LinuxDriverPoll,
++#ifdef HAVE_UNLOCKED_IOCTL
++ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
++#else
++ .ioctl = LinuxDriver_Ioctl,
++#endif
++#ifdef HAVE_COMPAT_IOCTL
++ .compat_ioctl = LinuxDriver_UnlockedIoctl,
++#endif
++ .open = LinuxDriver_Open,
++ .release = LinuxDriver_Close
++};
+
+
+ /*
+@@ -378,26 +395,6 @@ vmci_host_init(void)
+ return -ENOMEM;
+ }
+
+- /*
+- * Initialize the file_operations structure. Because this code is always
+- * compiled as a module, this is fine to do it here and not in a static
+- * initializer.
+- */
+-
+- memset(&vmuser_fops, 0, sizeof vmuser_fops);
+- vmuser_fops.owner = THIS_MODULE;
+- vmuser_fops.poll = LinuxDriverPoll;
+-#ifdef HAVE_UNLOCKED_IOCTL
+- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
+-#else
+- vmuser_fops.ioctl = LinuxDriver_Ioctl;
+-#endif
+-#ifdef HAVE_COMPAT_IOCTL
+- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
+-#endif
+- vmuser_fops.open = LinuxDriver_Open;
+- vmuser_fops.release = LinuxDriver_Close;
+-
+ sprintf(linuxState.deviceName, "vmci");
+ linuxState.major = 10;
+ linuxState.misc.minor = MISC_DYNAMIC_MINOR;
+diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
+index b21dd44..960c2aa 100644
+--- a/vmmon-only/linux/driver.c
++++ b/vmmon-only/linux/driver.c
+@@ -178,7 +178,22 @@ static struct vm_operations_struct vmuser_mops = {
+ #endif
+ };
+
+-static struct file_operations vmuser_fops;
++static struct file_operations vmuser_fops = {
++ .owner = THIS_MODULE,
++ .poll = LinuxDriverPoll,
++#ifdef HAVE_UNLOCKED_IOCTL
++ .unlocked_ioctl = LinuxDriver_UnlockedIoctl,
++#else
++ .ioctl = LinuxDriver_Ioctl,
++#endif
++#ifdef HAVE_COMPAT_IOCTL
++ .compat_ioctl = LinuxDriver_UnlockedIoctl,
++#endif
++ .open = LinuxDriver_Open,
++ .release = LinuxDriver_Close,
++ .mmap = LinuxDriverMmap
++};
++
+ static struct timer_list tscTimer;
+
+ /*
+@@ -357,27 +372,6 @@ init_module(void)
+ spin_lock_init(&linuxState.pollListLock);
+ #endif
+
+- /*
+- * Initialize the file_operations structure. Because this code is always
+- * compiled as a module, this is fine to do it here and not in a static
+- * initializer.
+- */
+-
+- memset(&vmuser_fops, 0, sizeof vmuser_fops);
+- vmuser_fops.owner = THIS_MODULE;
+- vmuser_fops.poll = LinuxDriverPoll;
+-#ifdef HAVE_UNLOCKED_IOCTL
+- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl;
+-#else
+- vmuser_fops.ioctl = LinuxDriver_Ioctl;
+-#endif
+-#ifdef HAVE_COMPAT_IOCTL
+- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl;
+-#endif
+- vmuser_fops.open = LinuxDriver_Open;
+- vmuser_fops.release = LinuxDriver_Close;
+- vmuser_fops.mmap = LinuxDriverMmap;
+-
+ #ifdef VMX86_DEVEL
+ devel_init_module();
+ linuxState.minor = 0;
+diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
+index b12b982..40bd4cf 100644
+--- a/vmnet-only/driver.c
++++ b/vmnet-only/driver.c
+@@ -165,7 +165,22 @@ static long VNetFileOpUnlockedIoctl(struct file * filp,
+ unsigned int iocmd, unsigned long ioarg);
+ #endif
+
+-static struct file_operations vnetFileOps;
++static struct file_operations vnetFileOps = {
++ .owner = THIS_MODULE,
++ .read = VNetFileOpRead,
++ .write = VNetFileOpWrite,
++ .poll = VNetFileOpPoll,
++#ifdef HAVE_UNLOCKED_IOCTL
++ .unlocked_ioctl = VNetFileOpUnlockedIoctl,
++#else
++ .ioctl = VNetFileOpIoctl,
++#endif
++#ifdef HAVE_COMPAT_IOCTL
++ .compat_ioctl = VNetFileOpUnlockedIoctl,
++#endif
++ .open = VNetFileOpOpen,
++ .release = VNetFileOpClose
++};
+
+ /*
+ * Utility functions
+@@ -476,28 +491,6 @@ init_module(void)
+ goto err_proto;
+ }
+
+- /*
+- * Initialize the file_operations structure. Because this code is always
+- * compiled as a module, this is fine to do it here and not in a static
+- * initializer.
+- */
+-
+- memset(&vnetFileOps, 0, sizeof vnetFileOps);
+- vnetFileOps.owner = THIS_MODULE;
+- vnetFileOps.read = VNetFileOpRead;
+- vnetFileOps.write = VNetFileOpWrite;
+- vnetFileOps.poll = VNetFileOpPoll;
+-#ifdef HAVE_UNLOCKED_IOCTL
+- vnetFileOps.unlocked_ioctl = VNetFileOpUnlockedIoctl;
+-#else
+- vnetFileOps.ioctl = VNetFileOpIoctl;
+-#endif
+-#ifdef HAVE_COMPAT_IOCTL
+- vnetFileOps.compat_ioctl = VNetFileOpUnlockedIoctl;
+-#endif
+- vnetFileOps.open = VNetFileOpOpen;
+- vnetFileOps.release = VNetFileOpClose;
+-
+ retval = register_chrdev(VNET_MAJOR_NUMBER, "vmnet", &vnetFileOps);
+ if (retval) {
+ LOG(0, (KERN_NOTICE "/dev/vmnet: could not register major device %d\n",
diff --git a/app-emulation/vmware-modules/vmware-modules-264.2.ebuild b/app-emulation/vmware-modules/vmware-modules-264.2.ebuild
index bf691ec..c75d111 100644
--- a/app-emulation/vmware-modules/vmware-modules-264.2.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-264.2.ebuild
@@ -17,7 +17,7 @@ SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="hardened"
RDEPEND=""
DEPEND="${RDEPEND}
@@ -64,6 +64,7 @@ src_prepare() {
epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch"
epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch"
epatch "${FILESDIR}/${PV}-3.2.0.patch"
+ use hardened && epatch "${FILESDIR}/hardened.patch"
}
src_install() {