Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678558 - app-emulation/virtualbox-modules-5.2.22 and 5.2.26 with kernel 4.14.174 - .../work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1112:18: error: too many arguments to function ‘get_user_pages’
Summary: app-emulation/virtualbox-modules-5.2.22 and 5.2.26 with kernel 4.14.174 - ......
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-22 09:37 UTC by Pierre-Yves Bonnetain-Nesterenko
Modified: 2019-08-08 23:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to virtualbox-modules (patch,1.26 KB, patch)
2019-02-24 09:22 UTC, Pierre-Yves Bonnetain-Nesterenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Yves Bonnetain-Nesterenko 2019-02-22 09:37:20 UTC
The ebuild for kernel 4.14.174 got out, so we installed it and are running this kernel. Of course, need to rebuild some modules, i.e. virtualbox-modules.

Building virtualbox-modules against kernel source 4.14.174 fails :

# KERNEL_DIR=/usr/src/linux-4.4.174-gentoo emerge @module-rebuild
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-emulation/virtualbox-modules-5.2.22::gentoo
>>> Failed to emerge app-emulation/virtualbox-modules-5.2.22, Log file:
>>>  '/var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/temp/build.log'

End of build messages :
/var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeLockUser’:
/var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:1122: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 /var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/the-linux-kernel.h:98:0,
                 from /var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
/usr/src/linux-4.4.174-gentoo/include/linux/mm.h:1200:6: note: expected ‘struct page **’ but argument is of type ‘int’
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^~~~~~~~~~~~~~
/var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/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 /var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/the-linux-kernel.h:98:0,
                 from /var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
/usr/src/linux-4.4.174-gentoo/include/linux/mm.h:1200: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,
      ^~~~~~~~~~~~~~
/var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/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/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/the-linux-kernel.h:98:0,
                 from /var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31:
/usr/src/linux-4.4.174-gentoo/include/linux/mm.h:1200:6: note: declared here
 long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
      ^~~~~~~~~~~~~~
make[4]: *** [/usr/src/linux-4.4.174-gentoo/scripts/Makefile.build:277: /var/tmp/portage/app-emulation/virtualbox-modules-5.2.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[4]: *** Waiting for unfinished jobs....

Whereas using previous kernel source dir compiles correctly :

$ KERNEL_DIR=/usr/src/linux-4.4.164-gentoo emerge @module-rebuild 
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-emulation/virtualbox-modules-5.2.22::gentoo
>>> Installing (1 of 1) app-emulation/virtualbox-modules-5.2.22::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 2.42, 1.60, 1.36
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-02-22 09:52:53 UTC
Analysis at bug #675310.
Comment 2 Pierre-Yves Bonnetain-Nesterenko 2019-02-24 09:22:46 UTC
Created attachment 566250 [details, diff]
Patch to virtualbox-modules

This patch, taken from https://www.linuxquestions.org/questions/slackware-14/virtualbox-fails-to-build-drivers-for-kernel-4-4-172-a-4175647407/#post5956289, seems to solve the compilation problem.

Warning : light VBox users here. It works ok for us, but YMMV.
Comment 3 Pierre-Yves Bonnetain-Nesterenko 2019-04-13 07:11:25 UTC
Same problem with virtualbox-modules-5.2.26. Patch works ok.
Comment 4 Federico Ceccarelli 2019-08-08 23:21:27 UTC
(In reply to Pierre-Yves Bonnetain-Nesterenko from comment #3)
> Same problem with virtualbox-modules-5.2.26. Patch works ok.

Also for me the patch solves the problem for virtualbox-modules-5.2.26.

It compiles and the virtual machines work normally.