Package: virtualbox-ose-source Version: 1.5.6-dfsg-1 Severity: wishlist Tags: patch
*** Please type your report below this line *** The virtualbox driver module will fail to load if compiled for 2.6.25 kernels with the following message: vboxdrv: Unknown symbol change_page_attr Cause is that this symbol was removed in 2.6.25. The attached patch adds back that symbol for the vboxdrv module and has been tested to work. The patch is based on the series of patches here: http://article.gmane.org/gmane.comp.emulators.virtualbox.devel/462 Most of these patches had already been included in the 1.5.6 release, but for some reason the change_page_attr did not make it. Note that I have made a minor change to the patch above to make it a bit more conservative. See also this message from Frank Mehnert on the VB user list: http://vbox.innotek.de/pipermail/vbox-users/2008-February/002765.html Please consider applying this patch until that update becomes available. Cheers, FJP -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-rc3 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages virtualbox-ose-source depends on: ii bzip2 1.0.4-3 high-quality block-sorting file co ii debhelper 6.0.5 helper programs for debian/rules ii dpatch 2.0.29 patch maintenance system for Debia ii kbuild 1:0.1.2svn1377-5 framework for writing simple makef ii module-assistant 0.10.11.0 tool to make module package creati virtualbox-ose-source recommends no packages. -- no debconf information
diff -ur virtualbox-ose_1.5.6/r0drv/linux/the-linux-kernel.h virtualbox-ose/r0drv/linux/the-linux-kernel.h
--- virtualbox-ose_1.5.6/r0drv/linux/the-linux-kernel.h 2008-02-23 11:10:06.000000000 +0100
+++ virtualbox-ose/r0drv/linux/the-linux-kernel.h 2008-02-27 01:57:20.000000000 +0100
@@ -225,12 +225,16 @@
#undef bool
/*
- * There are post-2.6.24 kernels (confusingly with unchanged version number)
- * which eliminate macros which were marked as deprecated.
+ * The 2.6.25 kernel eliminates macros that were marked as deprecated and eliminates
+ * routine change_page_attr() in favor of the set_pages_* API.
*/
#ifndef __attribute_used__
#define __attribute_used__ __used
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+int change_page_attr(struct page *page, int numpages, pgprot_t prot);
+#endif
+
#endif
diff -ur virtualbox-ose_1.5.6/linux/SUPDrv-linux.c virtualbox-ose/linux/SUPDrv-linux.c
--- virtualbox-ose_1.5.6/linux/SUPDrv-linux.c 2008-02-23 11:10:05.000000000 +0100
+++ virtualbox-ose/linux/SUPDrv-linux.c 2008-02-27 01:54:17.000000000 +0100
@@ -2069,6 +2069,17 @@
/* GCC C++ hack. */
unsigned __gxx_personality_v0 = 0xcccccccc;
+/* Add the change_page_attr routine for kernels 2.6.25 or later */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
+int change_page_attr(struct page *page, int numpages, pgprot_t prot)
+{
+ /* use the set_pages_* API */
+ if (pgprot_val(prot) & _PAGE_NX)
+ set_pages_nx(page, numpages);
+ set_pages_uc(page, numpages);
+ return 0;
+}
+#endif
module_init(VBoxSupDrvInit);
module_exit(VBoxSupDrvUnload);
signature.asc
Description: This is a digitally signed message part.

