Package: virtualbox-dkms
Version: 4.1.18-dfsg-2
Severity: important
Tags: upstream patch

I'm attaching a patch to compile with debian 3.7 kernel
I don't known when VM_RESERVED gone in kernel, my patch checks for 3.7
I've seen other reports about 3.6 but I've opened a new bug since they are
duplicated and confusing.

the check can be done on VM_RESERVED definition but the better way
would be find when removed in the kernel. I don't have a kernel git tree now

Regards


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages virtualbox-dkms depends on:
pn  dkms        <none>
ii  dpkg        1.16.9
pn  virtualbox  <none>

virtualbox-dkms recommends no packages.

virtualbox-dkms suggests no packages.
diff -ur virtualbox-4.1.18.orig/r0drv/linux/memobj-r0drv-linux.c virtualbox-4.1.18/r0drv/linux/memobj-r0drv-linux.c
--- virtualbox-4.1.18.orig/r0drv/linux/memobj-r0drv-linux.c	2012-06-20 15:18:16.000000000 +0200
+++ virtualbox-4.1.18/r0drv/linux/memobj-r0drv-linux.c	2013-01-21 00:13:52.623084810 +0100
@@ -1448,7 +1448,11 @@
 
 #if   defined(VBOX_USE_INSERT_PAGE) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
                     rc = vm_insert_page(vma, ulAddrCur, pMemLnxToMap->apPages[iPage]);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)
                     vma->vm_flags |= VM_RESERVED; /* This flag helps making 100% sure some bad stuff wont happen (swap, core, ++). */
+#else
+                    vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+#endif
 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
                     rc = remap_pfn_range(vma, ulAddrCur, page_to_pfn(pMemLnxToMap->apPages[iPage]), PAGE_SIZE, fPg);
 #elif defined(VBOX_USE_PAE_HACK)

Reply via email to