virtualbox dkms modules fail to build with linux 4.4.0-143.169 [error: too many arguments to function ‘get_user_pages’]

Bug #1818049 reported by Kleber Sacilotto de Souza on 2019-02-28
230
This bug affects 43 people
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
High
Unassigned
Trusty
High
Unassigned
Xenial
High
Unassigned
virtualbox-hwe (Ubuntu)
High
Unassigned
Xenial
High
Unassigned
virtualbox-lts-xenial (Ubuntu)
Trusty
High
Unassigned

Bug Description

[Impact]
virtualbox dkms modules fail to build after Ubuntu kernel 4.4 backported the following fix from upstream stable, which is included on xenial kernel 4.4.0-143.169 that's currently in -proposed.

mm: replace get_user_pages() write/force parameters with gup_flags
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial/commit/?h=master-next&id=9c72ad08f1510332e9314046e6a2adba5064f39a

Excerpt from ./virtualbox/5.1.38/build/make.log:
------------------------------------------------
/var/lib/dkms/virtualbox/5.1.38/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1112:18: error: too many arguments to function ‘get_user_pages’
             rc = get_user_pages(pTask, /* Task for fault accounting. */
                  ^
In file included from /var/lib/dkms/virtualbox/5.1.38/build/vboxdrv/r0drv/linux/the-linux-kernel.h:98:0,
                 from /var/lib/dkms/virtualbox/5.1.38/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: declared here
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
------------------------------------------------

[Test case]
Install virtualbox dkms packages (virtualbox-dkms and virtualbox-guest-dkms) with Ubuntu linux 4.4.0-143

CVE References

Changed in virtualbox (Ubuntu Trusty):
status: New → Invalid
Changed in virtualbox-lts-xenial (Ubuntu Xenial):
status: New → Invalid
Changed in virtualbox-hwe (Ubuntu Trusty):
status: New → Invalid

Debdiff for virtualbox on xenial, to be applied on top of version 5.1.38-dfsg-0ubuntu1.16.04.2.

Debdiff for virtualbox-hwe on xenial, to be applied on top of version 5.1.38-dfsg-0ubuntu1.16.04.1.

Debdiff for virtualbox-lts-xenial on trusty, to be applied on top of version 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1~14.04.4.

tags: added: patch
summary: - virtualbox dkms modules fail to build with linux 4.4.0-143.169
+ virtualbox dkms modules fail to build with linux 4.4.0-143.169 [error:
+ too many arguments to function ‘get_user_pages’]
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtualbox (Ubuntu Xenial):
status: New → Confirmed
Changed in virtualbox (Ubuntu):
status: New → Confirmed
Changed in virtualbox-hwe (Ubuntu Xenial):
status: New → Confirmed
Changed in virtualbox-hwe (Ubuntu):
status: New → Confirmed
Changed in virtualbox-lts-xenial (Ubuntu Trusty):
status: New → Confirmed
Changed in virtualbox-lts-xenial (Ubuntu):
status: New → Confirmed
Norbert (nrbrtx) on 2019-03-01
tags: added: trusty xenial

trusty diff updated

Changed in virtualbox-lts-xenial (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in virtualbox-hwe (Ubuntu Xenial):
status: Confirmed → In Progress
Changed in virtualbox (Ubuntu Xenial):
status: Confirmed → In Progress

Hello Kleber, or anyone else affected,

Accepted virtualbox into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/virtualbox/5.1.38-dfsg-0ubuntu1.16.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in virtualbox (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in virtualbox-hwe (Ubuntu Xenial):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello Kleber, or anyone else affected,

Accepted virtualbox-hwe into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/virtualbox-hwe/5.1.38-dfsg-0ubuntu1.16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Andy Whitcroft (apw) wrote :

Hello Kleber, or anyone else affected,

Accepted virtualbox-lts-xenial into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/virtualbox-lts-xenial/4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1~14.04.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in virtualbox-lts-xenial (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed-trusty
no longer affects: virtualbox-lts-xenial (Ubuntu)
no longer affects: virtualbox-lts-xenial (Ubuntu Xenial)
no longer affects: virtualbox-hwe (Ubuntu Trusty)
Changed in virtualbox (Ubuntu):
status: Confirmed → Fix Released
Changed in virtualbox-hwe (Ubuntu):
status: Confirmed → Fix Released
Changed in virtualbox (Ubuntu):
importance: Undecided → High
Changed in virtualbox (Ubuntu Trusty):
importance: Undecided → High
Changed in virtualbox (Ubuntu Xenial):
importance: Undecided → High
Changed in virtualbox-hwe (Ubuntu):
importance: Undecided → High
Changed in virtualbox-hwe (Ubuntu Xenial):
importance: Undecided → High
Changed in virtualbox-lts-xenial (Ubuntu Trusty):
importance: Undecided → High
Changed in virtualbox (Ubuntu Trusty):
status: Invalid → Won't Fix

I could check the kernel easily with dkms enabling all proposed pocket,
I had to reboot with 4.4.0-143 to check dkms installation, and after that everything went fine.

The change is a no-op for virtualbox-hwe, since the change is in r0drv, and that code is run only on host, but we should keep them in sync, virtualbox-hwe is still installable correctly.

Also kernel 4.15 is still building correctly.

tags: added: verification-done verification-done-trusty verification-done-xenial
removed: verification-needed verification-needed-trusty verification-needed-xenial

On trusty, virtualbox-guest-dkms-lts-xenial=4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1~14.04.5 is working as expected with dpk

Please ignore my previous comment. It should read:

On trusty, virtualbox-guest-dkms-lts-xenial=4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1~14.04.5 is working as expected with linux-generic-lts-xenial=4.4.0.143.125.

The verification of the Stable Release Update for virtualbox has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox-hwe - 5.1.38-dfsg-0ubuntu1.16.04.2

---------------
virtualbox-hwe (5.1.38-dfsg-0ubuntu1.16.04.2) 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 <email address hidden> Thu, 28 Feb 2019 16:06:20 +0100

Changed in virtualbox-hwe (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox - 5.1.38-dfsg-0ubuntu1.16.04.3

---------------
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 <email address hidden> Thu, 28 Feb 2019 12:52:28 +0100

Changed in virtualbox (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox-lts-xenial - 4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1~14.04.6

---------------
virtualbox-lts-xenial (4.3.36-dfsg-1+deb8u1ubuntu1.14.04.1~14.04.6) trusty; urgency=medium

  * debian/patches/fix-for-guest-to-host-escape-vulnerability.patch:
    - Apply patch for guest-to-host escape vulnerability (LP: #1809156)
    - CVE-2018-3294

 -- Gianfranco Costamagna <email address hidden> Mon, 11 Mar 2019 17:54:59 +0100

Changed in virtualbox-lts-xenial (Ubuntu Trusty):
status: Fix Committed → Fix Released
arQon (pf.arqon) wrote :

This appears to have either gone too far or not far enough, since the current xenial of:

4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

now fails to build the virtualbox client modules with:
---------------
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeLockUser’:
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1123:33: warning: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
                                 fWrite, /* force write access. */
                                 ^
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:101:0,
                 from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: expected ‘struct page **’ but argument is of type ‘int’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1125:33: warning: passing argument 7 of ‘get_user_pages’ from incompatible pointer type [-Wincompatible-pointer-types]
                                 &pMemLnx->apPages[0], /* Page array. */
                                 ^
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:101:0,
                 from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
/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,
                 from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: declared here
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
scripts/Makefile.build:285: recipe for target '/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o' failed
---------------

against the current virtualbox release (6.04). The -142 kernels didn't have this problem.

Sidenote: my understanding is that the dkms modules haven't been required by virtualbox in several years now. The 5.1.xx series is also probably obsolete.

arQon (pf.arqon) wrote :

Just reverted to the -142 to double-check, and that does indeed build just fine.

5.1.38 is of course the version in the Ubuntu repository for xenial, so the obsolescence issues have to be ignored.

I don't know what the process for resolving the conflict is here, but -143 breaks xenial guests, and that's definitely a Bad Thing.

Peter Milner (pet3rm) wrote :

I also encountered this issue after upgrading to 4.4.0-143 on xenial this evening. Virtualbox modules could not be loaded e.g. vboxdrv. After attempting many solutions including updating to the latest version of virtual box I ended up here. My /var/log/vbox-setup.log was bascially identical to arQon's. After rebooting into 4.4.0-142 everything is loading as expected.

I have the same problem as arQon.

Logged as sub-issue of #1820526 (found this ticket after opening that).

Norbert (nrbrtx) wrote :

Today this problem was discussed on AskUbuntu - https://askubuntu.com/q/1126591/66509 .

Francis Lessard (flessard) wrote :

I ran into the same issues after upgrading to 4.4.0-143 on Ubuntu 16.04.6 LTS (xenial) on serveral servers.

I was able to temporarely fix my issues by using two different techniques :

- Reboot back to 4.4.0-142

or

- Stay on 4.4.0-143 and upgrade VitrualBox to test build 129109
  (https://www.virtualbox.org/wiki/Testbuilds) - (important instructions to read on this page)

beljoost (tempample) wrote :

Here running 16.04 LTS and VirtualBox 5.2.4 r119785.
I also (temporarily) solved it by reverting to 4.4.0-142.

Also discussed on https://forums.virtualbox.org/viewtopic.php?f=7&t=91833
Unfortunately a possible solution mentioned there is using the Ubuntu package repository (a fork of VirtualBox). If I want support on their forums, I have to use the official VirtualBox (from virtualbox.org). So I hope a -144 gets available soon.

Mark Lennox (pad22) wrote :

Had the same issue with 4.4.0-143.

First, I upgraded VirtualBox to 5.2, which didn't help. So, I reverted back to 5.1.138. Still, no luck.

I then booted into kernel 4.4.0-142 and that fixed the problem.

Akima (8-me-w) wrote :

Just above comment 15 Mathew Hodson (mathew-hodson) changed the Ubuntu Trusty status to: Invalid → Won't Fix. Why is this?

This is broken on one of my Trusty systems.

My system is as follows:

> $ uname -a
> Linux hostname 4.4.0-143-generic #169~14.04.2-Ubuntu SMP Wed Feb 13 15:00:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>
> $ lsb_release -d
> Description: Ubuntu 14.04.6 LTS

If I try to load a virtual machine I immediately get a GUI error message box popup stating:

> VirtualBox - Error in suplibOsinit
>
> The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. ...

If I reboot into the previously installed kernel (4.4.0-142-generic), I do not get the error and can successfully run my virtual machine.

Note the output of the following commands:

> $ find /lib -name "*vboxdrv*"
> /lib/modules/4.4.0-142-generic/updates/dkms/vboxdrv.ko
>
> $ ls -1 /lib/modules/
> 4.4.0-142-generic
> 4.4.0-143-generic

The vboxdrv module is present for the -142 kernel but not the -143

Please can this also be fixed for Trusty.

G'kar (r0-ubuntu) wrote :

Same with virtualbox-6.0 6.0.4-128413~Ubuntu~xenial after upgrading to 4.4.0-143 on Ubuntu 16.04.6 LTS

volomike (volomike) wrote :

Bug confirmed for me too with Virtualbox 5.2.22 used on Mac OSX 10.14.3 with Ubuntu Desktop 16.04.6. I rolled kernel back to 4.4.0-142 and forced a vbox extensions rebuild (https://askubuntu.com/a/1127079/1698) and was operational again but only temporarily because I'm forced to remain on the old kernel until this bug is fixed.

Andreas Epple (sowaco) wrote :

I have the same problems with:
Kernel 4.4.0-143-generic
Virtualbox 5.2.26 r128414
Ubuntu 16.04.6 LTS

My workaround:
Select previous Kernel 4.4.0-142-generic through "GRUB Customizer".
Reboot.

No rebuild/reinstall of VBox components neccessary.

Dave Musicant (musicant) wrote :

Bug confirmed for me with VirtualBox 5.2.26 on Ubuntu 16.04.6, with kernel 4.4.0-143-generic.

you are all talking wrt virtualbox releases that are *not* in the archive.
Please stop polluting this bug, if you are not using the official ubuntu released packages.

If you want upstream packages, please go upstream and install their version, this is nothing we can solve on Ubuntu side.
(or use virtualbox-source package to build the kernel modules after fixing the code).

Akima (8-me-w) wrote :

Gianfranco: I made comment 30 confirming that I have this bug on a Trusty system:

https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1818049/comments/30

For the record: I am using the version of Virtualbox supplied with Trusty. It is version: 4.3.36

Bug confirmed for me with VirtualBox Version 6.0.4 r128413 (Qt5.6.1) on 4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Peter Milner (pet3rm) wrote :

Gianfranco: This issue affects the archive release of virtualbox on Xenial. This what I was using when I encountered this bug. In the process of trying to get up and running again, I attempted to use the Oracle packages ... but they were also affected by this bug. It affects both sets of packages. The only way to get back was to revert the kernel to -143.

Peter Milner (pet3rm) wrote :

Sorry ... reverting to -142 ... (not -143) was the workaround.

George Sibiya (devstafff.gs) wrote :

I can confirm that virtualbox test build (https://www.virtualbox.org/wiki/Testbuilds) works just fine on Ubuntu 16.04 with kernel 4.4.0-143-generic

enyone (enyone) wrote :

The reason for this is distro maintainer patches, not the changes in mainline kernel...

http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux_4.4.0-143.169.diff.gz

--- linux-4.4.0.orig/include/linux/mm.h
+++ linux-4.4.0/include/linux/mm.h
@@ -1193,19 +1221,17 @@
               struct vm_area_struct **vmas, int *nonblocking);
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
             unsigned long start, unsigned long nr_pages,
-            int write, int force, struct page **pages,
+            unsigned int gup_flags, struct page **pages,
             struct vm_area_struct **vmas);
 long get_user_pages_locked(struct task_struct *tsk, struct mm_struct *mm,
             unsigned long start, unsigned long nr_pages,
-            int write, int force, struct page **pages,
-            int *locked);
+            unsigned int gup_flags, struct page **pages, int *locked);
 long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
                    unsigned long start, unsigned long nr_pages,
-                   int write, int force, struct page **pages,
-                   unsigned int gup_flags);
+                   struct page **pages, unsigned int gup_flags);
 long get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
             unsigned long start, unsigned long nr_pages,
-            int write, int force, struct page **pages);
+            struct page **pages, unsigned int gup_flags);
 int get_user_pages_fast(unsigned long start, int nr_pages, int write,
             struct page **pages);

@Akima, I'll have a look, looks like it needs patches, yes

@Peter Milner, please post the output of:
dpkg -l |grep virtualbox
dpkg -l |grep linux
and the dkms.log file, thanks!

The fix for trusty is already in proposed pocket, in package
virtualbox 4.3.40-dfsg-0ubuntu14.04.1

Changed in virtualbox (Ubuntu Trusty):
status: Won't Fix → In Progress
Changed in virtualbox-lts-xenial (Ubuntu Trusty):
status: Fix Released → In Progress
Changed in virtualbox (Ubuntu Trusty):
status: In Progress → Fix Released
Changed in virtualbox-lts-xenial (Ubuntu Trusty):
status: In Progress → Fix Released

the fix for xenial is in:
virtualbox 5.1.38-dfsg-0ubuntu1.16.04.3
and
virtualbox-hwe 5.1.38-dfsg-0ubuntu1.16.04.2

also trusty:
virtualbox-lts-xenial 4.3.40-dfsg-0ubuntu1.14.04.1~14.04.1
has the fix.
I could update it correctly

goodfaith (goodfaith) wrote :

Bug confirmed for me with VirtualBox Version 6.0.4 r128413 on 4.4.0-143-generic, reverting back to 4.4.0-142-generic resolved issue also.

Ganton (ganton) wrote :

:-(
Bug confirmed for me using Trusty, with VirtualBox Version 4.3.36 on 4.4.0-143-generic,
reverting back to 4.4.0-142-generic resolved issue also.

Andrea (accounting-e) wrote :
Download full text (22.3 KiB)

@Gianfranco
Bug confirmed with Xenial:

cat /var/log/vboxadd-setup.log

In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:98:0,
                 from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: expected ‘struct page **’ but argument is of type ‘int’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1124:33: warning: passing argument 7 of ‘get_user_pages’ from incompatible pointer type [-Wincompatible-pointer-types]
                                 &pMemLnx->apPages[0], /* Page array. */
                                 ^
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:98:0,
                 from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1112: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:98:0,
                 from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31:
include/linux/mm.h:1222:6: note: declared here
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^
scripts/Makefile.build:285: recipe for target '/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o' failed
make[2]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/linux/assert-r0drv-linux.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/r0drv/linux/assert-r0drv-linux.o"; fi; fi;
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.o"; fi; fi;
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/linux/mp-r0drv-linux.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount "/tmp/vbox.0/r0drv/linux/mp-r0drv-linux.o"; fi; fi;
Makefile:1454: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile.include.footer:101: recipe for target 'vboxguest' failed
make: *** [vboxguest] Error 2

dpkg -l |grep virtualbox

ii unity-scope-virtualbox 0.1+13.10.20130723-0ubuntu1 all VirtualBox scope for Unity
ii virtualbox 5.1.38-dfsg-0ubuntu1.16.04.3 amd64 x86 virtualization solution - base binaries
ii virtualbox-dkms 5.1.38-dfsg-0ubuntu1.16.04.3 all x86 virtualization solution - kernel module sources for dkms
ii virtualbox-guest-dkms 5.1.38-dfsg-0ubuntu1.16.04.3 all x86 virtualization solution - guest addition module source for dkms
ii virtualbox-guest-utils ...

Verified that this installed successfully (i.e. no DKMS build failures) on trusty for both -142 and -143 kernels.

virtualbox-lts-xenial 4.3.40-dfsg-0ubuntu1.14.04.1~14.04.1

Robert Merrill (rfmerrill) wrote :

Parallels tools are failing to build for me with similar errors.

@Andrea, I think you did some modifications on your system, maybe dkms is updated, or something similar. I would say it should work, but for some reasons, you messed up with something, and the kernel version check is broken.

oh yeah, I can reproduce with 4.4 kernel (my xenial installation defaults to hwe 4.15 kernel now)

can you please try with the kernel in xenial proposed?
 4.4.0-145.171

Andrea (accounting-e) wrote :

@Gianfranco
No, I have not modified my systems, I have the same problem with all my Xenial virtual machines.
I have tried with Xenial proposed kernel 4.4.0-145 but the problem is the same, see attachment.
Thanks

@Andrea, I don't know what happened on your pc...
can you please install the linux-hwe kernel?
https://wiki.ubuntu.com/Kernel/LTSEnablementStack

Dave Korman (david-korman) wrote :

I have just tried the newly released 4.4.0-145 kernel and the problem is still there. Back to .142 for me.

Jeff Davis (jdavis-n) wrote :

Yes. Problem is still present in 4.4.0-145.

Daniel (udaniil) wrote :

I also can confirm that issue exists on 4.4.0-145.
After I downgraded to 4.4.0-142 and rebuilt virtualbox tools the problem disappeared.

Akima (8-me-w) wrote :

Writing to report that the following upgrade (taken from /var/log/apt/history.log) has resolved my Virtualbox issue:

> Upgrade: virtualbox:amd64 (4.3.36-dfsg-1+deb8u1ubuntu1.14.04.2, 4.3.40-dfsg-0ubuntu14.04.1), virtualbox-dkms:amd64 (4.3.36-dfsg-1+deb8u1ubuntu1.14.04.2, 4.3.40-dfsg-0ubuntu14.04.1), virtualbox-qt:amd64 (4.3.36-dfsg-1+deb8u1ubuntu1.14.04.2, 4.3.40-dfsg-0ubuntu14.04.1)

I am now able to launch Virtualbox virtual machines on this system:

> $ uname -a
> Linux hostname 4.4.0-143-generic #169~14.04.2-Ubuntu SMP Wed Feb 13 15:00:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 14.04.6 LTS
> Release: 14.04
> Codename: trusty

Note: before applying the Virtualbox updates, I made sure to first reboot back into the 4.4.0-143-generic kernel to be sure that the Virtualbox kernel module(s) were built against the correct kernel. Regarding the others here that have found that the latest Virtualbox updates haven't resolved the issue for them, is it possible that they were not booted into the latest generic kernel when they applied the Virtualbox updates? Perhaps the kernel modules are only built for the running kernel.

Dottts (udottts) wrote :

For those who maybe interested..GOT IT WORKING on Vbox 5.2.27. did not try on version 6.0 builds

> DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS" Xenial

> Linux 4.4.0-146-generic #172-Ubuntu SMP Wed Apr 3 09:00:08 UTC 2019 x86_64

https://www.virtualbox.org/wiki/Testbuilds

Downloaded test build Linux 64-bit 5.2.x revision 129666
Downloaded Guest Additions 5.2.x revision 129666

Dottts (udottts) wrote :

CORRECTION: update

meant to state: installed extension-pack PRIOR to "guest"
Downloaded test build Linux 64-bit 5.2.x revision 129666

Downloaded Extension Pack 5.2.x revision 129471

Joseph Huber (huber-joseph) wrote :

Another data point...

I have the following virtualbox test build

VirtualBox-6.0.5-129797-Linux_amd64

up and running with kernel

4.4.0-145-generic #171-Ubuntu SMP Tue Mar 26 12:43:40 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

There were no issues during install, and everything went fine.

Also, for those interested, nvidia-418 from

http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial/main amd64 Packages

has been updated and now builds with the above kernel as well. The nvidia drivers were suffering from the "too many arguments to function ‘get_user_pages’" error as well.

Dinn Eferet (dinneferet) wrote :

Do the latest generic header updates for Ubuntu work with VirtualBox-6.0.4-r128413?

Dinn Eferet (dinneferet) wrote :

Or do you either have to still downgrade the headers or get the VB test build?

Rob Clemens (clemerob) wrote :

My question is similar, but I'm simply trying to use VirtualBox 6.04 (on a Win7 host) and install the Guest Additions package they provide with that build into my Linux Guest. This worked fine until a recent Linux Ubuntu update added kernel headers 4.0.4-143, then VBox Guest Additions failed to start and I could no longer share folders between the Virtual Box host and guest. So I had to roll the kernel headers back to -142 in order to get that to work again, and I've been declining Linux updates ever since. Not an expert in Linux, so I would prefer to wait for an official fix from either Oracle or Canonical instead of test builds or pre-releases. Has anyone used the released version of Virtual Box (6.04 r128413) with the latest Ubuntu 16.04?

djfkc (djfkc) wrote :

I am using VirtualBox 6.0.4r128413(Qt5.6.2) on Windows 10 with Ubuntu 14.04 guest seeing similar errors as above. I have tried installing updates and other workarounds without luck. Would also prefer release vs other builds.

sorry, I don't know how 6.0.4 is patched, 6.0.6 will be out soon hopefully

Dinn Eferet (dinneferet) wrote :

Alright, then. Thanks. Everything's worked fine so far from my end after downgrading the headers. I'll just wait on an official fix too. I mean, "if it ain't broke", right?

Mark Lennox (pad22) wrote :

I wanted to post here to confirm that this has been fixed on the following configuration:

Ubuntu 16.04 LTS
Kernel 4.4.0-145-generic
VirtualBox 6.0.6 r130049

The key here was the fix of (https://www.virtualbox.org/ticket/18315) in VirtualBox 6.0.6, released on April 17, 2019.

Apollo Clark (apolloclark) wrote :

Confirmed the fix is working. I'm running Virtualbox 6.0.6 on an Ubuntu 18.04 LTS host, to build an Ubuntu 16.04 VM guest.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.