diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2013-10-19 11:42:47 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2013-10-19 11:42:47 +0000 |
commit | ad864a2261014cc1c27748689ad323bac50c5e73 (patch) | |
tree | 926569b65d10eeaf7d3e3e8ab2278f3e4d22d82a /app-emulation/vmware-modules | |
parent | Bump regex-pcre-builtin to 0.94.4.7.8.31 (diff) | |
download | gentoo-2-ad864a2261014cc1c27748689ad323bac50c5e73.tar.gz gentoo-2-ad864a2261014cc1c27748689ad323bac50c5e73.tar.bz2 gentoo-2-ad864a2261014cc1c27748689ad323bac50c5e73.zip |
Version bump, added without keywords for testing. Bug 484098. Thanks to Billy DeVincentis for the files.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key EBE6A336BE19039C!)
Diffstat (limited to 'app-emulation/vmware-modules')
9 files changed, 1130 insertions, 1 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog index c4931a6318df..1f02d226ed80 100644 --- a/app-emulation/vmware-modules/ChangeLog +++ b/app-emulation/vmware-modules/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for app-emulation/vmware-modules # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.107 2013/08/11 17:24:06 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.108 2013/10/19 11:42:47 dilfridge Exp $ + +*vmware-modules-279.0 (19 Oct 2013) + + 19 Oct 2013; Andreas K. Huettel <dilfridge@gentoo.org> + +files/279-3.10.0.patch, +files/279-apic.patch, + +files/279-makefile-include.patch, +files/279-makefile-kernel-dir.patch, + +files/279-netdevice.patch, +files/279-putname.patch, + +files/279-vmblock.patch, +vmware-modules-279.0.ebuild: + Version bump, added without keywords for testing. Bug 484098. Thanks to Billy + DeVincentis for the files. 11 Aug 2013; Andreas K. Huettel <dilfridge@gentoo.org> +files/264-3.10.0.patch, +files/271-3.10.0.patch, diff --git a/app-emulation/vmware-modules/files/279-3.10.0.patch b/app-emulation/vmware-modules/files/279-3.10.0.patch new file mode 100644 index 000000000000..7795b18f5d7e --- /dev/null +++ b/app-emulation/vmware-modules/files/279-3.10.0.patch @@ -0,0 +1,809 @@ +--- a/vmnet-only/bridge.c ++++ b/vmnet-only/bridge.c +@@ -105,8 +105,6 @@ static Bool VNetBridgeCycleDetect(VNetJack *this, int generation); + static Bool VNetBridgeIsDeviceWireless(struct net_device *dev); + static void VNetBridgePortsChanged(VNetJack *this); + static int VNetBridgeIsBridged(VNetJack *this); +-static int VNetBridgeProcRead(char *page, char **start, off_t off, +- int count, int *eof, void *data); + static void VNetBridgeComputeHeaderPosIPv6(struct sk_buff *skb); + static PacketStatus VNetCallSMACFunc(struct SMACState *state, + struct sk_buff **skb, void *startOfData, +@@ -225,6 +223,53 @@ VNetBridgeDevCompatible(VNetBridge *bridge, // IN: Bridge + /* + *---------------------------------------------------------------------- + * ++ * VNetBridgeProcShow -- ++ * ++ * Callback for read operation on this bridge entry in vnets proc fs. ++ * ++ * Results: ++ * Length of read operation. ++ * ++ * Side effects: ++ * None. ++ * ++ *---------------------------------------------------------------------- ++ */ ++ ++int ++VNetBridgeProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into ++ void *data) // IN: client data - pointer to bridge ++{ ++ VNetBridge *bridge = (VNetBridge*)data; ++ ++ if (!bridge) { ++ return 0; ++ } ++ ++ VNetPrintPort(&bridge->port, seqf); ++ ++ seq_printf(seqf, "dev %s ", bridge->name); ++ ++ seq_printf(seqf, "\n"); ++ ++ return 0; ++} ++ ++static int proc_bridge_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, VNetBridgeProcShow, PDE_DATA(inode)); ++} ++ ++static const struct file_operations proc_bridge_fops = { ++ .open = proc_bridge_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = seq_release, ++}; ++ ++/* ++ *---------------------------------------------------------------------- ++ * + * VNetBridge_Create -- + * + * Creates a bridge. Allocates struct, allocates internal device, +@@ -319,17 +364,14 @@ VNetBridge_Create(const char *devName, // IN: name of device (e.g., "eth0") + * Make proc entry for this jack. + */ + +- retval = VNetProc_MakeEntry(bridge->port.jack.name, S_IFREG, +- &bridge->port.jack.procEntry); ++ retval = VNetProc_MakeEntryOps(bridge->port.jack.name, S_IFREG, ++ &bridge->port.jack.procEntry, &proc_bridge_fops, bridge); + if (retval) { + if (retval == -ENXIO) { + bridge->port.jack.procEntry = NULL; + } else { + goto out; + } +- } else { +- bridge->port.jack.procEntry->read_proc = VNetBridgeProcRead; +- bridge->port.jack.procEntry->data = bridge; + } + + /* +@@ -1719,45 +1761,3 @@ VNetBridgeReceiveFromDev(struct sk_buff *skb, // IN: packet to receive + return 0; + } + +- +-/* +- *---------------------------------------------------------------------- +- * +- * VNetBridgeProcRead -- +- * +- * Callback for read operation on this bridge entry in vnets proc fs. +- * +- * Results: +- * Length of read operation. +- * +- * Side effects: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-int +-VNetBridgeProcRead(char *page, // IN/OUT: buffer to write into +- char **start, // OUT: 0 if file < 4k, else offset into page +- off_t off, // IN: (unused) offset of read into the file +- int count, // IN: (unused) maximum number of bytes to read +- int *eof, // OUT: TRUE if there is nothing more to read +- void *data) // IN: client data - pointer to bridge +-{ +- VNetBridge *bridge = (VNetBridge*)data; +- int len = 0; +- +- if (!bridge) { +- return len; +- } +- +- len += VNetPrintPort(&bridge->port, page+len); +- +- len += sprintf(page+len, "dev %s ", bridge->name); +- +- len += sprintf(page+len, "\n"); +- +- *start = 0; +- *eof = 1; +- return len; +-} +--- a/vmnet-only/driver.c ++++ b/vmnet-only/driver.c +@@ -1785,21 +1785,17 @@ VNetSetMACUnique(VNetPort *port, // IN: + *---------------------------------------------------------------------- + */ + +-int ++void + VNetPrintJack(const VNetJack *jack, // IN: jack +- char *buf) // OUT: info about jack ++ struct seq_file *seqf) // OUT: info about jack + { +- int len = 0; +- + read_lock(&vnetPeerLock); + if (!jack->peer) { +- len += sprintf(buf+len, "connected not "); ++ seq_printf(seqf, "connected not "); + } else { +- len += sprintf(buf+len, "connected %s ", jack->peer->name); ++ seq_printf(seqf, "connected %s ", jack->peer->name); + } + read_unlock(&vnetPeerLock); +- +- return len; + } + + +@@ -1819,52 +1815,48 @@ VNetPrintJack(const VNetJack *jack, // IN: jack + *---------------------------------------------------------------------- + */ + +-int ++void + VNetPrintPort(const VNetPort *port, // IN: port +- char *buf) // OUT: info about port ++ struct seq_file *seqf) // OUT: info about port + { +- int len = 0; ++ VNetPrintJack(&port->jack, seqf); + +- len += VNetPrintJack(&port->jack, buf+len); +- +- len += sprintf(buf+len, "mac %02x:%02x:%02x:%02x:%02x:%02x ", ++ seq_printf(seqf, "mac %02x:%02x:%02x:%02x:%02x:%02x ", + port->paddr[0], port->paddr[1], port->paddr[2], + port->paddr[3], port->paddr[4], port->paddr[5]); + +- len += sprintf(buf+len, "ladrf %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ", ++ seq_printf(seqf, "ladrf %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ", + port->ladrf[0], port->ladrf[1], port->ladrf[2], + port->ladrf[3], port->ladrf[4], port->ladrf[5], + port->ladrf[6], port->ladrf[7]); + +- len += sprintf(buf+len, "flags IFF_RUNNING"); ++ seq_printf(seqf, "flags IFF_RUNNING"); + + if (port->flags & IFF_UP) { +- len += sprintf(buf+len, ",IFF_UP"); ++ seq_printf(seqf, ",IFF_UP"); + } + + if (port->flags & IFF_BROADCAST) { +- len += sprintf(buf+len, ",IFF_BROADCAST"); ++ seq_printf(seqf, ",IFF_BROADCAST"); + } + + if (port->flags & IFF_DEBUG) { +- len += sprintf(buf+len, ",IFF_DEBUG"); ++ seq_printf(seqf, ",IFF_DEBUG"); + } + + if (port->flags & IFF_PROMISC) { +- len += sprintf(buf+len, ",IFF_PROMISC"); ++ seq_printf(seqf, ",IFF_PROMISC"); + } + + if (port->flags & IFF_MULTICAST) { +- len += sprintf(buf+len, ",IFF_MULTICAST"); ++ seq_printf(seqf, ",IFF_MULTICAST"); + } + + if (port->flags & IFF_ALLMULTI) { +- len += sprintf(buf+len, ",IFF_ALLMULTI"); ++ seq_printf(seqf, ",IFF_ALLMULTI"); + } + +- len += sprintf(buf+len, " "); +- +- return len; ++ seq_printf(seqf, " "); + } + + +--- a/vmnet-only/hub.c ++++ b/vmnet-only/hub.c +@@ -25,6 +25,7 @@ + #include <linux/sched.h> + #include <linux/slab.h> + #include <linux/poll.h> ++#include <linux/seq_file.h> + + #include <linux/netdevice.h> + #include <linux/etherdevice.h> +@@ -71,8 +72,6 @@ static void VNetHubReceive(VNetJack *this, struct sk_buff *skb); + static Bool VNetHubCycleDetect(VNetJack *this, int generation); + static void VNetHubPortsChanged(VNetJack *this); + static int VNetHubIsBridged(VNetJack *this); +-static int VNetHubProcRead(char *page, char **start, off_t off, +- int count, int *eof, void *data); + + static VNetHub *vnetHub; + static DEFINE_SPINLOCK(vnetHubLock); +@@ -241,6 +240,53 @@ VNetHub_AllocPvn(uint8 id[]) // IN: the PVN ID to alloc on + /* + *---------------------------------------------------------------------- + * ++ * VNetHubProcShow -- ++ * ++ * Callback for read operation on hub entry in vnets proc fs. ++ * ++ * Results: ++ * Length of read operation. ++ * ++ * Side effects: ++ * None. ++ * ++ *---------------------------------------------------------------------- ++ */ ++ ++int ++VNetHubProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into ++ void *data) // IN: client data - not used ++{ ++ VNetJack *jack = (VNetJack*)data; ++ VNetHub *hub; ++ ++ if (!jack || !jack->private) { ++ return 0; ++ } ++ hub = (VNetHub*)jack->private; ++ ++ VNetPrintJack(jack, seqf); ++ ++ seq_printf(seqf, "tx %u ", hub->stats[jack->index].tx); ++ seq_printf(seqf, "\n"); ++ return 0; ++} ++ ++static int proc_hub_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, VNetHubProcShow, PDE_DATA(inode)); ++} ++ ++static const struct file_operations proc_hub_fops = { ++ .open = proc_hub_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = seq_release, ++}; ++ ++/* ++ *---------------------------------------------------------------------- ++ * + * VNetHubAlloc -- + * + * Allocate a jack on this hub. +@@ -354,7 +400,7 @@ VNetHubAlloc(Bool allocPvn, // IN: TRUE for PVN, FALSE for vnet + * Make proc entry for this jack. + */ + +- retval = VNetProc_MakeEntry(jack->name, S_IFREG, &jack->procEntry); ++ retval = VNetProc_MakeEntryOps(jack->name, S_IFREG, &jack->procEntry, &proc_hub_fops, jack); + if (retval) { + if (retval == -ENXIO) { + jack->procEntry = NULL; +@@ -362,9 +408,6 @@ VNetHubAlloc(Bool allocPvn, // IN: TRUE for PVN, FALSE for vnet + hub->used[i] = FALSE; + return NULL; + } +- } else { +- jack->procEntry->read_proc = VNetHubProcRead; +- jack->procEntry->data = jack; + } + + /* +@@ -686,46 +729,3 @@ VNetHubIsBridged(VNetJack *this) + } + + +-/* +- *---------------------------------------------------------------------- +- * +- * VNetHubProcRead -- +- * +- * Callback for read operation on hub entry in vnets proc fs. +- * +- * Results: +- * Length of read operation. +- * +- * Side effects: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-int +-VNetHubProcRead(char *page, // IN/OUT: buffer to write into +- char **start, // OUT: 0 if file < 4k, else offset into page +- off_t off, // IN: offset of read into the file +- int count, // IN: maximum number of bytes to read +- int *eof, // OUT: TRUE if there is nothing more to read +- void *data) // IN: client data - not used +-{ +- VNetJack *jack = (VNetJack*)data; +- VNetHub *hub; +- int len = 0; +- +- if (!jack || !jack->private) { +- return len; +- } +- hub = (VNetHub*)jack->private; +- +- len += VNetPrintJack(jack, page+len); +- +- len += sprintf(page+len, "tx %u ", hub->stats[jack->index].tx); +- +- len += sprintf(page+len, "\n"); +- +- *start = 0; +- *eof = 1; +- return len; +-} +--- a/vmnet-only/netif.c ++++ b/vmnet-only/netif.c +@@ -62,8 +62,6 @@ static int VNetNetifStartXmit(struct sk_buff *skb, struct net_device *dev); + static struct net_device_stats *VNetNetifGetStats(struct net_device *dev); + static int VNetNetifSetMAC(struct net_device *dev, void *addr); + static void VNetNetifSetMulticast(struct net_device *dev); +-static int VNetNetIfProcRead(char *page, char **start, off_t off, +- int count, int *eof, void *data); + + /* + *---------------------------------------------------------------------- +@@ -116,6 +114,53 @@ VNetNetIfSetup(struct net_device *dev) // IN: + + } + ++/* ++ *---------------------------------------------------------------------- ++ * ++ * VNetNetIfProcShow -- ++ * ++ * Callback for read operation on this netif entry in vnets proc fs. ++ * ++ * Results: ++ * Length of read operation. ++ * ++ * Side effects: ++ * None. ++ * ++ *---------------------------------------------------------------------- ++ */ ++ ++int ++VNetNetIfProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into ++ void *data) // IN: client data ++{ ++ VNetNetIF *netIf = data; ++ ++ if (!netIf) { ++ return 0; ++ } ++ ++ VNetPrintPort(&netIf->port, seqf); ++ ++ seq_printf(seqf, "dev %s ", netIf->dev->name); ++ ++ seq_printf(seqf, "\n"); ++ ++ return 0; ++} ++ ++static int proc_netif_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, VNetNetIfProcShow, PDE_DATA(inode)); ++} ++ ++static const struct file_operations proc_netif_fops = { ++ .open = proc_netif_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = seq_release, ++}; ++ + + /* + *---------------------------------------------------------------------- +@@ -180,16 +225,13 @@ VNetNetIf_Create(char *devName, // IN: + * Make proc entry for this jack. + */ + +- retval = VNetProc_MakeEntry(netIf->port.jack.name, S_IFREG, +- &netIf->port.jack.procEntry); ++ retval = VNetProc_MakeEntryOps(netIf->port.jack.name, S_IFREG, ++ &netIf->port.jack.procEntry, &proc_netif_fops, netIf); + if (retval) { + netIf->port.jack.procEntry = NULL; + if (retval != -ENXIO) { + goto outFreeDev; + } +- } else { +- netIf->port.jack.procEntry->read_proc = VNetNetIfProcRead; +- netIf->port.jack.procEntry->data = netIf; + } + + /* +@@ -553,45 +595,3 @@ VNetNetifGetStats(struct net_device *dev) // IN: + return &netIf->stats; + } + +- +-/* +- *---------------------------------------------------------------------- +- * +- * VNetNetIfProcRead -- +- * +- * Callback for read operation on this netif entry in vnets proc fs. +- * +- * Results: +- * Length of read operation. +- * +- * Side effects: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-int +-VNetNetIfProcRead(char *page, // IN/OUT: buffer to write into +- char **start, // OUT: 0 if file < 4k, else offset into page +- off_t off, // IN: (unused) offset of read into the file +- int count, // IN: (unused) maximum number of bytes to read +- int *eof, // OUT: TRUE if there is nothing more to read +- void *data) // IN: client data +-{ +- VNetNetIF *netIf = data; +- int len = 0; +- +- if (!netIf) { +- return len; +- } +- +- len += VNetPrintPort(&netIf->port, page+len); +- +- len += sprintf(page+len, "dev %s ", netIf->dev->name); +- +- len += sprintf(page+len, "\n"); +- +- *start = 0; +- *eof = 1; +- return len; +-} +--- a/vmnet-only/procfs.c ++++ b/vmnet-only/procfs.c +@@ -45,10 +45,6 @@ + + #if defined(CONFIG_PROC_FS) + +-static int VNetProcMakeEntryInt(VNetProcEntry *parent, char *name, int mode, +- VNetProcEntry **ret); +-static void VNetProcRemoveEntryInt(VNetProcEntry *node, VNetProcEntry *parent); +- + static VNetProcEntry *base = NULL; + + +@@ -71,7 +67,12 @@ static VNetProcEntry *base = NULL; + int + VNetProc_Init(void) + { +- return VNetProcMakeEntryInt(NULL, "vmnet", S_IFDIR, &base); ++ base = proc_mkdir("vmnet", NULL); ++ if(IS_ERR(base)) { ++ base = NULL; ++ return PTR_ERR(base); ++ } ++ return 0; + } + + +@@ -94,14 +95,14 @@ VNetProc_Init(void) + void + VNetProc_Cleanup(void) + { +- VNetProcRemoveEntryInt(base, NULL); ++ proc_remove(base); + base = NULL; + } + + /* + *---------------------------------------------------------------------- + * +- * VNetProcMakeEntryInt -- ++ * VNetProc_MakeEntryOps -- + * + * Make an entry in the vnets proc file system. + * +@@ -116,72 +117,21 @@ VNetProc_Cleanup(void) + */ + + int +-VNetProcMakeEntryInt(VNetProcEntry *parent, // IN: +- char *name, // IN: ++VNetProc_MakeEntryOps(char *name, // IN: + int mode, // IN: +- VNetProcEntry **ret) // OUT: ++ VNetProcEntry **ret, ++ const struct file_operations *fops, ++ void *data ++ ) // OUT: + { + VNetProcEntry *ent; +- ent = create_proc_entry(name, mode, parent); ++ ent = proc_create_data(name, mode, base, fops, data); + *ret = ent; + if (!ent) + return -ENOMEM; + return 0; + } + +- +-/* +- *---------------------------------------------------------------------- +- * +- * VNetProcRemoveEntryInt -- +- * +- * Remove a previously installed proc entry. +- * +- * Results: +- * None. +- * +- * Side effects: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-void +-VNetProcRemoveEntryInt(VNetProcEntry *node, +- VNetProcEntry *parent) +-{ +- if (node) { +- remove_proc_entry(node->name, parent); +- } +-} +- +- +-/* +- *---------------------------------------------------------------------- +- * +- * VNetProc_MakeEntry -- +- * +- * Make an entry in the vnets proc file system. +- * +- * Results: +- * errno. If errno is 0 and ret is non NULL then ret is filled +- * in with the resulting proc entry. +- * +- * Side effects: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-int +-VNetProc_MakeEntry(char *name, // IN: +- int mode, // IN: +- VNetProcEntry **ret) // OUT: +-{ +- return VNetProcMakeEntryInt(base, name, mode, ret); +-} +- +- + /* + *---------------------------------------------------------------------- + * +@@ -201,7 +151,8 @@ VNetProc_MakeEntry(char *name, // IN: + void + VNetProc_RemoveEntry(VNetProcEntry *node) + { +- VNetProcRemoveEntryInt(node, base); ++ if(node) ++ proc_remove(node); + } + + +@@ -253,31 +204,6 @@ VNetProc_Cleanup(void) + } + + +-/* +- *---------------------------------------------------------------------- +- * +- * VNetProc_MakeEntry -- +- * +- * Make an entry in the vnets proc file system. +- * +- * Results: +- * errno. If errno is 0 and ret is non NULL then ret is filled +- * in with the resulting proc entry. +- * +- * Side effects: +- * None. +- * +- *---------------------------------------------------------------------- +- */ +- +-int +-VNetProc_MakeEntry(char *name, +- int mode, +- VNetProcEntry **ret) +-{ +- return -ENXIO; +-} +- + + /* + *---------------------------------------------------------------------- +--- a/vmnet-only/userif.c ++++ b/vmnet-only/userif.c +@@ -389,7 +389,7 @@ VNetUserIfReceive(VNetJack *this, // IN + /* + *---------------------------------------------------------------------- + * +- * VNetUserIfProcRead -- ++ * VNetUserIfProcShow -- + * + * Callback for read operation on this userif entry in vnets proc fs. + * +@@ -403,30 +403,23 @@ VNetUserIfReceive(VNetJack *this, // IN + */ + + static int +-VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into +- char **start, // OUT: 0 if file < 4k, else offset into +- // page +- off_t off, // IN: offset of read into the file +- int count, // IN: maximum number of bytes to read +- int *eof, // OUT: TRUE if there is nothing more to +- // read ++VNetUserIfProcShow(struct seq_file *seqf, // IN/OUT: buffer to write into + void *data) // IN: client data - not used + { + VNetUserIF *userIf = (VNetUserIF*)data; +- int len = 0; + + if (!userIf) { +- return len; ++ return 0; + } + +- len += VNetPrintPort(&userIf->port, page+len); ++ VNetPrintPort(&userIf->port, seqf); + +- len += sprintf(page+len, "read %u written %u queued %u ", ++ seq_printf(seqf, "read %u written %u queued %u ", + userIf->stats.read, + userIf->stats.written, + userIf->stats.queued); + +- len += sprintf(page+len, ++ seq_printf(seqf, + "dropped.down %u dropped.mismatch %u " + "dropped.overflow %u dropped.largePacket %u", + userIf->stats.droppedDown, +@@ -434,13 +427,23 @@ VNetUserIfProcRead(char *page, // IN/OUT: buffer to write into + userIf->stats.droppedOverflow, + userIf->stats.droppedLargePacket); + +- len += sprintf(page+len, "\n"); ++ seq_printf(seqf, "\n"); + +- *start = 0; +- *eof = 1; +- return len; ++ return 0; ++} ++ ++static int proc_userif_open(struct inode *inode, struct file *file) ++{ ++ return single_open(file, VNetUserIfProcShow, PDE_DATA(inode)); + } + ++static const struct file_operations proc_userif_fops = { ++ .open = proc_userif_open, ++ .read = seq_read, ++ .llseek = seq_lseek, ++ .release = seq_release, ++}; ++ + + /* + *---------------------------------------------------------------------- +@@ -1036,8 +1039,8 @@ VNetUserIf_Create(VNetPort **ret) // OUT + * Make proc entry for this jack. + */ + +- retval = VNetProc_MakeEntry(userIf->port.jack.name, S_IFREG, +- &userIf->port.jack.procEntry); ++ retval = VNetProc_MakeEntryOps(userIf->port.jack.name, S_IFREG, ++ &userIf->port.jack.procEntry, &proc_userif_fops, userIf); + if (retval) { + if (retval == -ENXIO) { + userIf->port.jack.procEntry = NULL; +@@ -1045,9 +1048,6 @@ VNetUserIf_Create(VNetPort **ret) // OUT + kfree(userIf); + return retval; + } +- } else { +- userIf->port.jack.procEntry->read_proc = VNetUserIfProcRead; +- userIf->port.jack.procEntry->data = userIf; + } + + /* +--- a/vmnet-only/vnetInt.h ++++ b/vmnet-only/vnetInt.h +@@ -171,12 +171,14 @@ VNetJack *VNetDisconnect(VNetJack *jack); + + void VNetSend(const VNetJack *jack, struct sk_buff *skb); + +-int VNetProc_MakeEntry(char *name, int mode, +- VNetProcEntry **ret); ++int VNetProc_MakeEntryOps(char *name, int mode, ++ VNetProcEntry **ret, ++ const struct file_operations *fops, ++ void *data); + + void VNetProc_RemoveEntry(VNetProcEntry *node); + +-int VNetPrintJack(const VNetJack *jack, char *buf); ++void VNetPrintJack(const VNetJack *jack, struct seq_file *seqf); + + int VNet_MakeMACAddress(VNetPort *port); + +@@ -196,7 +198,7 @@ Bool VNetPacketMatch(const uint8 *destAddr, const uint8 *ifAddr, + + Bool VNetCycleDetectIf(const char *name, int generation); + +-int VNetPrintPort(const VNetPort *port, char *buf); ++void VNetPrintPort(const VNetPort *port, struct seq_file *seqf); + + int VNetSnprintf(char *str, size_t size, const char *format, ...); + +-- +--- a/vmblock-only/linux/control.c 2013-05-21 19:21:19.165750556 +0200 ++++ b/vmblock-only/linux/control.c 2013-05-21 19:22:18.363747723 +0200 +@@ -208,9 +208,10 @@ + VMBlockSetProcEntryOwner(controlProcMountpoint); + + /* Create /proc/fs/vmblock/dev */ +- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, +- VMBLOCK_CONTROL_MODE, +- controlProcDirEntry); ++ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, ++ VMBLOCK_CONTROL_MODE, ++ controlProcDirEntry, ++ &ControlFileOps); + if (!controlProcEntry) { + Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n"); + remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry); +@@ -218,7 +219,6 @@ + return -EINVAL; + } + +- controlProcEntry->proc_fops = &ControlFileOps; + return 0; + } + diff --git a/app-emulation/vmware-modules/files/279-apic.patch b/app-emulation/vmware-modules/files/279-apic.patch new file mode 100644 index 000000000000..66cd45933246 --- /dev/null +++ b/app-emulation/vmware-modules/files/279-apic.patch @@ -0,0 +1,12 @@ +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index f1f4b10..c43242f 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -55,6 +55,7 @@ + #include <linux/kthread.h> + #include <linux/wait.h> + ++#include <asm/apic.h> + + #include "vmware.h" + #include "x86apic.h" diff --git a/app-emulation/vmware-modules/files/279-makefile-include.patch b/app-emulation/vmware-modules/files/279-makefile-include.patch new file mode 100644 index 000000000000..39c300030805 --- /dev/null +++ b/app-emulation/vmware-modules/files/279-makefile-include.patch @@ -0,0 +1,65 @@ +diff --git a/vmblock-only/Makefile.kernel b/vmblock-only/Makefile.kernel +index ab7a727..e3ec9d2 100644 +--- a/vmblock-only/Makefile.kernel ++++ b/vmblock-only/Makefile.kernel +@@ -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, $(AUTOCONF_DIR)/cachecreate.c, -DVMW_KMEMCR_HAS_DTOR, ) + EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/cachector.c, -DVMW_KMEMCR_CTOR_HAS_3_ARGS, ) +diff --git a/vmci-only/Makefile.kernel b/vmci-only/Makefile.kernel +index ba343ee..861ea83 100644 +--- a/vmci-only/Makefile.kernel ++++ b/vmci-only/Makefile.kernel +@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI + + INCLUDE += -I$(SRCROOT)/shared -I$(SRCROOT)/common -I$(SRCROOT)/linux + +-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) ++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE) + + obj-m += $(DRIVER).o + +diff --git a/vmmon-only/Makefile.kernel b/vmmon-only/Makefile.kernel +index 8770d1d..c4746c3 100644 +--- a/vmmon-only/Makefile.kernel ++++ b/vmmon-only/Makefile.kernel +@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE + 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/smpcall.c, -DVMW_HAVE_SMP_CALL_3ARG, ) + +diff --git a/vmnet-only/Makefile.kernel b/vmnet-only/Makefile.kernel +index d1e3133..665d428 100644 +--- a/vmnet-only/Makefile.kernel ++++ b/vmnet-only/Makefile.kernel +@@ -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)/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, ) + EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/nfhook_uses_skb.c,-DVMW_NFHOOK_USES_SKB, ) +diff --git a/vsock-only/Makefile.kernel b/vsock-only/Makefile.kernel +index b4629ee..264b8cb 100644 +--- a/vsock-only/Makefile.kernel ++++ b/vsock-only/Makefile.kernel +@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include + 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, $(AUTOCONF_DIR)/netcreate_num_params.c, -DVMW_NETCREATE_KERNARG, ) + + diff --git a/app-emulation/vmware-modules/files/279-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/279-makefile-kernel-dir.patch new file mode 100644 index 000000000000..1a647a3302d8 --- /dev/null +++ b/app-emulation/vmware-modules/files/279-makefile-kernel-dir.patch @@ -0,0 +1,85 @@ +diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile +index 2b81323..746c8b8 100644 +--- a/vmblock-only/Makefile ++++ b/vmblock-only/Makefile +@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r) + ifdef LINUXINCLUDE + HEADER_DIR = $(LINUXINCLUDE) + else +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + endif + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmblock + PRODUCT := ws +diff --git a/vmci-only/Makefile b/vmci-only/Makefile +index 8e9c5be..6ec828b 100644 +--- a/vmci-only/Makefile ++++ b/vmci-only/Makefile +@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r) + ifdef LINUXINCLUDE + HEADER_DIR = $(LINUXINCLUDE) + else +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + endif + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmci + PRODUCT := ws +diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile +index 5bd867b..91a83d4 100644 +--- a/vmmon-only/Makefile ++++ b/vmmon-only/Makefile +@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r) + ifdef LINUXINCLUDE + HEADER_DIR = $(LINUXINCLUDE) + else +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + endif + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmmon + PRODUCT := @@PRODUCT@@ +diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile +index d4eb73c..c7c6d38 100644 +--- a/vmnet-only/Makefile ++++ b/vmnet-only/Makefile +@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r) + ifdef LINUXINCLUDE + HEADER_DIR = $(LINUXINCLUDE) + else +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + endif + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vmnet + PRODUCT := @@PRODUCT@@ +diff --git a/vsock-only/Makefile b/vsock-only/Makefile +index 93dd61d..9765696 100644 +--- a/vsock-only/Makefile ++++ b/vsock-only/Makefile +@@ -49,10 +49,10 @@ VM_UNAME = $(shell uname -r) + ifdef LINUXINCLUDE + HEADER_DIR = $(LINUXINCLUDE) + else +-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include ++HEADER_DIR = $(KERNEL_DIR) + endif + +-BUILD_DIR = $(HEADER_DIR)/.. ++BUILD_DIR = $(KBUILD_OUTPUT) + + DRIVER := vsock + PRODUCT := ws diff --git a/app-emulation/vmware-modules/files/279-netdevice.patch b/app-emulation/vmware-modules/files/279-netdevice.patch new file mode 100644 index 000000000000..35231a3205e3 --- /dev/null +++ b/app-emulation/vmware-modules/files/279-netdevice.patch @@ -0,0 +1,24 @@ +diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h +index 7a56304..9ff4548 100644 +--- a/vmnet-only/compat_netdevice.h ++++ b/vmnet-only/compat_netdevice.h +@@ -47,6 +47,19 @@ + # define net_device device + #endif + ++/* it looks like these have been removed from the kernel 3.1 ++ * probably because the "transition" is considered complete. ++ * so to keep this source compatible we just redefine them like they were ++ * previously ++ */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 0) ++#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev ++ functions are available. */ ++#define HAVE_FREE_NETDEV /* free_netdev() */ ++#define HAVE_NETDEV_PRIV /* netdev_priv() */ ++#define HAVE_NETIF_QUEUE ++#define HAVE_NET_DEVICE_OPS ++#endif + + /* + * SET_MODULE_OWNER appeared sometime during 2.3.x. It was setting diff --git a/app-emulation/vmware-modules/files/279-putname.patch b/app-emulation/vmware-modules/files/279-putname.patch new file mode 100644 index 000000000000..6e76130fa165 --- /dev/null +++ b/app-emulation/vmware-modules/files/279-putname.patch @@ -0,0 +1,13 @@ +diff --git a/vmblock-only/linux/control.c b/vmblock-only/linux/control.c +index 79716bd..2dd83fe 100644 +--- a/vmblock-only/linux/control.c ++++ b/vmblock-only/linux/control.c +@@ -293,7 +293,7 @@ ExecuteBlockOp(const char __user *buf, // IN: buffer with name + + retval = i < 0 ? -EINVAL : blockOp(name, blocker); + +- putname(name); ++ __putname(name); + + return retval; + } diff --git a/app-emulation/vmware-modules/files/279-vmblock.patch b/app-emulation/vmware-modules/files/279-vmblock.patch new file mode 100644 index 000000000000..e578441e1219 --- /dev/null +++ b/app-emulation/vmware-modules/files/279-vmblock.patch @@ -0,0 +1,27 @@ +diff -ur vmblock-onlya/linux/control.c vmblock-only/linux/control.c +--- vmblock-only/linux/control.c 2013-02-26 10:17:29.000000000 +0200 ++++ vmblock-only/linux/control.c 2013-07-05 19:56:48.298553173 +0300 +@@ -208,17 +208,18 @@ + VMBlockSetProcEntryOwner(controlProcMountpoint); + + /* Create /proc/fs/vmblock/dev */ +- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, ++ /*controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME, + VMBLOCK_CONTROL_MODE, +- controlProcDirEntry); +- if (!controlProcEntry) { ++ controlProcDirEntry);*/ ++ controlProcEntry = proc_create(VMBLOCK_CONTROL_DEVNAME, VMBLOCK_CONTROL_MODE, controlProcDirEntry, &ControlFileOps); ++ if (controlProcEntry == NULL) { + Warning("SetupProcDevice: could not create " VMBLOCK_DEVICE "\n"); + remove_proc_entry(VMBLOCK_CONTROL_MOUNTPOINT, controlProcDirEntry); + remove_proc_entry(VMBLOCK_CONTROL_PROC_DIRNAME, NULL); + return -EINVAL; + } + +- controlProcEntry->proc_fops = &ControlFileOps; ++ /* controlProcEntry->proc_fops = &ControlFileOps; */ + return 0; + } + + diff --git a/app-emulation/vmware-modules/vmware-modules-279.0.ebuild b/app-emulation/vmware-modules/vmware-modules-279.0.ebuild new file mode 100644 index 000000000000..e967df4a9aa3 --- /dev/null +++ b/app-emulation/vmware-modules/vmware-modules-279.0.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-279.0.ebuild,v 1.1 2013/10/19 11:42:47 dilfridge Exp $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod user versionator udev + +PV_MAJOR=$(get_major_version) +PV_MINOR=$(get_version_component_range 2) + +DESCRIPTION="VMware kernel modules" +HOMEPAGE="http://www.vmware.com/" + +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="pax_kernel" + +RDEPEND="" +DEPEND="${RDEPEND} + || ( =app-emulation/vmware-player-6.0.${PV_MINOR}* + =app-emulation/vmware-workstation-10.0.${PV_MINOR}* )" + +S=${WORKDIR} + +pkg_setup() { + CONFIG_CHECK="~HIGH_RES_TIMERS" + if kernel_is ge 2 6 37 && kernel_is lt 2 6 39; then + CONFIG_CHECK="${CONFIG_CHECK} BKL" + fi + + linux-info_pkg_setup + + linux-mod_pkg_setup + + VMWARE_GROUP=${VMWARE_GROUP:-vmware} + + VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock" + VMWARE_MOD_DIR="${PN}-${PVR}" + + BUILD_TARGETS="auto-build KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}" + + enewgroup "${VMWARE_GROUP}" + filter-flags -mfpmath=sse + + for mod in ${VMWARE_MODULE_LIST}; do + MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)" + done +} + +src_unpack() { + cd "${S}" + for mod in ${VMWARE_MODULE_LIST}; do + tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar + done +} + +src_prepare() { + epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch" + epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch" + epatch "${FILESDIR}/${PV_MAJOR}-netdevice.patch" + use pax_kernel && epatch "${FILESDIR}/hardened.patch" + epatch "${FILESDIR}/${PV_MAJOR}-apic.patch" + kernel_is ge 3 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-putname.patch" + kernel_is ge 3 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-3.10.0.patch" + kernel_is ge 3 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-vmblock.patch" + + # Allow user patches so they can support RC kernels and whatever else + epatch_user +} + +src_install() { + linux-mod_src_install + local udevrules="${T}/60-vmware.rules" + cat > "${udevrules}" <<-EOF + KERNEL=="vmci", GROUP="vmware", MODE=660 + KERNEL=="vmmon", GROUP="vmware", MODE=660 + KERNEL=="vsock", GROUP="vmware", MODE=660 + EOF + udev_dorules "${udevrules}" +} |