[Bug 1835576] [NEW] virtualbox-guest-dkms-hwe 5.2.18-dfsg-3~ubuntu18.04.3 fails to build on 5.0 based kernels [In function ‘VBoxGuest_RTR0MemUserIsValidAddr’: error: macro "access_ok" passed 3 arguments, but takes just 2]

Launchpad Bug Tracker 1835576 at bugs.launchpad.net
Sat Jul 13 20:20:49 UTC 2019


You have been subscribed to a public bug by Ubuntu Foundations Team Bug Bot (crichton):

[Impact]

 * virtualbox-guest-dkms-hwe fails to build on 5.0 kernels. This affects
Bionic because the Bionic HWE Edge kernels are based on 5.0. virtualbox-
guest-dkms-hwe cannot be installed successfully since the DKMS module
can't be compiled due to API changes introduced between Linux 4.15 and
5.0.

[Test Case]

 * Install the HWE Edge kernel on Bionic:
   - `sudo apt install linux-generic-hwe-18.04-edge`
 * Reboot into the new kernel (you should be on a 5.0 kernel now)
 * Try installing `virtualbox-guest-dkms-hwe` (`sudo apt install virtualbox-guest-dkms-hwe`)
   - Expected result: package installs successfully, module can be viewed with `sudo dkms status`
   - Actual result: Installation fails due to compilation errors when building the DKMS module.

[Testing]

These steps were performed in an amd64 virtual machine installed from a
Bionic cloud image.

 * Create a .deb with the .debdiff attached to comment #1
   - Uncomment the `deb-src` lines in /etc/apt/sources.list
   - `sudo apt build-dep virtualbox-hwe`
   - `pull-lp-source virtualbox-hwe bionic`
   - `cd virtualbox-hwe` (it will be a longer, but similar name to that)
   - `patch -p1 < path/to/patch.debdiff`
   - `quilt push -a`
   - `debuild -b -us -uc` (note: this build can take some time)

 * Install `dkms`
   - `sudo apt install dkms`

== On the stock 4.15 Ubuntu kernel ==
 * Install the .deb you prepared in the first step.
   - `sudo dpkg --install path-to-file.deb`
   - Confirm that it installs successfully (as you are running the 4.15 Ubuntu kernel)
 * Install the 5.0 edge kernel
   - `sudo apt install linux-generic-hwe-18.04-edge`
 * As part of the installation of the new kernel, the active virtualbox DKMS module should be rebuilt. If it is not, remove uninstall the package `sudo apt remove virtualbox-guest-dkms-hwe`, reboot into the new 5.0 kernel, and perform the install step on your .deb again and confirm it installs correctly without compilation failures.

[Regression Potential]

These changes are conditionally compiled depending on the kernel
version. The only exception to this is the addition of an inlined
function for operating on timespec64. That is conditionally compiled
based on whether the kernel has timespec64, not necessarily just on the
kernel version.

However, there are a large number of changes and to keep it manageable,
some backporting was required as there were a couple of patches that
were based on previous revisions that had undergone large code cleanups
(no logic changes, just refactorings and updating certain error paths).
These backports were limited to surgically updating the call sites with
the new API compatibility wrappers introduced by the patch or a small
update to the Makefile so a header file can be located once again. I
believe these changes are logically equivalent to what they were before,
but this time, compileable since they use the new interfaces/wrappers
added by the upstream developers.


Original bug description follows:
-----------------------------------

The Bionic HWE Edge kernels run on 5.0. Some compilation errors are
expected due to the API changes between 4.15 and 5.0. One can see one
such error here when trying to install the package on the HWE edge
kernel in Bionic: https://paste.ubuntu.com/p/Bf4KQwjfgX/

** Affects: virtualbox (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: virtualbox-ext-pack (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: virtualbox-guest-additions-iso (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: virtualbox-hwe (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: virtualbox (Ubuntu Bionic)
     Importance: Undecided
         Status: New

** Affects: virtualbox-ext-pack (Ubuntu Bionic)
     Importance: Undecided
         Status: New

** Affects: virtualbox-guest-additions-iso (Ubuntu Bionic)
     Importance: Undecided
         Status: New

** Affects: virtualbox-hwe (Ubuntu Bionic)
     Importance: Medium
     Assignee: Connor Kuehl (connork)
         Status: In Progress


** Tags: patch
-- 
virtualbox-guest-dkms-hwe 5.2.18-dfsg-3~ubuntu18.04.3 fails to build on 5.0 based kernels [In function ‘VBoxGuest_RTR0MemUserIsValidAddr’: error: macro "access_ok" passed 3 arguments, but takes just 2]
https://bugs.launchpad.net/bugs/1835576
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list