VirtualBox

Opened 5 years ago

Last modified 5 years ago

#19099 assigned defect

openSUSE Leap 42.3 - cannot compile vboxsf module

Reported by: Frank Batschulat (Oracle) Owned by:
Component: shared folders Version: VirtualBox 6.0.14
Keywords: opensuse 42.3 vboxsf shared folder Cc:
Guest type: Linux Host type: all

Description

Using the current 6.0.14 we cannot compile the shared folder module from the guest additions in the guest with a compile error and as such no shared folder functionality is available:

openSUSE Leap 42.3 Linux linux-ntkd 4.4.180-102-default #1 SMP Mon Jun 17 13:11:23 UTC 2019 (7cfa20a) x86_64 x86_64 x86_64 GNU/Linux

cat vboxadd-install.log

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.4.180-102-default.

VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what
went wrong
VirtualBox Guest Additions: modprobe vboxsf failed

cat vboxadd-setup.log
Installing X.Org Server 1.18 modules

### the service in general worked:

 systemctl status vboxadd-service.service
● vboxadd-service.service
   Loaded: loaded (/opt/VBoxGuestAdditions-6.0.14/init/vboxadd-service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-11-20 09:22:25 CET; 13min ago
    Tasks: 8 (limit: 512)
   CGroup: /system.slice/vboxadd-service.service
           └─1457 /usr/sbin/VBoxService --pidfile /var/run/vboxadd-service.sh

XXX but shared folder support does not work:

fbatschu@linux-ntkd:~> lsmod|grep vbox
vboxguest             368640  6

[    4.253318] vboxguest: misc device minor 57, IRQ 20, I/O port d040, MMIO at 00000000f2400000 (size 0x400000)
[    4.253319] vboxguest: Successfully loaded version 6.0.14 (interface 0x00010004)
[    4.258614] XFS (sda3): Ending clean mount
[    4.296429] systemd-journald[403]: Received request to flush runtime journal from PID 1
[    4.553802] snd_intel8x0 0000:00:05.0: white list rate for 1028:0177 is 48000
[    5.217573] No iBFT detected.
[    5.243033] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    6.353076] 08:22:25.818744 main     VBoxService 6.0.14 r133895 (verbosity: 0) linux.amd64 (Oct 10 2019 20:44:32) release log
               08:22:25.818746 main     Log opened 2019-11-20T08:22:25.818741000Z
[    6.353107] 08:22:25.818807 main     OS Product: Linux
[    6.353121] 08:22:25.818824 main     OS Release: 4.4.180-102-default
[    6.353134] 08:22:25.818838 main     OS Version: #1 SMP Mon Jun 17 13:11:23 UTC 2019 (7cfa20a)
[    6.353157] 08:22:25.818855 main     Executable: /opt/VBoxGuestAdditions-6.0.14/sbin/VBoxService
               08:22:25.818855 main     Process ID: 1452
               08:22:25.818856 main     Package type: LINUX_64BITS_GENERIC
[    6.353791] 08:22:25.819485 main     6.0.14 r133895 started. Verbose level = 0
[    6.354534] 08:22:25.820219 main     vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
[    6.361318] 08:22:25.826993 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Downloads' on '/media/sf_Downloads': No such device (-1,19)
[    6.362301] 08:22:25.827991 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Music' on '/media/sf_Music': No such device (-1,19)
[    7.249769] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[    7.250592] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.371502] 08:22:26.837466 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Downloads' on '/media/sf_Downloads': No such device (-1,19)
[    7.381974] 08:22:26.847947 automount Error: vbsvcAutomounterMountIt: Failed to mount 'Music' on '/media/sf_Music': No such device (-1,19)
[    7.643712] NET: Registered protocol family 17
[   23.841175] fuse init (API version 7.23)
[  529.556954] VBGL_IOCTL_ACQUIRE_GUEST_CAPABILITIES failed rc=-138
[  530.941517] VBGL_IOCTL_ACQUIRE_GUEST_CAPABILITIES failed rc=-138
[  548.804519] VBGL_IOCTL_ACQUIRE_GUEST_CAPABILITIES failed rc=-138
[  550.120040] VBGL_IOCTL_ACQUIRE_GUEST_CAPABILITIES failed rc=-138

