VirtualBox

Ticket #16966 (closed defect: fixed)

Opened 7 weeks ago

Last modified 7 days ago

get_user_pages() interface change backported on OpenSUSE -> fixed in 5.1.28

Reported by: dimchub Owned by:
Priority: critical Component: host support
Version: VirtualBox 5.1.26 Keywords:
Cc: Guest type: all
Host type: Linux

Description

Several changes to the linux kernel memory management interface had been backported on OpenSUSE.

These two patches are

mm/gup: Overload get_user_pages() functions

 https://github.com/torvalds/linux/commit/cde70140fed8429acf7a14e2e2cbd3e329036653 and

mm/gup: Remove the macro overload API migration helpers from the get_user*() APIs

 https://github.com/torvalds/linux/commit/c12d2da56d0e07d230968ee2305aaa86b93a6832

This leads to the failure of vboxdrv compilation on OpenSUSE Leap 42.3 with the following diagnostics in /var/log/vbox-install.log:

/usr/src/linux-4.4.76-1/include/linux/mm.h:1264:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘int’
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1117:33: error: too many arguments to function ‘get_user_pages’
                                 papVMAs);               /* vmas */
                                 ^
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:
/usr/src/linux-4.4.76-1/include/linux/mm.h:1264:6: note: declared here
 long get_user_pages(unsigned long start, unsigned long nr_pages,
      ^

As one can see the kernel version here is 4.4.76-1, however the get_user_pages() interface looks already has the changes from Ingo Molnar that went into the 4.6.y series.

Attached is the vbox-install.log and the mm.h file provided with the distribution.

Attachments

mm.h Download (74.4 KB) - added by dimchub 7 weeks ago.
include/linux/mm.h file provided with OpenSUSE 42.3
vbox-install.log.gz Download (2.8 KB) - added by dimchub 7 weeks ago.
vbox-install.log from failing installation
vbox-install.log Download (44.1 KB) - added by dimchub 7 weeks ago.
uncompressed vbox-install.log
memobj-2.patch Download (2.5 KB) - added by dimchub 7 weeks ago.
A quick fix that pushes all linux version checks for new mm/gup code back to 4.4.0

Change History

Changed 7 weeks ago by dimchub

  • attachment mm.h Download added

include/linux/mm.h file provided with OpenSUSE 42.3

Changed 7 weeks ago by dimchub

vbox-install.log from failing installation

Changed 7 weeks ago by dimchub

uncompressed vbox-install.log

Changed 7 weeks ago by dimchub

A quick fix that pushes all linux version checks for new mm/gup code back to 4.4.0

comment:1 Changed 7 weeks ago by dimchub

Added a patch that seems to fix the immediate issue on OpenSUSE Leap 42.3.

comment:2 Changed 7 weeks ago by frank

Sorry, that fix is not appropriate because it would break vanilla kernels. Any way to detect the specific openSUSE kernels?

comment:3 Changed 7 weeks ago by frank

Could you point me to the browsable Leap 42.3 reopsitory, in particular to the source code of the Leap kernel?

comment:4 follow-up: ↓ 5 Changed 7 weeks ago by frank

Nevermind, found it.

comment:5 in reply to: ↑ 4 Changed 7 weeks ago by dimchub

In case someone finds it helpful. OpenSUSE developers maintain the kernel tree with their patches at  http://kernel.opensuse.org/cgit/kernel and the patches themselves at  http://kernel.opensuse.org/cgit/kernel-source. The patches that broke virtual box installation were introduced by Joerg Roedel in December 2016-March 2017.

Last edited 7 weeks ago by dimchub (previous) (diff)

comment:6 follow-up: ↓ 7 Changed 7 weeks ago by frank

Fixed in diff:@68214:68217. These changes will be part of the next maintenance release.

comment:7 in reply to: ↑ 6 Changed 7 weeks ago by dimchub

Thank you. This is a nice one.

comment:8 Changed 6 weeks ago by ...don

Same issue with SuSE Leap 42.3 and VB 5.1.26. Temporary fix was to revert to kernel 4.4.74

comment:9 Changed 6 weeks ago by frank

Just use the most recent 5.1 Guest Additions ISO image from our test builds page.

comment:10 Changed 7 days ago by michael

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from get_user_pages() interface change backported on OpenSUSE to get_user_pages() interface change backported on OpenSUSE -> fixed in 5.1.28
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use