If you live in the stable environment, you will notice that Patrick has issued a new update on the kernel packages that fixed several security vulnerabilities and also some other minor issues found during kernel development and backported to earlier LTS release. Unfortunately, this new release broke some user-space application as they changed some of the API during the development, which was
get_user_pages. It’s still unknown why this changes happening on -stable releases which shouldn’t change any interfaces.
On my system, it broke the virtual box, both from source and also binary distribution from Oracle. It failed here with this message:
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1113:18: error: too many arguments to function ‘get_user_pages’
rc = get_user_pages(pTask, /* Task for fault accounting. */
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:101:0,
include/linux/mm.h:1200:6: note: declared here
Other people spotted a breakage on NVidia driver as well, although a new beta driver is available that fixed this issue. Unfortunately, this issue is not yet fixed in VirtualBox case. There’s a patch available, but at this time of writing, it hasn’t landed in VirtualBox’s SVN repository.
I managed to rebuilt the kernel modules under binary distribution from Oracle (Thanks to LQ). Here’s how to do it:
- Run the installer (it will fail to build the kernel modules for the first time)
- open /usr/src/vboxhost-6.0.4/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
- Change the bold part (there are 3 places where you need to apply)
- Run /sbin/vboxconfig
if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) fWrite ? FOLL_WRITE | /* Write to memory. */ FOLL_FORCE /* force write access. */ : 0, /* Write to memory. */ into if GET_USER_PAGES_API >= KERNEL_VERSION(4, 4, 168) fWrite ? FOLL_WRITE | /* Write to memory. */ FOLL_FORCE /* force write access. */ : 0, /* Write to memory. */