### try to test this manually:

linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/bin # VBoxControl sharedfolder list
Oracle VM VirtualBox Guest Additions Command Line Management Interface Version 6.0.14
(C) 2008-2019 Oracle Corporation
All rights reserved.

Shared Folder mappings (2):

01 - Downloads [idRoot=0 writable auto-mount host-icase]
02 - Music [idRoot=1 writable auto-mount host-icase]

linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/sbin # ./VBoxService --enable-automount
08:44:57.202537 main     VBoxService 6.0.14 r133895 (verbosity: 0) linux.amd64 (Oct 10 2019 20:44:32) release log
08:44:57.202545 main     Log opened 2019-11-20T08:44:57.202521000Z
08:44:57.202777 main     OS Product: Linux
08:44:57.202865 main     OS Release: 4.4.180-102-default
08:44:57.202935 main     OS Version: #1 SMP Mon Jun 17 13:11:23 UTC 2019 (7cfa20a)
08:44:57.203002 main     Executable: /opt/VBoxGuestAdditions-6.0.14/sbin/VBoxService
08:44:57.203004 main     Process ID: 3724
08:44:57.203006 main     Package type: LINUX_64BITS_GENERIC
08:44:57.209167 main     6.0.14 r133895 started. Verbose level = 0

[ 1356.851990] 08:44:57.202537 main     VBoxService 6.0.14 r133895 (verbosity: 0) linux.amd64 (Oct 10 2019 20:44:32) release log
               08:44:57.202545 main     Log opened 2019-11-20T08:44:57.202521000Z
[ 1356.852141] 08:44:57.202777 main     OS Product: Linux
[ 1356.852213] 08:44:57.202865 main     OS Release: 4.4.180-102-default
[ 1356.852282] 08:44:57.202935 main     OS Version: #1 SMP Mon Jun 17 13:11:23 UTC 2019 (7cfa20a)
[ 1356.852371] 08:44:57.203002 main     Executable: /opt/VBoxGuestAdditions-6.0.14/sbin/VBoxService
               08:44:57.203004 main     Process ID: 3724
               08:44:57.203006 main     Package type: LINUX_64BITS_GENERIC
[ 1356.858567] 08:44:57.209167 main     6.0.14 r133895 started. Verbose level = 0
[ 1356.881822] 08:44:57.232459 main     vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
[ 1356.882025] 08:44:57.232708 main     Error: Failed to become guest control master: VERR_RESOURCE_BUSY
[ 1356.882273] 08:44:57.232954 main     Error: Service 'control' failed to initialize: VERR_RESOURCE_BUSY
[ 1356.882528] 08:44:57.233216 main     Session 0 is about to close ...
[ 1356.882548] 08:44:57.233241 main     Stopping all guest processes ...
[ 1356.882579] 08:44:57.233272 main     Closing all guest files ...
[ 1356.882631] 08:44:57.233292 main     Ended.

fbatschu@linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/bin> mount -v|grep vbox
fbatschu@linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/bin>

linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/other # ./mount.vboxsf Downloads /mnt
./mount.vboxsf: mounting failed with the error: No such device
linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/other # echo $?
1

mount("Downloads", "/mnt", "vboxsf", MS_NODEV, "") = -1 ENODEV (No such device)
write(2, "./mount.vboxsf: mounting failed "..., 46./mount.vboxsf: mounting failed with the error) = 46
write(2, ": No such device\n", 17: No such device
)      = 17

linux-ntkd:/opt/VBoxGuestAdditions-6.0.14 # find / -name vboxguest -ls
  1066    0 drwxr-xr-x   1 root     root          656 Oct 10 20:44 /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxguest
 13625    0 crw-rw----   1 vboxadd  root      10,  57 Nov 20 09:22 /dev/vboxguest
