VirtualBox

Opened 2 years ago

Last modified 2 years ago

#20607 new defect

VB host kernel drivers fail to build on CentOS 8 Stream kernel 4.18.0-338

Reported by: jcbollinger Owned by:
Component: other Version: VirtualBox 6.1.26
Keywords: kernel driver Cc:
Guest type: all Host type: Linux

Description

Building the host kernel drivers succeeds with with CentOS 8 Stream kernel 4.18.0-315.el8.x86_64 and earlier, but fails with kernel 4.18.0-338.el8.x86_64. The issue appears to be related to issues #19644 (which relates to a newer base kernel version) and #20488 (which relates to the Guest Additions, not the host drivers), both associated with the symbol map_vm_area no longer being exported by the kernel.

This was initially observed with VirtualBox 6.0, but it still occurs with VirtualBox 6.1.26, as installed via the official VirtualBox-6.1-6.1.26_145957_el8-1.x86_64 RPM.

The relevant excerpts from /var/log/vbox-setup.log appear to be:

   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/tmp/vbox.0/r0drv/.tmp_alloc-r0drv.o";
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline "/tmp/vbox.0/r0drv/.tmp_initterm-r0drv.o";
  gcc -Wp,-MD,/tmp/vbox.0/r0drv/linux/.alloc-r0drv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch
/x86/include/generated   -I./include/drm-backport -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/
generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
 -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mno-ss
e -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup
 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FX
SAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -
DCONFIG_TPAUSE=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-
delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -
Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -g -gdwarf-4 -pg -mrecord-mcount -mfentry -DCC_U
SING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-al
l-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-poi
nter-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -fno-omit-frame-poin
ter -fno-pie -Wno-declaration-after-statement -I./include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHO
UT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX_WITHOUT_EF
LAGS_AC_SET_IN_VBOXDRV -DIPRT_WITHOUT_EFLAGS_AC_PRESERVING -DVBOX_WITH_64_BITS_GUESTS -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENA
ME='"alloc_r0drv_linux"' -DKBUILD_MODNAME='"vboxdrv"' -c -o /tmp/vbox.0/r0drv/linux/.tmp_alloc-r0drv-linux.o /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c

[...]

/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘rtR0MemAllocExecVmArea’:
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:204:14: error: implicit declaration of function ‘map_vm_area’; did you mean ‘get_vm_area’? [-Werror=implicit-function-declaration]
         if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC,
              ^~~~~~~~~~~
              get_vm_area

[...]

cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:316: /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....

[...]

make[1]: *** [Makefile:1571: _module_/tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:117: vboxdrv] Error 2

Change History (1)

comment:1 by galitsyn, 2 years ago

Hi jcbollinger,

I think this issue has already been fixed. Could you please try one of the Latest 6.1.x test builds at https://www.virtualbox.org/wiki/Testbuilds?

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use