Hi. The current vbox-kompat-3.6-3.7.patch won't cleanly apply after the virtualbox source package was updated for a CVE vulnerability, so I'm attaching another version that does. This new patch doesn't change anything else, so won't fix compiling virtualbox modules against Linux 3.8.
-- Chris -- Chris Knadle chris.kna...@coredump.us
diff -Nru virtualbox-4.1.18-dfsg/debian/changelog virtualbox-4.1.18-dfsg/debian/changelog --- virtualbox-4.1.18-dfsg/debian/changelog 2012-10-18 22:41:45.000000000 +0200 +++ virtualbox-4.1.18-dfsg/debian/changelog 2012-12-15 17:21:29.000000000 +0100 @@ -1,3 +1,11 @@ +virtualbox (4.1.18-dfsg-2.1) unstable; urgency=low + + * Non-maintainer upload. + * fix kernel module compilation against v3.6 and v3.7 + (closes: #696011). + + -- aptosid <aptosid@aptosid> Sat, 15 Dec 2012 17:20:57 +0100 + virtualbox (4.1.18-dfsg-2) unstable; urgency=high [ John Paul Adrian Glaubitz ] diff -Nru virtualbox-4.1.18-dfsg/debian/patches/37-kcompat-3.6.patch virtualbox-4.1.18-dfsg/debian/patches/37-kcompat-3.6.patch --- virtualbox-4.1.18-dfsg/debian/patches/37-kcompat-3.6.patch 1970-01-01 01:00:00.000000000 +0100 +++ virtualbox-4.1.18-dfsg/debian/patches/37-kcompat-3.6.patch 2012-12-15 17:15:33.000000000 +0100 @@ -0,0 +1,21 @@ +Description: Fix module FTBFS with kernel 3.6. +Author: Stefan Lippers-Hollmann <s....@gmx.de> +Bug-Debian: #696011 + +partially backport upstream patches for kernel 3.6: + +r42784 | vboxsync | 2012-08-12 22:31:36 +0200 (So, 12. Aug 2012) | 2 Zeilen +Linux 3.6-rc1 compile fix, spaces + +--- a/src/VBox/Additions/linux/drm/vboxvideo_drm.c ++++ b/src/VBox/Additions/linux/drm/vboxvideo_drm.c +@@ -103,7 +103,9 @@ static struct drm_driver driver = + { + /* .driver_features = DRIVER_USE_MTRR, */ + .load = vboxvideo_driver_load, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0) + .reclaim_buffers = drm_core_reclaim_buffers, ++#endif + /* As of Linux 2.6.37, always the internal functions are used. */ + #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 37) && !defined(DRM_RHEL61) + .get_map_ofs = drm_core_get_map_ofs, diff -Nru virtualbox-4.1.18-dfsg/debian/patches/38-kcompat-3.7.patch virtualbox-4.1.18-dfsg/debian/patches/38-kcompat-3.7.patch --- virtualbox-4.1.18-dfsg/debian/patches/38-kcompat-3.7.patch 1970-01-01 01:00:00.000000000 +0100 +++ virtualbox-4.1.18-dfsg/debian/patches/38-kcompat-3.7.patch 2012-12-15 15:57:37.000000000 +0100 @@ -0,0 +1,55 @@ +Description: Fix module FTBFS with kernel 3.7. +Author: Stefan Lippers-Hollmann <s....@gmx.de> +Bug-Debian: #696011 + +backport upstream patches for kernel 3.7: + +r43637 | vboxsync | 2012-10-15 13:14:33 +0200 (Mo, 15. Okt 2012) | 2 Zeilen +Linux 3.7 fixes + +r43674 | vboxsync | 2012-10-18 10:54:34 +0200 (Do, 18. Okt 2012) | 2 Zeilen +configure: fix compilation test for Linux 3.7 headers + +--- a/Config.kmk ++++ b/Config.kmk +@@ -2550,7 +2550,11 @@ if1of ($(KBUILD_TARGET), linux) + $(kernelpath)/include/asm-x86/mach-default \ + $(kernelpath)/arch/x86/include \ + $(kernelpath)/arch/x86/include/asm/mach-default \ ++ $(kernelpath)/arch/x86/include/uapi \ + $(kernelpath)/arch/x86/include/generated \ ++ $(kernelpath)/arch/x86/include/generated/uapi \ ++ $(kernelpath)/include/uapi \ ++ $(kernelpath)/include/generated/uapi \ + $(kernelpath)/include + endif + endif +--- a/configure ++++ b/configure +@@ -1614,7 +1614,8 @@ EOF + cat $ODIR.tmp_src.c >> $LOG + echo "using the following command line:" >> $LOG + echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include" >> $LOG +- $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include >> $LOG 2>&1 ++ $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include \ ++ -I$LINUX/include/generated/uapi >> $LOG 2>&1 + if [ $? -ne 0 ]; then + echo + echo " Linux kernel headers not found at $LINUX" +--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +@@ -1448,7 +1448,13 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser( + + #if defined(VBOX_USE_INSERT_PAGE) && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) + rc = vm_insert_page(vma, ulAddrCur, pMemLnxToMap->apPages[iPage]); +- vma->vm_flags |= VM_RESERVED; /* This flag helps making 100% sure some bad stuff wont happen (swap, core, ++). */ ++ /* Thes flags help making 100% sure some bad stuff wont happen (swap, core, ++). ++ * See remap_pfn_range() in mm/memory.c */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0) ++ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; ++#else ++ vma->vm_flags |= VM_RESERVED; ++#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) diff -Nru virtualbox-4.1.18-dfsg/debian/patches/series virtualbox-4.1.18-dfsg/debian/patches/series --- virtualbox-4.1.18-dfsg/debian/patches/series 2012-10-18 22:39:18.000000000 +0200 +++ virtualbox-4.1.18-dfsg/debian/patches/series 2012-12-15 17:12:00.000000000 +0100 @@ -16,3 +16,5 @@ 36-fix-ftbfs-xserver-112.patch cve-2012-3221.patch CVE-2013-0420.patch +37-kcompat-3.6.patch +38-kcompat-3.7.patch