VirtualBox

Opened 3 years ago

Last modified 3 years ago

#20308 new defect

vboxsf module (GA 6.0.24) fails to compile on latest ubuntu-16.04 kernel

Reported by: jonahbull Owned by:
Component: guest additions Version: VirtualBox 6.0.22
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

Attempting to build the vboxsf module for Guest Additions 6.0.24 fails on the latest ubuntu-16.04 kernel (4.4.0-209-generic #241).

vagrant@ubuntu-16:~$ uname -a
Linux ubuntu-16 4.4.0-209-generic #241-Ubuntu SMP Tue Apr 13 01:06:06 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Snipped output from attempting to build the module manually with build_in_tmp (full log attached):

=== Building 'vboxsf' module ===
make[1]: Entering directory '/tmp/vbox.0/vboxsf'
make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/4.4.0-209-generic/build M=/tmp/vbox.0/vboxsf SRCROOT=/tmp/vbox.0/vboxsf -j2 modules
make[2]: Entering directory '/tmp/vbox.0/vboxsf'
make[2]: warning: -jN forced in submake: disabling jobserver mode.
  CC [M]  /tmp/vbox.0/vboxsf/vfsmod.o
  CC [M]  /tmp/vbox.0/vboxsf/dirops.o
  CC [M]  /tmp/vbox.0/vboxsf/lnkops.o
  CC [M]  /tmp/vbox.0/vboxsf/regops.o
  CC [M]  /tmp/vbox.0/vboxsf/utils.o
/tmp/vbox.0/vboxsf/utils.c: In function 'vbsf_inode_setattr':
/tmp/vbox.0/vboxsf/utils.c:812:10: error: implicit declaration of function 'inode_change_ok' [-Werror=implicit-function-declaration]
     rc = inode_change_ok(pInode, iattr);
          ^
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/tmp/vbox.0/vboxsf/utils.o' failed
make[3]: *** [/tmp/vbox.0/vboxsf/utils.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:1472: recipe for target '_module_/tmp/vbox.0/vboxsf' failed
make[2]: *** [_module_/tmp/vbox.0/vboxsf] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-209-generic'
/tmp/vbox.0/vboxsf/Makefile-footer.gmk:117: recipe for target 'vboxsf' failed
make[1]: *** [vboxsf] Error 2
make[1]: Leaving directory '/tmp/vbox.0/vboxsf'
Makefile:48: recipe for target 'vboxsf' failed
make: *** [vboxsf] Error 1

It looks like a recent kernel update (https://ubuntu.com/security/notices/USN-4916-1) involving some CVE fixes also backported the migration from inode_change_ok to setattr_prepare. That migration has previously broken Guest Addition compilation at least a couple times for other distros (https://www.virtualbox.org/ticket/17299, https://www.virtualbox.org/ticket/18697). There are some existing IFDEFs in VBox/Additions/linux/sharedfolders/utils.c related to those previous issues:

#if (RTLNX_VER_RANGE(3,16,39,  3,17,0)) || RTLNX_VER_MIN(4,9,0) || (RTLNX_VER_RANGE(4,1,37,  4,2,0))
# if RTLNX_VER_MIN(5,12,0)
    rc = setattr_prepare(ns, dentry, iattr);
# else
    rc = setattr_prepare(dentry, iattr);
# endif
#else
    rc = inode_change_ok(pInode, iattr);
#endif

but they don't cover this case yet since it's a 4.4.0 series kernel.

Attachments (1)

build_guest_additions.log (8.2 KB ) - added by jonahbull 3 years ago.
Full log from attempting to build guest additions manually

Download all attachments as: .zip

Change History (2)

by jonahbull, 3 years ago

Attachment: build_guest_additions.log added

Full log from attempting to build guest additions manually

comment:1 by Klaus Espenlaub, 3 years ago

VirtualBox 6.0 is out of support since July 2020 and will not get updated any more. This includes the Guest Additions.

That said, not even the latest VirtualBox release (6.1.20) will work with this kernel since it has additional checks but none covering this kernel. This may be added in the future, but it'll take a bit.

Actually viewing this from a different angle: are you sure you want to use a Ubuntu release which is just 10 days from its end of standard support? You won't get security fixes very soon. Maybe time to upgrade to 20.04 or at least 18.04?

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use