diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-03-12 13:40:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-03-12 15:39:49 +0000 |
commit | 21afd579ff1da28aaccb84aeff739c075280f0f0 (patch) | |
tree | 5df325050cb20c8fe7de38d7c86935d18d033bd5 /main/open-vm-tools-grsec/linux-3.8.patch | |
parent | 6ec87551d015b56990cf632130bcbb38890a3f6f (diff) | |
download | aports-21afd579ff1da28aaccb84aeff739c075280f0f0.tar.bz2 aports-21afd579ff1da28aaccb84aeff739c075280f0f0.tar.xz |
main/open-vm-tools-grsec: upgrade to 9.2.2 and build for 3.8 kernel
Diffstat (limited to 'main/open-vm-tools-grsec/linux-3.8.patch')
-rw-r--r-- | main/open-vm-tools-grsec/linux-3.8.patch | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/main/open-vm-tools-grsec/linux-3.8.patch b/main/open-vm-tools-grsec/linux-3.8.patch new file mode 100644 index 0000000000..253871611d --- /dev/null +++ b/main/open-vm-tools-grsec/linux-3.8.patch @@ -0,0 +1,101 @@ +diff --git a/modules/linux/vmci/linux/driver.c b/modules/linux/vmci/linux/driver.c +index a34de66..799d69f 100644 +--- a/modules/linux/vmci/linux/driver.c ++++ b/modules/linux/vmci/linux/driver.c +@@ -124,7 +124,7 @@ static struct pci_driver vmci_driver = { + .name = "vmci", + .id_table = vmci_ids, + .probe = vmci_probe_device, +- .remove = __devexit_p(vmci_remove_device), ++ .remove = vmci_remove_device, + }; + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) +@@ -1750,7 +1750,7 @@ vmci_enable_msix(struct pci_dev *pdev) // IN + *----------------------------------------------------------------------------- + */ + +-static int __devinit ++static int + vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device + const struct pci_device_id *id) // IN: matching device ID + { +@@ -1978,7 +1978,7 @@ vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device + *----------------------------------------------------------------------------- + */ + +-static void __devexit ++static void + vmci_remove_device(struct pci_dev* pdev) + { + struct vmci_device *dev = pci_get_drvdata(pdev); +--- ./modules/linux/vsock/linux/af_vsock.c.orig 2013-03-12 10:38:52.592399593 +0000 ++++ ./modules/linux/vsock/linux/af_vsock.c 2013-03-12 13:15:43.405983373 +0000 +@@ -319,7 +319,7 @@ + .sendpage = sock_no_sendpage, + }; + +-static struct proto_ops vsockVmciStreamOps = { ++static struct proto_ops vsockVmciStreamOps __read_mostly = { + .family = VSOCK_INVALID_FAMILY, + .owner = THIS_MODULE, + .release = VSockVmciRelease, +@@ -3159,19 +3159,21 @@ + * when a hard-coded, currently-available value gets assigned to someone + * else in the future. + */ ++ pax_open_kernel(); + for (i = NPROTO - 1; i >= 0; i--) { +- vsockVmciFamilyOps.family = i; ++ *(void **)&vsockVmciFamilyOps.family = i; + err = sock_register(&vsockVmciFamilyOps); + if (err) { + Warning("Could not register address family %d.\n", i); +- vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY; ++ *(void **)&vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY; + } else { +- vsockVmciDgramOps.family = i; +- vsockVmciStreamOps.family = i; ++ *(void **)&vsockVmciDgramOps.family = i; ++ *(void **)&vsockVmciStreamOps.family = i; + err = i; + break; + } + } ++ pax_close_kernel(); + + return err; + } +@@ -3202,8 +3204,10 @@ + sock_unregister(vsockVmciFamilyOps.family); + } + +- vsockVmciDgramOps.family = vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY; +- vsockVmciStreamOps.family = vsockVmciFamilyOps.family; ++ pax_open_kernel(); ++ *(void **)&vsockVmciDgramOps.family = *(void **)&vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY; ++ *(void **)&vsockVmciStreamOps.family = vsockVmciFamilyOps.family; ++ pax_close_kernel(); + } + + +--- ./modules/linux/shared/compat_mm.h.orig 2013-03-12 13:23:12.973400354 +0000 ++++ ./modules/linux/shared/compat_mm.h 2013-03-12 13:36:43.680968670 +0000 +@@ -99,8 +99,16 @@ + vmtruncate(inode, size); \ + result; \ + }) +-#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) + #define compat_vmtruncate(inode, size) vmtruncate(inode, size) ++#else ++#define compat_vmtruncate(inode, len) \ ++({ \ ++ int result = inode_newsize_ok(inode, len); \ ++ if (!result) \ ++ truncate_setsize(inode, len); \ ++ result; \ ++}) + #endif + + |