From b3ba17b97a7ec57faabb132b2bd01d002c55ffa7 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 18 Mar 2020 10:34:35 +0000 Subject: community/virtualbox-guest-modules-lts: update to 6.0.18 and kernel 5.4.26-r0 --- community/virtualbox-guest-modules-lts/APKBUILD | 8 +- .../linux-5.4-compat.patch | 289 --------------------- 2 files changed, 3 insertions(+), 294 deletions(-) delete mode 100644 community/virtualbox-guest-modules-lts/linux-5.4-compat.patch diff --git a/community/virtualbox-guest-modules-lts/APKBUILD b/community/virtualbox-guest-modules-lts/APKBUILD index a45a1f8fc1..2441acdf8f 100644 --- a/community/virtualbox-guest-modules-lts/APKBUILD +++ b/community/virtualbox-guest-modules-lts/APKBUILD @@ -3,12 +3,12 @@ # when changing _ver we *must* bump _rel _name=virtualbox-guest-modules -_ver=6.0.14 +_ver=6.0.18 _rel=0 _flavor=${FLAVOR:-lts} _kpkg=linux-$_flavor -_kver=5.4.25 +_kver=5.4.26 _krel=0 _kpkgver="$_kver-r$_krel" @@ -26,7 +26,6 @@ license="GPL-2.0 custom" makedepends="linux-$_flavor-dev=$_kpkgver linux-virt-dev=$_kpkgver sed coreutils" subpackages="$_name-virt:virt" source="https://download.virtualbox.org/virtualbox/$_ver/VirtualBox-$_ver.tar.bz2 - linux-5.4-compat.patch " install_if="linux-$_flavor=$_kpkgver virtualbox-guest-additions" builddir="$srcdir"/VirtualBox-$_ver @@ -92,5 +91,4 @@ virt() { "$subpkgdir"/lib/modules/ } -sha512sums="e1a64c6633987e178b368dc17e738c6fbef4ab262c574188819f1186bf33f38d8c5accd6a566279a12ccd3544bab4ee5a1f8dce7c8c56d7373489c5ff7f8556d VirtualBox-6.0.14.tar.bz2 -74459c095113c9fc7c3861d0e56a636dde55d02d8f514267f762fb2be71d382806803aa33953af8f2c7d3a172a34d311caa9ba3d58e39af304b8d11fadfff9b0 linux-5.4-compat.patch" +sha512sums="7e830df3156875d44f4ad1d3a5522cd7bcf9fee019c494e25734e1d71c905623392f56e172053bc2c254720dd7ca783c9343cbbc4be534fd491d83d1d2aaf300 VirtualBox-6.0.18.tar.bz2" diff --git a/community/virtualbox-guest-modules-lts/linux-5.4-compat.patch b/community/virtualbox-guest-modules-lts/linux-5.4-compat.patch deleted file mode 100644 index a61e587715..0000000000 --- a/community/virtualbox-guest-modules-lts/linux-5.4-compat.patch +++ /dev/null @@ -1,289 +0,0 @@ -https://www.virtualbox.org/changeset/81586/vbox -https://www.virtualbox.org/changeset/81587/vbox -https://www.virtualbox.org/changeset/81649/vbox - -diff -u -r VirtualBox-6.0.14/include/iprt/cdefs.h VirtualBox-6.0.14-5.4/include/iprt/cdefs.h ---- VirtualBox-6.0.14/include/iprt/cdefs.h 2019-10-10 18:25:42.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/include/iprt/cdefs.h 2019-11-26 10:08:56.314644140 +0000 -@@ -1166,7 +1166,7 @@ - * Tell the compiler that we're falling through to the next case in a switch. - * @sa RT_FALL_THRU */ - #if RT_GNUC_PREREQ(7, 0) --# define RT_FALL_THROUGH() __attribute__((fallthrough)) -+# define RT_FALL_THROUGH() __attribute__((__fallthrough__)) - #else - # define RT_FALL_THROUGH() (void)0 - #endif -diff -u -r VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_drv.c VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_drv.c ---- VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_drv.c 2019-10-10 18:28:09.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_drv.c 2019-11-26 10:08:56.324644270 +0000 -@@ -270,12 +270,16 @@ - } - - static struct drm_driver driver = { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) - .driver_features = - DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ | --#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81) -+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81) - DRIVER_IRQ_SHARED | --#endif -+# endif /* < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81) */ - DRIVER_PRIME, -+#else /* >= KERNEL_VERSION(5, 4, 0) */ -+ .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ, -+#endif /* < KERNEL_VERSION(5, 4, 0) */ - .dev_priv_size = 0, - - .load = vbox_driver_load, -diff -u -r VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_main.c VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_main.c ---- VirtualBox-6.0.14/src/VBox/Additions/linux/drm/vbox_main.c 2019-10-10 18:28:09.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Additions/linux/drm/vbox_main.c 2019-11-26 10:08:56.324644270 +0000 -@@ -616,11 +616,13 @@ - - static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo) - { --#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) -+ return drm_vma_node_offset_addr(&bo->bo.base.vma_node); -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70) - return bo->bo.addr_space_offset; - #else - return drm_vma_node_offset_addr(&bo->bo.vma_node); --#endif -+#endif /* >= KERNEL_VERSION(5, 4, 0) */ - } - - int -diff -u -r VirtualBox-6.0.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c VirtualBox-6.0.14-5.4/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c ---- VirtualBox-6.0.14/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c 2019-10-10 18:35:33.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c 2019-11-26 10:08:56.321310893 +0000 -@@ -924,8 +924,13 @@ - for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++) - { - skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i]; -+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) -+ pSG->aSegs[iSeg].cb = pFrag->bv_len; -+ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; -+# else /* < KERNEL_VERSION(5, 4, 0) */ - pSG->aSegs[iSeg].cb = pFrag->size; - pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; -+# endif /* >= KERNEL_VERSION(5, 4, 0) */ - Log6((" %p", pSG->aSegs[iSeg].pv)); - pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; - Assert(iSeg <= pSG->cSegsAlloc); -@@ -940,8 +945,13 @@ - for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++) - { - skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i]; -+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) -+ pSG->aSegs[iSeg].cb = pFrag->bv_len; -+ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; -+# else /* < KERNEL_VERSION(5, 4, 0) */ - pSG->aSegs[iSeg].cb = pFrag->size; - pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; -+# endif /* >= KERNEL_VERSION(5, 4, 0) */ - Log6((" %p", pSG->aSegs[iSeg].pv)); - pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; - Assert(iSeg <= pSG->cSegsAlloc); -diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/common/fs/ntfsvfs.cpp VirtualBox-6.0.14-5.4/src/VBox/Runtime/common/fs/ntfsvfs.cpp ---- VirtualBox-6.0.14/src/VBox/Runtime/common/fs/ntfsvfs.cpp 2019-10-10 18:36:03.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/common/fs/ntfsvfs.cpp 2019-11-26 10:08:56.317977517 +0000 -@@ -1052,7 +1052,7 @@ - case 4: cClustersInRun |= (uint32_t)pbPairs[offPairs + 3] << 24; RT_FALL_THRU(); - case 3: cClustersInRun |= (uint32_t)pbPairs[offPairs + 2] << 16; RT_FALL_THRU(); - case 2: cClustersInRun |= (uint16_t)pbPairs[offPairs + 1] << 8; RT_FALL_THRU(); -- case 1: cClustersInRun |= (uint16_t)pbPairs[offPairs + 0] << 0; RT_FALL_THRU(); -+ case 1: cClustersInRun |= (uint16_t)pbPairs[offPairs + 0] << 0; - } - offPairs += cbRunField; - AssertBreakStmt(cClustersInRun <= cMaxClustersInRun, -diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c ---- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c 2019-10-10 18:36:16.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c 2019-11-26 10:24:51.692930759 +0000 -@@ -443,9 +443,6 @@ - } - - SetPageReserved(&paPages[iPage]); --#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ -- MY_SET_PAGES_EXEC(&paPages[iPage], 1); --#endif - } - *pPhys = page_to_phys(paPages); - pvRet = phys_to_virt(page_to_phys(paPages)); -@@ -491,9 +488,6 @@ - for (iPage = 0; iPage < cPages; iPage++) - { - ClearPageReserved(&paPages[iPage]); --#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ -- MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); --#endif - } - __free_pages(paPages, cOrder); - IPRT_LINUX_RESTORE_EFL_AC(); -diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c ---- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c 2019-10-10 18:36:16.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c 2019-11-26 10:09:28.805069152 +0000 -@@ -86,6 +86,8 @@ - /** Set if the allocation is contiguous. - * This means it has to be given back as one chunk. */ - bool fContiguous; -+ /** Set if executable allocation. */ -+ bool fExecutable; - /** Set if we've vmap'ed the memory into ring-0. */ - bool fMappedToRing0; - /** The pages in the apPages array. */ -@@ -289,10 +291,11 @@ - * Only valid if fContiguous == true, ignored otherwise. - * @param fFlagsLnx The page allocation flags (GPFs). - * @param fContiguous Whether the allocation must be contiguous. -+ * @param fExecutable Whether the memory must be executable. - * @param rcNoMem What to return when we're out of pages. - */ - static int rtR0MemObjLinuxAllocPages(PRTR0MEMOBJLNX *ppMemLnx, RTR0MEMOBJTYPE enmType, size_t cb, -- size_t uAlignment, gfp_t fFlagsLnx, bool fContiguous, int rcNoMem) -+ size_t uAlignment, gfp_t fFlagsLnx, bool fContiguous, bool fExecutable, int rcNoMem) - { - size_t iPage; - size_t const cPages = cb >> PAGE_SHIFT; -@@ -371,7 +374,8 @@ - for (iPage = 0; iPage < cPages; iPage++) - { - pMemLnx->apPages[iPage] = &paPages[iPage]; -- MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1); -+ if (fExecutable) -+ MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1); - if (PageHighMem(pMemLnx->apPages[iPage])) - BUG(); - } -@@ -379,6 +383,7 @@ - fContiguous = true; - #endif /* < 2.4.22 */ - pMemLnx->fContiguous = fContiguous; -+ pMemLnx->fExecutable = fExecutable; - - #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) - /* -@@ -409,7 +414,7 @@ - * This should never happen! - */ - printk("rtR0MemObjLinuxAllocPages(cb=0x%lx, uAlignment=0x%lx): alloc_pages(..., %d) returned physical memory at 0x%lx!\n", -- (unsigned long)cb, (unsigned long)uAlignment, rtR0MemObjLinuxOrder(cPages), (unsigned long)page_to_phys(pMemLnx->apPages[0])); -+ (unsigned long)cb, (unsigned long)uAlignment, rtR0MemObjLinuxOrder(cPages), (unsigned long)page_to_phys(pMemLnx->apPages[0])); - rtR0MemObjLinuxFreePages(pMemLnx); - return rcNoMem; - } -@@ -438,14 +443,12 @@ - while (iPage-- > 0) - { - #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) -- /* -- * See SetPageReserved() in rtR0MemObjLinuxAllocPages() -- */ -+ /* See SetPageReserved() in rtR0MemObjLinuxAllocPages() */ - ClearPageReserved(pMemLnx->apPages[iPage]); - #endif --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22) --#else -- MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 22) -+ if (pMemLnx->fExecutable) -+ MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1); - #endif - } - -@@ -662,10 +665,10 @@ - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22) - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_PAGE, cb, PAGE_SIZE, GFP_HIGHUSER, -- false /* non-contiguous */, VERR_NO_MEMORY); -+ false /* non-contiguous */, fExecutable, VERR_NO_MEMORY); - #else - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_PAGE, cb, PAGE_SIZE, GFP_USER, -- false /* non-contiguous */, VERR_NO_MEMORY); -+ false /* non-contiguous */, fExecutable, VERR_NO_MEMORY); - #endif - if (RT_SUCCESS(rc)) - { -@@ -696,19 +699,19 @@ - #if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32) - /* ZONE_DMA32: 0-4GB */ - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_DMA32, -- false /* non-contiguous */, VERR_NO_LOW_MEMORY); -+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY); - if (RT_FAILURE(rc)) - #endif - #ifdef RT_ARCH_AMD64 - /* ZONE_DMA: 0-16MB */ - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_DMA, -- false /* non-contiguous */, VERR_NO_LOW_MEMORY); -+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY); - #else - # ifdef CONFIG_X86_PAE - # endif - /* ZONE_NORMAL: 0-896MB */ - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_USER, -- false /* non-contiguous */, VERR_NO_LOW_MEMORY); -+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY); - #endif - if (RT_SUCCESS(rc)) - { -@@ -738,17 +741,17 @@ - #if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32) - /* ZONE_DMA32: 0-4GB */ - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_DMA32, -- true /* contiguous */, VERR_NO_CONT_MEMORY); -+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY); - if (RT_FAILURE(rc)) - #endif - #ifdef RT_ARCH_AMD64 - /* ZONE_DMA: 0-16MB */ - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_DMA, -- true /* contiguous */, VERR_NO_CONT_MEMORY); -+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY); - #else - /* ZONE_NORMAL (32-bit hosts): 0-896MB */ - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_USER, -- true /* contiguous */, VERR_NO_CONT_MEMORY); -+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY); - #endif - if (RT_SUCCESS(rc)) - { -@@ -795,7 +798,7 @@ - - rc = rtR0MemObjLinuxAllocPages(&pMemLnx, enmType, cb, uAlignment, fGfp, - enmType == RTR0MEMOBJTYPE_PHYS /* contiguous / non-contiguous */, -- VERR_NO_PHYS_MEMORY); -+ false /*fExecutable*/, VERR_NO_PHYS_MEMORY); - if (RT_FAILURE(rc)) - return rc; - -diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h ---- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2019-10-10 18:36:16.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2019-11-26 10:09:39.218538652 +0000 -@@ -337,8 +337,10 @@ - #endif - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) --# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) --# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) -+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) /* The interface was removed, but we only need it for < 2.4.22, so who cares. */ -+# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) -+# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) -+# endif - #else - # define MY_SET_PAGES_EXEC(pPages, cPages) \ - do { \ -diff -u -r VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c ---- VirtualBox-6.0.14/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c 2019-10-10 18:36:16.000000000 +0000 -+++ VirtualBox-6.0.14-5.4/src/VBox/Runtime/r0drv/linux/thread2-r0drv-linux.c 2019-11-26 10:08:56.321310893 +0000 -@@ -36,6 +36,9 @@ - #include - #include "internal/thread.h" - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+ #include -+#endif /* >= KERNEL_VERSION(4, 11, 0) */ - - RTDECL(RTTHREAD) RTThreadSelf(void) - { -- cgit v1.2.3