Package: virtualbox-dkms Version: 5.1.8-dfsg-6~bpo8+2 Severity: important Tags: patch
Dear Maintainer, I'm running kernels from backports on a few development machines. With the latest version 4.9.0, virtualbox dkms does not compile any more. The problem is related to a small change in kernel API, I include a patch. Regards, Antonio -- System Information: Debian Release: 8.7 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.8.0-0.bpo.2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages virtualbox-dkms depends on: ii dkms 2.2.0.3-2 Versions of packages virtualbox-dkms recommends: ii virtualbox 5.1.8-dfsg-6~bpo8+2 virtualbox-dkms suggests no packages. -- no debconf information
--- r0drv/linux/memobj-r0drv-linux.c.dist 2017-03-02 08:27:07.162465346 +0100 +++ r0drv/linux/memobj-r0drv-linux.c 2017-03-02 08:26:39.489366319 +0100 @@ -1045,7 +1045,27 @@ /* * Get user pages. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + if (R0Process == RTR0ProcHandleSelf()) + rc = get_user_pages(R3Ptr, /* Where from. */ + cPages, /* How many pages. */ + fWrite ? FOLL_WRITE | FOLL_FORCE : 0, /* Write to memory, force write access. */ + &pMemLnx->apPages[0], /* Page array. */ + papVMAs); /* vmas */ + /* + * Actually this should not happen at the moment as call this function + * only for our own process. + */ + else + rc = get_user_pages_remote( + pTask, /* Task for fault accounting. */ + pTask->mm, /* Whose pages. */ + R3Ptr, /* Where from. */ + cPages, /* How many pages. */ + fWrite ? FOLL_WRITE | FOLL_FORCE : 0, /* Write to memory, force write access. */ + &pMemLnx->apPages[0], /* Page array. */ + papVMAs); /* vmas */ +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) if (R0Process == RTR0ProcHandleSelf()) rc = get_user_pages(R3Ptr, /* Where from. */ cPages, /* How many pages. */