4026532203    0 dr-xr-xr-x   2 root     root            0 Nov 20 09:52 /proc/irq/20/vboxguest
 11526    0 drwxr-xr-x   2 root     root            0 Nov 20 09:22 /sys/bus/pci/drivers/vboxguest
 12374    0 drwxr-xr-x   3 root     root            0 Nov 20 09:22 /sys/devices/virtual/misc/vboxguest
 12377    0 lrwxrwxrwx   1 root     root            0 Nov 20 09:52 /sys/class/misc/vboxguest -> ../../devices/virtual/misc/vboxguest
 11450    0 drwxr-xr-x   7 root     root            0 Nov 20 09:22 /sys/module/vboxguest

linux-ntkd:/opt/VBoxGuestAdditions-6.0.14 # find / -name vboxsf -ls
  1268    0 drwxr-xr-x   1 root     root          850 Oct 10 20:44 /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf

XXX see how the compilation of the vboxsf module fails:

linux-ntkd:/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf # make
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.4.180-102-default/build M=/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf SRCROOT=/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf -j2 modules
make[1]: Entering directory '/usr/src/linux-4.4.180-102-obj/x86_64/default'
make -C ../../../linux-4.4.180-102 O=/usr/src/linux-4.4.180-102-obj/x86_64/default/. modules
make -C /usr/src/linux-4.4.180-102-obj/x86_64/default KBUILD_SRC=/usr/src/linux-4.4.180-102 \
-f /usr/src/linux-4.4.180-102/Makefile modules
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 /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.tmp_versions ; rm -f /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.tmp_versions/*
make -f /usr/src/linux-4.4.180-102/scripts/Makefile.build obj=/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf
  gcc -Wp,-MD,/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.vfsmod.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/include -I/usr/src/linux-4.4.180-102/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -I/usr/src/linux-4.4.180-102/include -Iinclude -I/usr/src/linux-4.4.180-102/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-4.4.180-102/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-4.4.180-102/include/linux/kconfig.h   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -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 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -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 -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-var-tracking-assignments -fasynchronous-unwind-tables -g -gdwarf-4 -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Wno-declaration-after-statement -fno-pie -include /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf//include/VBox/VBoxGuestMangling.h -fshort-wchar   -I/usr/src/linux-4.4.180-102/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vfsmod)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -c -o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.tmp_vfsmod.o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.c
  gcc -Wp,-MD,/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.dirops.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/include -I/usr/src/linux-4.4.180-102/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -I/usr/src/linux-4.4.180-102/include -Iinclude -I/usr/src/linux-4.4.180-102/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-4.4.180-102/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-4.4.180-102/include/linux/kconfig.h   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -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 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -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 -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-var-tracking-assignments -fasynchronous-unwind-tables -g -gdwarf-4 -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Wno-declaration-after-statement -fno-pie -include /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf//include/VBox/VBoxGuestMangling.h -fshort-wchar   -I/usr/src/linux-4.4.180-102/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(dirops)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -c -o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.tmp_dirops.o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/dirops.c
  if [ "-pg" = "-pg" ]; then if [ /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.o"; fi; fi;
  gcc -Wp,-MD,/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.lnkops.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/include -I/usr/src/linux-4.4.180-102/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -I/usr/src/linux-4.4.180-102/include -Iinclude -I/usr/src/linux-4.4.180-102/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-4.4.180-102/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-4.4.180-102/include/linux/kconfig.h   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -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 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -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 -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-var-tracking-assignments -fasynchronous-unwind-tables -g -gdwarf-4 -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Wno-declaration-after-statement -fno-pie -include /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf//include/VBox/VBoxGuestMangling.h -fshort-wchar   -I/usr/src/linux-4.4.180-102/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(lnkops)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -c -o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.tmp_lnkops.o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/lnkops.c
  if [ "-pg" = "-pg" ]; then if [ /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/dirops.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/dirops.o"; fi; fi;
  gcc -Wp,-MD,/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.regops.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/include -I/usr/src/linux-4.4.180-102/arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -I/usr/src/linux-4.4.180-102/include -Iinclude -I/usr/src/linux-4.4.180-102/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-4.4.180-102/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-4.4.180-102/include/linux/kconfig.h   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -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 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -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 -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -fno-var-tracking-assignments -fasynchronous-unwind-tables -g -gdwarf-4 -pg -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Wno-declaration-after-statement -fno-pie -include /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf//include/VBox/VBoxGuestMangling.h -fshort-wchar   -I/usr/src/linux-4.4.180-102/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/include   -I/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DVBOX_WITH_64_BITS_GUESTS -DRT_ARCH_AMD64  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(regops)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -c -o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/.tmp_regops.o /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c: In function ‘vbsf_lock_user_pages’:
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 1 of ‘get_user_pages_unlocked’ makes integer from pointer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^
In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘long unsigned int’ but argument is of type ‘struct task_struct *’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 2 of ‘get_user_pages_unlocked’ makes integer from pointer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^
In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 3 of ‘get_user_pages_unlocked’ makes pointer from integer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^
In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘struct page **’ but argument is of type ‘uintptr_t’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: error: too many arguments to function ‘get_user_pages_unlocked’
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^
In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: declared here
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c: At top level:
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:3780:5: warning: initialization from incompatible pointer type [enabled by default]
     .direct_IO      = vbsf_direct_IO,
     ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:3780:5: warning: (near initialization for ‘vbsf_reg_aops.direct_IO’) [enabled by default]
/usr/src/linux-4.4.180-102/scripts/Makefile.build:278: recipe for target '/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.o' failed
make[4]: *** [/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.o] Error 1
make[4]: *** Waiting for unfinished jobs....
  if [ "-pg" = "-pg" ]; then if [ /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/lnkops.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/lnkops.o"; fi; fi;
/usr/src/linux-4.4.180-102/Makefile:1462: recipe for target '_module_/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf' failed
make[3]: *** [_module_/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf] Error 2
Makefile:152: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make[1]: *** [__sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.4.180-102-obj/x86_64/default'
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/Makefile-footer.gmk:111: recipe for target 'vboxsf' failed
make: *** [vboxsf] Error 2

XXX the error is around the usage of get_user_pages_unlocked()

/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 2 of ‘get_user_pages_unlocked’ makes integer from pointer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^
In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 3 of ‘get_user_pages_unlocked’ makes pointer from integer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);

In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘struct page **’ but argument is of type ‘uintptr_t’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: error: too many arguments to function ‘get_user_pages_unlocked’
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^

Change History (4)

comment:1 by Frank Batschulat (Oracle), 5 years ago

Owner: set to Frank Batschulat (Oracle)
Status: newaccepted

comment:2 by Frank Batschulat (Oracle), 5 years ago

openSUSE Leap 42.3 Linux linux-ntkd 4.4.180-102-default #1 SMP Mon Jun 17 13:11:23 UTC 2019 (7cfa20a) x86_64 x86_64 x86_64 GNU/Linux

https://elixir.bootlin.com/linux/v4.4.180/source/include/linux/mm.h#L1210

long get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
		    unsigned long start, unsigned long nr_pages,
		    struct page **pages, unsigned int gup_flags);

It has 6 arguments.

C symbol: get_user_pages_unlocked

  File     Function             Line
0 regops.c vbsf_lock_user_pages 1434 ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, papPages,
1 regops.c vbsf_lock_user_pages 1437 ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, fWrite, 1 , papPages);
2 regops.c vbsf_lock_user_pages 1439 ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, papPages,
3 regops.c vbsf_lock_user_pages 1442 ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, fWrite, 1 ,
                                     papPages);

which corresponds to this code:

1430 /** Wrapper around get_user_pages. */
1431 DECLINLINE(int) vbsf_lock_user_pages(uintptr_t uPtrFrom, size_t cPages, bool fWrite, struct page **papPages, bool *pfLockPgHack)
1432 {
1433 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
1434     ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, papPages,
1435                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
1436 # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
1437     ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, fWrite, 1 /*force*/, papPages);
1438 # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 168) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
1439     ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, papPages,
1440                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
1441 # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
1442     ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, fWrite, 1 /*force*/, papPages);
1443 # else
...
1447     cPagesLocked = get_user_pages(pTask, pTask->mm, uPtrFrom, cPages, fWrite, 1 /*force*/, papPages, NULL);
1448     up_read(&pTask->mm->mmap_sem);
1449 # endif

