aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-03-12 13:40:06 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-03-12 15:39:49 +0000
commit21afd579ff1da28aaccb84aeff739c075280f0f0 (patch)
tree5df325050cb20c8fe7de38d7c86935d18d033bd5 /main/open-vm-tools-grsec
parent6ec87551d015b56990cf632130bcbb38890a3f6f (diff)
downloadaports-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')
-rw-r--r--main/open-vm-tools-grsec/APKBUILD22
-rw-r--r--main/open-vm-tools-grsec/linux-3.6-build-fix.patch63
-rw-r--r--main/open-vm-tools-grsec/linux-3.8.patch101
3 files changed, 112 insertions, 74 deletions
diff --git a/main/open-vm-tools-grsec/APKBUILD b/main/open-vm-tools-grsec/APKBUILD
index 38a362be89..0d4a734f78 100644
--- a/main/open-vm-tools-grsec/APKBUILD
+++ b/main/open-vm-tools-grsec/APKBUILD
@@ -3,10 +3,10 @@
_flavor=grsec
_kpkg=linux-$_flavor
_realname=open-vm-tools
-_kver=3.6.11
-_kpkgrel=17
+_kver=3.8.2
+_kpkgrel=0
-_realver=9.2.0_p799703
+_realver=9.2.2_p893683
_ver=${_realver/_p/-}
_mypkgrel=0
@@ -24,7 +24,7 @@ if [ -f ../main/linux-${_flavor}/APKBUILD ]; then
[ "$_kpkgrel" != "$pkgrel" ] && die "please set _kpkgrel to $pkgrel"
fi
-_abi_release=${_kver}-${_flavor}
+_abi_release=${_kver}-${_kpkgrel}-${_flavor}
_kernelver="$_kver-r$_kpkgrel"
pkgname="$_realname-$_flavor"
@@ -40,7 +40,7 @@ depends="linux-${_flavor}=${_kernelver}"
depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}"
makedepends="$depends_dev"
source="http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-${_realver%.*}.x/open-vm-tools-${_ver}.tar.gz
- linux-3.6-build-fix.patch
+ linux-3.8.patch
vmci_driver_c.patch
vmware-modules.initd
"
@@ -83,15 +83,15 @@ package() {
done
}
-md5sums="37341978a00a1568b898a8ce024f9da9 open-vm-tools-9.2.0-799703.tar.gz
-d9ffaf628837ea6a216b96dac69705e6 linux-3.6-build-fix.patch
+md5sums="7af505681d736d4c9ee6493b1166689f open-vm-tools-9.2.2-893683.tar.gz
+fa306331d54af2b9acad5d5693dc05cf linux-3.8.patch
16e060275e028d1edf1c5fd1a10b6a96 vmci_driver_c.patch
afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd"
-sha256sums="06f80b220c52d2438a7ef5628fb05eb7130a2f1e758ee6399d2e96ea54bd8c52 open-vm-tools-9.2.0-799703.tar.gz
-9e5a3d20799e3bebef0d46502509c6204fcd7c3a36ad40eb3c8194a408dfcaed linux-3.6-build-fix.patch
+sha256sums="1ae795e75bf4b38185f39083b8075686d3bab4c1222f4e39c863aeccb2f5f387 open-vm-tools-9.2.2-893683.tar.gz
+98de7879598f229e99ef408776a3ed5fbc7f7fe937c8b925f4fbe3907df50f89 linux-3.8.patch
0c7e24a78784e2e74421b119f996eb74fd346d5634e7f58172860e2c5f5d5bf4 vmci_driver_c.patch
6ceb5c75b002991c511d9dadb6cf91720771e76b701e5f2d91ac9ede4b168265 vmware-modules.initd"
-sha512sums="34b540ee0fee41ff636113ea7346c907b4fbce5c8c34fcda0f38f711bc2ef1adab8e508c75a413d737b7c882bb401aed1711e04aed01e93eb30875491dbf8680 open-vm-tools-9.2.0-799703.tar.gz
-6e9215e6e11343186473202930e1d4659fd906c5933167fbf9892b496e3c20abe2f4a2ba7165cddd6849a2458866623bf3eb1d2f8790778fd8e9fdf1a34648d5 linux-3.6-build-fix.patch
+sha512sums="13490bdff2b8b316b1cd09e06c76293f21b83ede025ded5ddc71251e4f64279296f7dd0f248335f7e3d0714759be13f07263f154683878870a062c9ba55644fc open-vm-tools-9.2.2-893683.tar.gz
+2182873330d80d37dfaaccb0b91c4fd25c938ed54979e8a5f9f04f332542c784084b0a10a83e9679f5bfbca4d2e8727b03dc3a23b473692212cc3f7a9894f413 linux-3.8.patch
a2fb52dd5bb323e7bba62ace64e655536c5d103f66bde17266762ecd6327de1ffc629acaa9e22814b23e09239cb7685c4bb0748362d6b2f0d6c34260cb09edc6 vmci_driver_c.patch
639098221975cadaed0ae0f32454a6718ceaa5f43f17d949a84a85dee56fbf5f9e6248899c10a46b12c9c9cf28b837d83a37c25aba62b11cb7849a1cf8d32e1e vmware-modules.initd"
diff --git a/main/open-vm-tools-grsec/linux-3.6-build-fix.patch b/main/open-vm-tools-grsec/linux-3.6-build-fix.patch
deleted file mode 100644
index f012a3ff1c..0000000000
--- a/main/open-vm-tools-grsec/linux-3.6-build-fix.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -wbBur open-vm-tools-2012.05.21-724730.org/modules/linux/vmhgfs/inode.c open-vm-tools-2012.05.21-724730/modules/linux/vmhgfs/inode.c
---- open-vm-tools-2012.05.21-724730.org/modules/linux/vmhgfs/inode.c 2012-05-23 00:12:52.000000000 +0400
-+++ open-vm-tools-2012.05.21-724730/modules/linux/vmhgfs/inode.c 2012-10-02 15:39:47.000000000 +0400
-@@ -1801,7 +1802,7 @@
- #else
- if (mask & MAY_ACCESS) { /* For sys_access. */
- #endif
-- struct list_head *pos;
-+ struct hlist_node *pos;
- int dcount = 0;
- struct dentry *dentry = NULL;
-
-@@ -1817,7 +1818,7 @@
- #endif
-
- /* Find a dentry with valid d_count. Refer bug 587789. */
-- list_for_each(pos, &inode->i_dentry) {
-+ list_for_each(pos, inode->i_dentry.first) {
- dentry = list_entry(pos, struct dentry, d_alias);
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
- dcount = atomic_read(&dentry->d_count);
-diff -wbBur open-vm-tools-2012.05.21-724730.org/modules/linux/vmhgfs/page.c open-vm-tools-2012.05.21-724730/modules/linux/vmhgfs/page.c
---- open-vm-tools-2012.05.21-724730.org/modules/linux/vmhgfs/page.c 2012-05-23 00:12:52.000000000 +0400
-+++ open-vm-tools-2012.05.21-724730/modules/linux/vmhgfs/page.c 2012-10-02 15:41:38.000000000 +0400
-@@ -893,7 +893,7 @@
- */
- if ((offset >= currentFileSize) ||
- ((pageFrom == 0) && (offset + pageTo) >= currentFileSize)) {
-- void *kaddr = kmap_atomic(page, KM_USER0);
-+ void *kaddr = kmap_atomic(page);
-
- if (pageFrom) {
- memset(kaddr, 0, pageFrom);
-@@ -901,7 +901,7 @@
- if (pageTo < PAGE_CACHE_SIZE) {
- memset(kaddr + pageTo, 0, PAGE_CACHE_SIZE - pageTo);
- }
-- kunmap_atomic(kaddr, KM_USER0);
-+ kunmap_atomic(kaddr);
- flush_dcache_page(page);
- }
- }
-diff -wbBur open-vm-tools-2012.05.21-724730.org/modules/linux/vmsync/sync.c open-vm-tools-2012.05.21-724730/modules/linux/vmsync/sync.c
---- open-vm-tools-2012.05.21-724730.org/modules/linux/vmsync/sync.c 2012-05-23 00:12:52.000000000 +0400
-+++ open-vm-tools-2012.05.21-724730/modules/linux/vmsync/sync.c 2012-10-02 15:23:56.000000000 +0400
-@@ -162,7 +162,7 @@
- cancel_delayed_work(&state->thawTask);
- list_for_each_safe(cur, tmp, &state->devices) {
- dev = list_entry(cur, VmSyncBlockDevice, list);
-- if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) {
-+ if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) {
- thaw_bdev(dev->bdev, dev->sb);
- atomic_dec(&gFreezeCount);
- }
-@@ -237,7 +237,7 @@
- * the superblock is already frozen.
- */
- if (inode->i_sb->s_bdev == NULL ||
-- inode->i_sb->s_frozen != SB_UNFROZEN) {
-+ inode->i_sb->s_writers.frozen != SB_UNFROZEN) {
- result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY;
- compat_path_release(&nd);
- goto exit;
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
+
+