﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
19391	RedHat: 5.2-rc1 kernel DRM backports to 4.18.0 kernels break Virtualbox GAs (fixed in VirtualBox 6.1.8, 6.0.22 and 5.2.42)	Frank Batschulat (Oracle)	Frank Batschulat (Oracle)	"Guest additions kernel module compilation error on CentOS 8 Stream guest

This worked for 6.1.2 and the 4.18.0-168 kernel version but fails partially with the new 4.18.0-177.el8.x86_64 kernel version.

{{{
[root@localhost VBox_GAs_6.1.4]# uname -a
Linux localhost.localdomain 4.18.0-177.el8.x86_64 #1 SMP Wed Feb 12 19:59:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost VBox_GAs_6.1.4]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.4 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.2 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 
4.18.0-177.el8.x86_64.

VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what 
went wrong
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted

[root@localhost VBox_GAs_6.1.4]# cat /var/log/vboxadd-setup.log
Building the main Guest Additions 6.1.4 module for kernel 4.18.0-177.el8.x86_64.
Building the shared folder support module.
Building the graphics driver module.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/4.18.0-177.el8.x86_64/build M=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (	\
echo >&2;							\
echo >&2 ""  ERROR: Kernel configuration is invalid."";		\
echo >&2 ""         include/generated/autoconf.h or include/config/auto.conf are missing."";\
echo >&2 ""         Run 'make oldconfig && make prepare' on kernel src to fix it."";	\
echo >&2 ;							\
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
(cat /dev/null;   echo kernel//tmp/vbox.0/vboxvideo.ko;) > /tmp/vbox.0/modules.order
  gcc -Wp,-MD,/tmp/vbox.0/.hgsmi_base.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-sse -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_FXSAVEQ=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 -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_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -I./include -I/tmp/vbox.0/ -I./include/drm -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='""hgsmi_base""' -DKBUILD_MODNAME='""vboxvideo""' -c -o /tmp/vbox.0/.tmp_hgsmi_base.o /tmp/vbox.0/hgsmi_base.c
  gcc -Wp,-MD,/tmp/vbox.0/.modesetting.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-sse -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_FXSAVEQ=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 -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_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -I./include -I/tmp/vbox.0/ -I./include/drm -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='""modesetting""' -DKBUILD_MODNAME='""vboxvideo""' -c -o /tmp/vbox.0/.tmp_modesetting.o /tmp/vbox.0/modesetting.c
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline ""/tmp/vbox.0/.tmp_hgsmi_base.o"";
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline ""/tmp/vbox.0/.tmp_modesetting.o"";
  gcc -Wp,-MD,/tmp/vbox.0/.vbox_drv.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-sse -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_FXSAVEQ=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 -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_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -I./include -I/tmp/vbox.0/ -I./include/drm -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='""vbox_drv""' -DKBUILD_MODNAME='""vboxvideo""' -c -o /tmp/vbox.0/.tmp_vbox_drv.o /tmp/vbox.0/vbox_drv.c
  gcc -Wp,-MD,/tmp/vbox.0/.vbox_fb.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-sse -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_FXSAVEQ=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 -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_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -I./include -I/tmp/vbox.0/ -I./include/drm -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='""vbox_fb""' -DKBUILD_MODNAME='""vboxvideo""' -c -o /tmp/vbox.0/.tmp_vbox_fb.o /tmp/vbox.0/vbox_fb.c
/tmp/vbox.0/vbox_fb.c: In function ‘vboxfb_create’:
/tmp/vbox.0/vbox_fb.c:337:2: error: implicit declaration of function ‘drm_fb_helper_fill_fix’; did you mean ‘drm_fb_helper_fill_info’? [-Werror=implicit-function-declaration]
  drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
  ^~~~~~~~~~~~~~~~~~~~~~
  drm_fb_helper_fill_info
/tmp/vbox.0/vbox_fb.c:342:2: error: implicit declaration of function ‘drm_fb_helper_fill_var’; did you mean ‘drm_fb_helper_fill_info’? [-Werror=implicit-function-declaration]
  drm_fb_helper_fill_var(info, &fbdev->helper, sizes->fb_width,
  ^~~~~~~~~~~~~~~~~~~~~~
  drm_fb_helper_fill_info
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline ""/tmp/vbox.0/.tmp_vbox_drv.o"";
  gcc -Wp,-MD,/tmp/vbox.0/.vbox_irq.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-sse -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_FXSAVEQ=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 -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_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -I./include -I/tmp/vbox.0/ -I./include/drm -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_ARCH_AMD64  -DMODULE  -DKBUILD_BASENAME='""vbox_irq""' -DKBUILD_MODNAME='""vboxvideo""' -c -o /tmp/vbox.0/.tmp_vbox_irq.o /tmp/vbox.0/vbox_irq.c
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:313: /tmp/vbox.0/vbox_fb.o] Error 1
make[2]: *** Waiting for unfinished jobs....
   ./tools/objtool/objtool orc generate  --module --no-fp  --retpoline ""/tmp/vbox.0/.tmp_vbox_irq.o"";
make[1]: *** [Makefile:1542: _module_/tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:114: vboxvideo] Error 2
}}}

It is not quite clear what will be malfunction due to this, at least the usual video functionality works and shared folder support works as well.

{{{
[   74.273009] 11:23:19.443544 main     VBoxService 6.1.4 r136177 (verbosity: 0) linux.amd64 (Feb 18 2020 18:13:55) release log
               11:23:19.443552 main     Log opened 2020-03-10T11:23:19.443530000Z
[   74.273133] 11:23:19.443760 main     OS Product: Linux
[   74.273209] 11:23:19.443839 main     OS Release: 4.18.0-177.el8.x86_64
[   74.273275] 11:23:19.443914 main     OS Version: #1 SMP Wed Feb 12 19:59:38 UTC 2020
[   74.273361] 11:23:19.443977 main     Executable: /opt/VBoxGuestAdditions-6.1.4/sbin/VBoxService
               11:23:19.443980 main     Process ID: 2002
               11:23:19.443982 main     Package type: LINUX_64BITS_GENERIC
[   74.279219] 11:23:19.449792 main     6.1.4 r136177 started. Verbose level = 0
[   74.293051] 11:23:19.463607 main     vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
[   74.319181] vboxsf: g_fHostFeatures=0x8000000f g_fSfFeatures=0x1 g_uSfLastFunction=29
[   74.319507] vboxsf: Successfully loaded version 6.1.4
[   74.319542] vboxsf: Successfully loaded version 6.1.4 on 4.18.0-177.el8.x86_64 SMP mod_unload modversions  (LINUX_VERSION_CODE=0x41200)
[   74.320948] 11:23:19.491585 automount vbsvcAutomounterMountIt: Successfully mounted 'Downloads' on '/media/sf_Downloads'
[   74.330910] 11:23:19.501553 automount vbsvcAutomounterMountIt: Successfully mounted 'Music' on '/media/sf_Music'
[  533.299894] fuse: init (API version 7.31)
[  538.687614] VBoxClient[2916]: segfault at 968 ip 00007f78694a35d1 sp 00007ffc0bdfefc0 error 4 in libX11.so.6.3.0[7f7869467000+13d000]
[  538.687618] Code: 56 49 89 d6 41 55 49 89 cd 41 54 4d 89 c4 55 48 89 f5 53 48 89 fb 48 83 ec 38 64 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 <48> 8b 87 68 09 00 00 48 85 c0 74 02 ff 10 ba 08 00 00 00 be 62 00
[  544.319999] VBoxClient[3088]: segfault at 968 ip 00007f78694a35d1 sp 00007ffc0bdfefc0 error 4 in libX11.so.6.3.0[7f7869467000+13d000]
[  544.320017] Code: 56 49 89 d6 41 55 49 89 cd 41 54 4d 89 c4 55 48 89 f5 53 48 89 fb 48 83 ec 38 64 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 <48> 8b 87 68 09 00 00 48 85 c0 74 02 ff 10 ba 08 00 00 00 be 62 00

[fbatschu@localhost ~]$ lsmod|grep vbox
vboxsf                 86016  2
vboxguest             380928  7 vboxsf
}}}

The segfaulting VBoxClient is actually Ticket #19357 
VBoxClient crashes on Luuntu 14.04 after updating from 6.1.2 to 6.1.4

"	defect	closed	guest additions	VirtualBox 6.1.4	fixed	CentOS 8 4.18.0-177.el8 oracle linux OL8.2 redhat		Linux	all
