Comment 1 for bug 1756506

Chaim Zax (chaim-zax) wrote :

Similar issue observed with the drivers supplied with virtualbox guest additions in Ubuntu 14.04 after a regular upgrade (running the same kernel as mentioned in previous post).

$ gmesg | grep vbox
[ 32.576197] vboxguest: version magic '3.13.0-143-generic SMP mod_unload modversions ' should be '3.13.0-143-generic SMP mod_unload modversions retpoline '

As it turns out the virtualbox drivers are not supplied as binary .ko files in Ubuntu, their compiled during the installation using 'dkms', which uses the virtualbox driver source from the guest additions package and the kernel headers. During this step the drivers don't get the correct vermagic string.

$ modinfo /lib/modules/3.13.0-143-generic/updates/dkms/vboxsf.ko
filename: /lib/modules/3.13.0-143-generic/updates/dkms/vboxsf.ko
version: 4.3.36_Ubuntu (interface 0x00010004)
license: GPL
author: Oracle Corporation
description: Oracle VM VirtualBox VFS Module for Host File System Access
srcversion: D5BC8E0A67B7E89277BCEA9
depends: vboxguest
vermagic: 3.13.0-143-generic SMP mod_unload modversions
parm: follow_symlinks:Let host resolve symlinks rather than showing them (int)

During compilation the /usr/src/linux-headers-3.13.0-142-generic/include/linux/vermagic.h file is used to generate the vermagic string, which includes /usr/src/linux-headers-3.13.0-143-generic/include/generated/utsrelease.h. After adding a RETPOLINE define to this header file and recompiling the drivers the problems looks solved. The steps are described below.

(as root)
$ echo "#define RETPOLINE 1" >> /usr/src/linux-headers-3.13.0-143-generic/include/generated/utsrelease.h
$ dkms remove virtualbox-guest/4.3.36 -k 3.13.0-144-generic
$ dkms install virtualbox-guest/4.3.36 -k 3.13.0-144-generic

It looks like the linux-headers-3.13.0-143-generic package needs an update to fix the utsrelease.h file (which seems generated too?). This problem most likely has impact on all drivers which are created with the 'dkms' tool.