diff options
Diffstat (limited to 'app-emulation/virtualbox-modules')
5 files changed, 374 insertions, 1 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest index 63e588db763e..e627c92d0a2f 100644 --- a/app-emulation/virtualbox-modules/Manifest +++ b/app-emulation/virtualbox-modules/Manifest @@ -1,13 +1,17 @@ AUX create_vbox_modules_tarball.sh 896 BLAKE2B 4153a8fa67cd8fe7187f3c4232691b1ded8e51315f41292f9fcc0adb294e9b235b0c2f1e91f6f728076ab85f687ea1ba2877dc44b511eaceb24e7d6e71a8bbd4 SHA512 c3154a13550817c581fa142e24081edfbdbc145315d34cc4569d12ad87a518fa0bf1443c053b50fdfdea6915bda1325ad973455ee85079294b83a49fd53f4771 AUX virtualbox-modules-5.2.8-pax-const.patch 1728 BLAKE2B 1a2e8c5946af5abcf443c8cea08a6dbe78f75dd89aa072ac2ac0d745e598e8195ef321eaee53d31bedf52013d94efc046863e65c9fac0d61a507b292b04c7fb9 SHA512 600fd557992efb1fb5db9db64914becd5a86f81a42d70bbc3823533df941881f2289a6ccf630adb8346419499dd48b84ed43c21d0aba183a780daa99fcafddbd AUX virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch 2930 BLAKE2B a6875c7b0e93caf7388db66e4e76df0c0c0e41f01fd57a415b6ad4cf128570a8cb0330adf26fb45e40c6104d029f40bac53ef0fcbd061b391372c24459693fee SHA512 0da03204d3575563abb95036d54fccf5a002413b5a2ee1f9a5d4ab3433062fcc49d6fe41cc05e5775b3c9d703227e79cb6bae193f6ab2d2bdab306d37abf985b +AUX virtualbox-modules-6.0.14-kernel-5.4_rc6.patch 13688 BLAKE2B 15e900c3bb8d3d1adcf4b5ca63ac99369e47af3f8842d2fe8b7e1be7e33e2a05eebbf7120c0d5759d258de1b0f1ce5da92af4455fdd0101f053a1bedd31c78e1 SHA512 0970766f95b5215e0b0802db56b58375c4f46303e82b252fd34dbe56cc00e5be4e673c730c75e8eb92a18e7b42769cb11a57bf3824c3e3efe93fc67bff5cfe1f AUX virtualbox.conf 38 BLAKE2B 4f03cb09a1cca36013beb2a38220115d63510fd0aa63e2df1f0dc755a9162f7c2efed32d8f9c98fcc1e36d48067471085d5b038c6e8b3118508fbaaaab3790f7 SHA512 63eba0963b3344ea7e7a0035560406899d878a0761cddef9853bec95deb9812b221e98f446f240070d6448d61d6ecbcf7a990bcd52863660e8f21cf9a98c0e1d +AUX virtualbox.conf-r1 30 BLAKE2B 6308dedc75e2677cbdc844b53f51359e6b5745d3510636b04d08512122aeb6db81a1a18af156a8b9acccad395d390b24f9c27ed47413382cb6101266762de230 SHA512 5c6d31f527ca2db8d7fbeea759ac328eff42803d7940fd81ef12af22eb09f8913a0e561c35db1963e2a8b398ee288692817b5c8f3d439f2a6fd381769ec2ac8a DIST vbox-kernel-module-src-5.2.32.tar.xz 642428 BLAKE2B 0dda5cb5608c1eed22bea209564d53c5f7eab58ca620db2cc441e3c1ba9ad66609c4ef13df07fd29b691f2941a070f9852e8729cd386081df6a82ede345f33c5 SHA512 fadedab690cb7dee8b9a6747ed711d924bf3bce8999b24e7b64cb8738c53c2fa7372b1a8e8535e7e4ef0235aec02d4a3f1f67cd07d7621934fab684c5163329e DIST vbox-kernel-module-src-5.2.34.tar.xz 642756 BLAKE2B 8a1dacc71b0c033130db84f46ab6029839e4c95cd20b6c982716fde9a83070f4597a9418ef2747c5b5714eafd5c1453c67eb1477104cd1185baf408301bc0226 SHA512 2feefa7867c664f1a1af04181e6db4cf2ab18e8a42dc57afe5fe13d35de889c2a88b79eb43642e024d99decfdd79c42891989158016edb09d5001783c4cb7ac3 DIST vbox-kernel-module-src-6.0.12.tar.xz 669148 BLAKE2B 2291e3fcb9f049ce5657288151d182dfc9a3d6d6e8e1b32047e4b682f35e56f0a5bb5d3ad7efbc98082d2d1823aeb821099e9878b8a237322e8900fb2e2d65de SHA512 e9d8fcbfc076bf4e7d4dc5954e0c24509273c6358ee2de9ddfa87ea650b69fdc31d223595d610c1dd921efd6620ba5285f7f6a10170e90e706bf731e3629dc51 DIST vbox-kernel-module-src-6.0.14.tar.xz 669396 BLAKE2B e2dc77f33176af16be0fcad8851dd42eb2b7b21da35dc434951e3300e45fec4b516741f6122ae43aed2ee332323221098f047b5206ca63eb7741925a40682728 SHA512 1bcc78dff3305bb7186cec2a844188411a62fe32d0581c4de21843ee513925d5dfc9bd4dedb3cc90f0e1c165c7ae6d856590cc359e36cc8605b164c2c9979380 +DIST vbox-kernel-module-src-6.1.0.tar.xz 664268 BLAKE2B 9007242bdfcc407283d183132867bef8cfcf75960e7032f1541be39e33c15de68ae1f49c0022422d776fe0397c1411c62866990efb55fe29f9dce27bf7b95b71 SHA512 a5b9f740589ca09b4115275e01d0da7d68535a927550a57007b75726c715422724593f4debc2a123fb8de43a27e49b372aba3832f17dda3ecfd8813d440a0cff EBUILD virtualbox-modules-5.2.32.ebuild 1187 BLAKE2B 87f131dcdde7d6acf35a48183ed2423c20366d1c57bfde56b9c6b265006b049d6d5cf2f058867150f30cddfda308512907702208c15d4ae5a868c6e8d6468091 SHA512 80d1deb4b4142e7a4b718a460829ed99e5a4c24e50d65266263a872d247de519972bb13623881382ca8e12a4387e94f327fb9491728dff65ce8449244df0199f EBUILD virtualbox-modules-5.2.34.ebuild 1189 BLAKE2B 5edbc0952960db33bfa7f3d22266fac6785b6d01591e625e88818845667051e2a090ee34e7265dca082434d2da85dd84930bc71fab7e878f12dececa6320f0db SHA512 5701d91ab3bee88cfa0422f9d22c073f92faad72bbb8beb0ecee96ce78cdd51ef3b59c072c924b3ce267e31cbc4bcefc89376fe273de9dc35d508f3fbd6d59be EBUILD virtualbox-modules-6.0.12.ebuild 1316 BLAKE2B 996e40c230c441f6a5ba9020e2236a311594b3a02f56b0f50482f91e3dcec936be021ef18470681483c6f6ed3934430184a4b9a241abf413c9af2ce57734600c SHA512 6cbb8bfe065b65093d9c7566e2601ce3464c61f0afae12f35584bb3ba5ec3e8b850c99f864c021b6da66170819bea68b87cad8d6c796ac9d57ea8aac5842074f -EBUILD virtualbox-modules-6.0.14.ebuild 1245 BLAKE2B d604b453e51b534c7437a56d50ca248ac61362a27c782cb909c905061064859994c2a8fed83e36d43139c848ed494d30506af040e1fd4abd6685b8c50f146c34 SHA512 cc7e6095ca1d2d32e74d32ccf2a1d419b9a68aa8a9699cf7db60f5264f7515c5d17451801014776bdf6ebdf99183c66f82ef3ca304c3d586d0f79729b6078c9c +EBUILD virtualbox-modules-6.0.14.ebuild 1299 BLAKE2B b5bc508eb0ff4f33c4b99217ae9b9b7d48e6506bd7440e790bd57d501a99878c5be6493cbae5c4095fa58213daf803150f8399b9e91f87b4f0ef5e4dbefe9967 SHA512 8c64966ce7f4e93783be079a1205cb7ddef010b0ec67eb92d12d7a700c1181d975b08105a4056718255ada775a762115403eac77c3ba96b857397977269cd9be +EBUILD virtualbox-modules-6.1.0.ebuild 1372 BLAKE2B 6ded0a999d7e9dfdcddb961a4921a7a2bbeb7c8cbb8ee052c75dfcc993094dd9410184374f0928f7a6a9a347c724a1f44957f764e90294403ea1e962deecaf51 SHA512 0f4eb88c5dba50e6cd924e4d52809da6c5861a3183d2381c081ec707682943479dd64a0c5bd1bdd2e099f630616256eb71d1f244cc84130105d417cd5da525af MISC metadata.xml 353 BLAKE2B d7de13b3a8966ab3bca54ae77f7f6c7dfd57f2c5941f09ab1b5f79ac798687ffaaa183afdf9c034a9d50fda8507a3aaa2ef0c11d0fdfa6e09a55a1bdb9f30f4a SHA512 40029c9a246dde5ed51119f42ec5448b7ae08a47ee4d6be201fef282305c809d7d3182abf807dd2444ffe1a980abcd670878567d948bcd3661a55c6848a37000 diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.14-kernel-5.4_rc6.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.14-kernel-5.4_rc6.patch new file mode 100644 index 000000000000..2c52aa6757cf --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.14-kernel-5.4_rc6.patch @@ -0,0 +1,308 @@ +https://www.virtualbox.org/changeset/81586/vbox +https://www.virtualbox.org/changeset/81587/vbox +https://www.virtualbox.org/changeset/81649/vbox (partially) + +--- 6.0.14/vboxdrv/include/iprt/cdefs.h ++++ 6.0.14/vboxdrv/include/iprt/cdefs.h +@@ -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 +--- 6.0.14/vboxdrv/r0drv/linux/alloc-r0drv-linux.c ++++ 6.0.14/vboxdrv/r0drv/linux/alloc-r0drv-linux.c +@@ -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(); +--- 6.0.14/vboxdrv/r0drv/linux/memobj-r0drv-linux.c ++++ 6.0.14/vboxdrv/r0drv/linux/memobj-r0drv-linux.c +@@ -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; + +--- 6.0.14/vboxdrv/r0drv/linux/the-linux-kernel.h ++++ 6.0.14/vboxdrv/r0drv/linux/the-linux-kernel.h +@@ -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 { \ +--- 6.0.14/vboxdrv/r0drv/linux/thread2-r0drv-linux.c ++++ 6.0.14/vboxdrv/r0drv/linux/thread2-r0drv-linux.c +@@ -36,6 +36,9 @@ + #include <iprt/errcore.h> + #include "internal/thread.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++ #include <uapi/linux/sched/types.h> ++#endif /* >= KERNEL_VERSION(4, 11, 0) */ + + RTDECL(RTTHREAD) RTThreadSelf(void) + { +--- 6.0.14/vboxnetadp/include/iprt/cdefs.h ++++ 6.0.14/vboxnetadp/include/iprt/cdefs.h +@@ -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 +--- 6.0.14/vboxnetadp/r0drv/linux/the-linux-kernel.h ++++ 6.0.14/vboxnetadp/r0drv/linux/the-linux-kernel.h +@@ -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 { \ +--- 6.0.14/vboxnetflt/include/iprt/cdefs.h ++++ 6.0.14/vboxnetflt/include/iprt/cdefs.h +@@ -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 +--- 6.0.14/vboxnetflt/linux/VBoxNetFlt-linux.c ++++ 6.0.14/vboxnetflt/linux/VBoxNetFlt-linux.c +@@ -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); +--- 6.0.14/vboxnetflt/r0drv/linux/the-linux-kernel.h ++++ 6.0.14/vboxnetflt/r0drv/linux/the-linux-kernel.h +@@ -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 { \ +--- 6.0.14/vboxpci/include/iprt/cdefs.h ++++ 6.0.14/vboxpci/include/iprt/cdefs.h +@@ -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 +--- 6.0.14/vboxpci/r0drv/linux/the-linux-kernel.h ++++ 6.0.14/vboxpci/r0drv/linux/the-linux-kernel.h +@@ -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 --git a/app-emulation/virtualbox-modules/files/virtualbox.conf-r1 b/app-emulation/virtualbox-modules/files/virtualbox.conf-r1 new file mode 100644 index 000000000000..39b882494993 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox.conf-r1 @@ -0,0 +1,3 @@ +vboxdrv +vboxnetflt +vboxnetadp diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.14.ebuild index 7257cb3b5812..e98eef5b938f 100644 --- a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.14.ebuild +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.14.ebuild @@ -27,6 +27,10 @@ BUILD_TARGETS="all" BUILD_TARGET_ARCH="${ARCH}" MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})" +PATCHES=( + "${FILESDIR}/${P}-kernel-5.4_rc6.patch" +) + pkg_setup() { enewgroup vboxusers linux-mod_pkg_setup diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.0.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.0.ebuild new file mode 100644 index 000000000000..bd1f35d642f2 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# XXX: the tarball here is just the kernel modules split out of the binary +# package that comes from virtualbox-bin + +EAPI=7 + +inherit linux-mod user + +MY_P="vbox-kernel-module-src-${PV}" +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ +KEYWORDS="~amd64 ~x86" +IUSE="pax_kernel" + +RDEPEND="!=app-emulation/virtualbox-9999" + +S="${WORKDIR}" + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})" + +pkg_setup() { + enewgroup vboxusers + linux-mod_pkg_setup + BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" +} + +src_prepare() { + if use pax_kernel && kernel_is -ge 3 0 0 ; then + eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch + fi + + default +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf +} + +pkg_postinst() { + # Remove vboxpci.ko from current running kernel + find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete || die + linux-mod_pkg_postinst +} |