XXX the specific complaint is about:

/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 2 of ‘get_user_pages_unlocked’ makes integer from pointer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^
In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘long unsigned int’ but argument is of type ‘struct mm_struct *’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: warning: passing argument 3 of ‘get_user_pages_unlocked’ makes pointer from integer without a cast [enabled by default]
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);

In file included from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/r0drv/linux/the-linux-kernel.h:101:0,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/vfsmod.h:43,
                 from /opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:35:
/usr/src/linux-4.4.180-102/include/linux/mm.h:1294:6: note: expected ‘struct page **’ but argument is of type ‘uintptr_t’
 long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
      ^
/opt/VBoxGuestAdditions-6.0.14/src/vboxguest-6.0.14/vboxsf/regops.c:1440:52: error: too many arguments to function ‘get_user_pages_unlocked’
                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
                                                    ^

which is this case:

1438 # elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 168) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
1439     ssize_t cPagesLocked = get_user_pages_unlocked(current, current->mm, uPtrFrom, cPages, papPages,
1440                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);

We also have 6 arguments and the types also match the upstream source code of 4.4.180 so it must be some specific OpenSuse patch, lets find it on the guest system and we find this:

/usr/src/linux-4.4.180-102/include/linux/mm.h

long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
                    struct page **pages, unsigned int gup_flags);

And we find it only has 4 arguments and not 6 anymore. Ie. OpenSuse has backported something to 42.3 turning this into the state of the 4.9.0 kernel:

https://elixir.bootlin.com/linux/v4.9/source/include/linux/mm.h#L1286

long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
		    struct page **pages, unsigned int gup_flags);

Ie. for this specific OpenSuse release 42.3 we'd now need to take instead this branch for:

1433 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
1434     ssize_t cPagesLocked = get_user_pages_unlocked(uPtrFrom, cPages, papPages,
1435                                                    fWrite ? FOLL_WRITE | FOLL_FORCE : FOLL_FORCE);
Last edited 5 years ago by Frank Batschulat (Oracle) (previous) (diff)

comment:3 by Frank Batschulat (Oracle), 5 years ago

unfortunately unlike newer versions of SLES and OpenSUSE, 42.3 does not provide us with the ability to detect the Suse version and patch level, ie. neither CONFIG_SUSE_VERSION or CONFIG_SUSE_PATCHLEVEL are available for a conditional compilation to catch this backport kernel. We only have available:

linux-ntkd:~ # cat
/usr/src/linux-4.4.180-102-obj/x86_64/default/include/generated/uapi/linux/version.h
#define LINUX_VERSION_CODE 263348
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
 
Linux linux-ntkd 4.4.180-102-default #1 SMP Mon Jun 17 13:11:23 UTC 2019
(7cfa20a) x86_64 x86_64 x86_64 GNU/Linux
 
linux-ntkd:~ # cat /etc/os-release
NAME="openSUSE Leap"
VERSION="42.3"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.3"
PRETTY_NAME="openSUSE Leap 42.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.3"

This is very unfortunate. Need to see whether or not we can find a different approach to detect OpenSUSE 42.3 distro with this backport kernel.

comment:4 by Frank Batschulat (Oracle), 5 years ago

Owner: Frank Batschulat (Oracle) removed
Status: acceptedassigned
Note: See TracTickets for help on using tickets.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette