Skip to content

[Bug]: Linux Guest Additions 7.2.16 fail to build vboxsf on CentOS Stream 10 / AlmaLinux Kitten 10 kernel 6.12.0-250.el10 (backported 6.15/6.16 VFS/MM API) #833

Description

@yuravk

Version

7.2.16

Host OS Type

Linux

Host OS name + version

Ubuntu 24.04.4 LTS, VirtualBox 7.2.16 r174877 (virtualbox-7.2 package from the virtualbox.org apt repository), headless Packer build

Host Architecture

x86

Guest OS Type

Linux

Guest Architecture

x86

Guest OS name + version

AlmaLinux OS Kitten 10 x86_64 (the AlmaLinux CentOS Stream 10 equivalent), kernel 6.12.0-250.el10.x86_64, kernel-devel-6.12.0-250.el10.x86_64 (matches the running kernel), gcc 14.4.1-1.el10, make 4.4.1, elfutils-libelf-devel 0.195

Component

Guest Additions/Installer

What happened?

Since the CentOS Stream 10 kernel moved past 6.12.0-233.el10, VBoxLinuxAdditions.run --nox11
no longer produces the vboxsf module. The installer still exits with code 0
(vboxguest builds), but the shared folder module build fails, so
/lib/modules/6.12.0-250.el10.x86_64/misc/ only contains vboxguest.ko,
modinfo vboxsf reports Module vboxsf not found, and mounting a shared
folder in the guest fails:

mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant
/sbin/mount.vboxsf: mounting failed with the error: No such device

From /var/log/vboxadd-setup.log (full log attached):

Thu Aug 27 09:44:11 UTC 2026: Building the Guest Additions 7.2.16 modules for kernel 6.12.0-250.el10.x86_64.
Thu Aug 27 09:44:11 UTC 2026: Building the main module.
Thu Aug 27 09:44:24 UTC 2026: Building the shared folder support module.
/tmp/vbox.0/dirops.c:1418:23: error: initialization of 'struct dentry * (*)(struct mnt_idmap *, struct inode *, struct dentry *, umode_t)' from incompatible pointer type 'int (*)(struct mnt_idmap *, struct inode *, struct dentry *, umode_t)' [-Wincompatible-pointer-types]
 1418 |     .mkdir          = vbsf_inode_mkdir,
/tmp/vbox.0/regops.c:90:39: error: 'struct page' has no member named 'index'
   90 | # define VBOX_PAGE_INDEX(_page) (_page->index)
/tmp/vbox.0/regops.c:1798:24: note: in expansion of macro 'VBOX_PAGE_INDEX'
/tmp/vbox.0/regops.c:3664:54: note: in expansion of macro 'VBOX_PAGE_INDEX'
/tmp/vbox.0/regops.c:3727:60: error: 'struct page' has no member named 'index'
/tmp/vbox.0/regops.c:3728:50: error: 'struct page' has no member named 'index'
/tmp/vbox.0/regops.c:3931:6: error: 'struct address_space_operations' has no member named 'writepage'; did you mean 'writepages'?
/tmp/vbox.0/regops.c:3931:23: error: initialization of 'int (*)(struct address_space *, struct writeback_control *)' from incompatible pointer type 'int (*)(struct page *, struct writeback_control *)' [-Wincompatible-pointer-types]
make[2]: *** [scripts/Makefile.build:229: /tmp/vbox.0/regops.o] Error 1
make[2]: *** [scripts/Makefile.build:229: /tmp/vbox.0/dirops.o] Error 1
make[1]: *** [Makefile:2003: /tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:146: vboxsf] Error 2
Thu Aug 27 09:44:27 UTC 2026: Look at /var/log/vboxadd-setup.log to find out what went wrong

The same vboxsf sources compile cleanly against
kernel-devel-6.12.0-233.el10.x86_64 (the previous kernel in the same
repository), so this is caused by changes between the two Stream kernels,
not by the toolchain.

Cause

CentOS Stream 10 backported upstream 6.15/6.16 VFS/MM changes into the
6.12.0-250.el10 kernel (diff of the two kernel-devel trees):

  • include/linux/fs.h: inode_operations.mkdir now returns struct dentry *
    instead of int (upstream 6.15).
  • include/linux/fs.h: address_space_operations.writepage removed, only
    writepages remains (upstream 6.16).
  • include/linux/mm_types.h: struct page lost its index member
    (__folio_index / struct folio only) (upstream 6.15).

The Guest Additions already contain code paths for all three, but they are
gated on the vanilla kernel version, which is still 6.12 on this kernel:

  • dirops.c: #if RTLNX_VER_MIN(6,15,0) (two places, the struct dentry *
    variant of vbsf_inode_mkdir)
  • regops.c: #if RTLNX_VER_MIN(6,16,0) (VBOX_PAGE_INDEX using __folio_index)
  • regops.c: #if RTLNX_VER_MAX(6,16,0) (two places, vbsf_writepage and the
    .writepage initializer)

Forcing those five gates to the new-kernel branch makes vboxsf compile
cleanly against 6.12.0-250.el10, so the fix is only in the gating.

Note for the gating: both 6.12.0-233.el10 (builds) and 6.12.0-250.el10 (fails)
define RHEL_MAJOR 10 / RHEL_MINOR 3, so RTLNX_RHEL_RANGE() alone cannot
distinguish them within CentOS Stream 10. RHEL 10.3 will ship these backports,
so gating on RTLNX_RHEL_MIN(10,3) covers the released RHEL/AlmaLinux/Rocky
10.3 kernels; Stream kernels between -233 and -250 would need a feature test
(e.g. checking for __folio_index in struct page, or a configure-time
probe as done for other backports).

How can we reproduce this?

  1. Install CentOS Stream 10 (or AlmaLinux Kitten 10) x86_64 as a VirtualBox
    guest from the current repositories; the installed kernel is
    6.12.0-250.el10 or newer.
  2. dnf install gcc make perl elfutils-libelf-devel kernel-devel kernel-headers bzip2
    (kernel-devel matches the running kernel, both 6.12.0-250.el10).
  3. Run VBoxLinuxAdditions.run --nox11 from VBoxGuestAdditions_7.2.16.iso.
    It exits 0 and prints "Look at /var/log/vboxadd-setup.log to find out what
    went wrong".
  4. /var/log/vboxadd-setup.log shows the shared folder module build failing
    with the errors above; modinfo vboxsf reports no module; mounting a
    shared folder fails with "No such device".

Reproduces identically with Guest Additions 7.1.18, 7.2.16, test build
7.2.15-174740 and development snapshot 7.2.97-174743.

vboxadd-setup.log

Did you upload all of your necessary log files, screenshots, etc.?

  • Yes, I've uploaded all pertinent files to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions