diff -Nru virtualbox-5.1.38-dfsg/debian/changelog virtualbox-5.1.38-dfsg/debian/changelog --- virtualbox-5.1.38-dfsg/debian/changelog 2019-01-17 18:31:40.000000000 +0100 +++ virtualbox-5.1.38-dfsg/debian/changelog 2019-02-28 12:54:05.000000000 +0100 @@ -1,3 +1,11 @@ +virtualbox (5.1.38-dfsg-0ubuntu1.16.04.3) xenial; urgency=medium + + * debian/patches/fix-compile-for-xenial-kernel.patch + - Fix for LP: #1818049 (virtualbox dkms modules fail to build with + linux 4.4.0-143.169) + + -- Kleber Sacilotto de Souza Thu, 28 Feb 2019 12:52:28 +0100 + virtualbox (5.1.38-dfsg-0ubuntu1.16.04.2) xenial-security; urgency=medium * debian/patches/fix-for-guest-to-host-escape-vulnerability.patch: diff -Nru virtualbox-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch virtualbox-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch --- virtualbox-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch 1970-01-01 01:00:00.000000000 +0100 +++ virtualbox-5.1.38-dfsg/debian/patches/fix-compile-for-xenial-kernel.patch 2019-02-28 12:57:56.000000000 +0100 @@ -0,0 +1,38 @@ +Description: fix compilation after get_user_pages() API change +Author: Kleber Sacilotto de Souza +=================================================================== +--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ++++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c +@@ -1074,7 +1074,9 @@ + if (R0Process == RTR0ProcHandleSelf()) + rc = get_user_pages(R3Ptr, /* Where from. */ + cPages, /* How many pages. */ +-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) ++# if (GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)) || \ ++ ((GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)) && \ ++ (GET_USER_PAGES_API < KERNEL_VERSION(4, 5, 0))) + fWrite ? FOLL_WRITE | /* Write to memory. */ + FOLL_FORCE /* force write access. */ + : 0, /* Write to memory. */ +@@ -1094,7 +1096,9 @@ + pTask->mm, /* Whose pages. */ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ +-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) ++# if (GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)) || \ ++ ((GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)) && \ ++ (GET_USER_PAGES_API < KERNEL_VERSION(4, 5, 0))) + fWrite ? FOLL_WRITE | /* Write to memory. */ + FOLL_FORCE /* force write access. */ + : 0, /* Write to memory. */ +@@ -1113,7 +1117,9 @@ + pTask->mm, /* Whose pages. */ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ +-# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) ++# if (GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0)) || \ ++ ((GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168)) && \ ++ (GET_USER_PAGES_API < KERNEL_VERSION(4, 5, 0))) + fWrite ? FOLL_WRITE | /* Write to memory. */ + FOLL_FORCE /* force write access. */ + : 0, /* Write to memory. */ diff -Nru virtualbox-5.1.38-dfsg/debian/patches/series virtualbox-5.1.38-dfsg/debian/patches/series --- virtualbox-5.1.38-dfsg/debian/patches/series 2019-01-17 18:31:40.000000000 +0100 +++ virtualbox-5.1.38-dfsg/debian/patches/series 2019-02-28 12:48:26.000000000 +0100 @@ -18,3 +18,4 @@ 37-python-3.6-support.patch 69989.patch fix-guest-to-host-escape-vulnerability.patch +fix-compile-for-xenial-kernel.patch