Opened 7 years ago
Closed 7 years ago
#16732 closed defect (duplicate)
Issue with pud_offset building VirtualBox kernel modules against kernel 4.11
Reported by: | herbmilleriw | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 5.1.22 |
Keywords: | Cc: | ||
Guest type: | all | Host type: | Linux |
Description
I'm building the virtualbox modules version 5.1.22 on Gentoo Linux and it's failing with the following error:
/var/tmp/portage/app-emulation/virtualbox-modules-5.1.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjLinuxVirtToPage’: /var/tmp/portage/app-emulation/virtualbox-modules-5.1.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:922:27: error: passing argument 1 of ‘pud_offset’ from incompatible pointer type [-Werror=incompatible-pointer-types] u.Upper = *pud_offset(&u.Global, ulAddr); ^ In file included from /mnt/gentoo/usr/src/linux/include/linux/mm.h:70:0, from /var/tmp/portage/app-emulation/virtualbox-modules-5.1.22/work/vboxdrv/r0drv/linux/the-linux-kernel.h:98, from /var/tmp/portage/app-emulation/virtualbox-modules-5.1.22/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c:31: /mnt/gentoo/usr/src/linux/arch/x86/include/asm/pgtable.h:826:22: note: expected ‘p4d_t * {aka struct <anonymous> *}’ but argument is of type ‘pgd_t * {aka struct <anonymous> *}’ static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address) ^~~~~~~~~~
I don't believe this is a Gentoo issue, so I'm bringing it here first. It looks like there's been a change to the page table stuff in the Linux kernel not too long ago creating confusing between pgd_t and p4d_t. https://github.com/torvalds/linux/commit/f2a6a7050109e0a5c7a84c70aa6010f682b2f1ee
I tried to work it out myself but without much success. I'm out of my league on this one.
Duplicate of #16725. It's a change introduced with Linux 4.12, not 4.11.