diff options
Diffstat (limited to 'app-emulation/virtualbox-modules')
-rw-r--r-- | app-emulation/virtualbox-modules/Manifest | 9 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/files/virtualbox-modules-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch | 96 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-6.0.24-r2.ebuild (renamed from app-emulation/virtualbox-modules/virtualbox-modules-6.0.24-r1.ebuild) | 2 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild | 55 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-6.1.16-r1.ebuild (renamed from app-emulation/virtualbox-modules/virtualbox-modules-6.1.12-r1.ebuild) | 6 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-6.1.16.ebuild | 55 |
6 files changed, 105 insertions, 118 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest index 2fcf3a044f01..dfc064270bc2 100644 --- a/app-emulation/virtualbox-modules/Manifest +++ b/app-emulation/virtualbox-modules/Manifest @@ -1,13 +1,10 @@ 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.1.16-linux-5.10-r0drv-memobj-fix-r0.patch 3237 BLAKE2B 5ebd53475768d4611ce9a23f8b11ad92246f561933c67a620136adcd4c7f5d1cf12cd09360eb6676221725c3732c255fcb1fe2a177fce9d007db83c776c5b202 SHA512 046e4c8e2d8f295d8e7c29c7dea53b8db18700f2ba03c7ab67ff466850f1cb2ed0dbc22aacd78b8c7011e3fb2dc02be06aba1678d1930b947988ddacf74e9174 AUX virtualbox.conf 38 BLAKE2B 4f03cb09a1cca36013beb2a38220115d63510fd0aa63e2df1f0dc755a9162f7c2efed32d8f9c98fcc1e36d48067471085d5b038c6e8b3118508fbaaaab3790f7 SHA512 63eba0963b3344ea7e7a0035560406899d878a0761cddef9853bec95deb9812b221e98f446f240070d6448d61d6ecbcf7a990bcd52863660e8f21cf9a98c0e1d AUX virtualbox.conf-r1 30 BLAKE2B 6308dedc75e2677cbdc844b53f51359e6b5745d3510636b04d08512122aeb6db81a1a18af156a8b9acccad395d390b24f9c27ed47413382cb6101266762de230 SHA512 5c6d31f527ca2db8d7fbeea759ac328eff42803d7940fd81ef12af22eb09f8913a0e561c35db1963e2a8b398ee288692817b5c8f3d439f2a6fd381769ec2ac8a DIST vbox-kernel-module-src-6.0.24.tar.xz 670960 BLAKE2B 26e4b1b6b9ab8c8fd0312b2162fe745dc11ef3f8a7e2f08f49df9d9ef346ec21b64e4a0a480bd726e9cca6ab2ce5d3cf2637aa8923c0843bf78a3ed160b98810 SHA512 9b1093307dffeb64f3ec22c4797268858e1fcc729403e89294c2e3cf0852662b7b0aad4416a593fd25b2107a1995d6bc17078f072b6f7718ed111ab61df8324e -DIST vbox-kernel-module-src-6.1.12.tar.xz 667312 BLAKE2B 31b3f7cd60d00e26c3177c4956d493a243e39d6251aeb3f3d72331d2fa85f2c90e884aa3f27e994502d86a34b1683c7d7db54eb1cc233e220f147119f6e9ed5e SHA512 ec4903fdc74e4be28003e8b231a4c8feb6e807bc59789c2729a8ab4199c6decc878468b67bce3a17625f60a33bb1d7c611e7306815091607b1fade2be521ed44 -DIST vbox-kernel-module-src-6.1.14.tar.xz 670392 BLAKE2B e6f324e71088c71bf67791861c79a81665f2111664428ed1e8a834b8a435bd04c1da49b6755ce5f6b1d883c6de01a0821e8d5a7519e11cf30e8f01a8b4e5d8bb SHA512 ccf4896106a7c86b651ed698abee78387660b7daa0f15329fc4bf2c3a7df4715bf4cce7cace1c6f6931dd9e8d02022d1ca0d005ae12c5139e54d3fb40792cb1c DIST vbox-kernel-module-src-6.1.16.tar.xz 671736 BLAKE2B 8b2153874ee7a63f88679a5372215e89def49622caa7679a5c2410423eaf23ced18ece79d638fc96db40fac88857db7568dd72dd8e05371b14add3553d61d3a7 SHA512 c51dfad5f9578ad43e2fbdd35a70659640030108006f89d362bc25dead99eb3b39a78d403633b3813f62f5b510eff22d826a2750b9c88f5fcb1cde6531295bff -EBUILD virtualbox-modules-6.0.24-r1.ebuild 1456 BLAKE2B b3c5277a7c6543e8db682608c0b042e1013b15aa6557c1fe632a50bae3860d370bd755958fc08c2b26c9e9b082c9ee3128866ea9da99a39f66c7f7bbfab85521 SHA512 bde22536f24bfa36e06bea56673d8e4f9a6f4243776ac910e6121c6286c36e06764df16aad5fd5e78b6da71854552500d2f978e4f6e532be8001e0f1788b4001 -EBUILD virtualbox-modules-6.1.12-r1.ebuild 1419 BLAKE2B ff41b1aded92f404c199e42076227efd4f5fde305fbd67e4a3b1f198c58a54786f72ba0e7eaf0e789a7bd13d67c1435e91f96e329362498187234a8918d29ac1 SHA512 d12adaafe5d3369dc793e9051ca3eedb10e52a76a9d0ea1805e6476808831613a93eaf71c93a836b075af2c822580e35e2b26e03216abdbecc3b44f83cfb6345 -EBUILD virtualbox-modules-6.1.14.ebuild 1419 BLAKE2B ff41b1aded92f404c199e42076227efd4f5fde305fbd67e4a3b1f198c58a54786f72ba0e7eaf0e789a7bd13d67c1435e91f96e329362498187234a8918d29ac1 SHA512 d12adaafe5d3369dc793e9051ca3eedb10e52a76a9d0ea1805e6476808831613a93eaf71c93a836b075af2c822580e35e2b26e03216abdbecc3b44f83cfb6345 -EBUILD virtualbox-modules-6.1.16.ebuild 1419 BLAKE2B ff41b1aded92f404c199e42076227efd4f5fde305fbd67e4a3b1f198c58a54786f72ba0e7eaf0e789a7bd13d67c1435e91f96e329362498187234a8918d29ac1 SHA512 d12adaafe5d3369dc793e9051ca3eedb10e52a76a9d0ea1805e6476808831613a93eaf71c93a836b075af2c822580e35e2b26e03216abdbecc3b44f83cfb6345 +EBUILD virtualbox-modules-6.0.24-r2.ebuild 1471 BLAKE2B 405d9600d0f8d00f9442db9bea087094a035114acf58e2357cb18797c9273ecec65c26f4b470711fcc6372a641e718553fb436a52eb366b3f563800277c5f3aa SHA512 a8ee80d7c9c0e31ac4f4c0115d2a4f11798a182549e009ed55dcaddf1b8b893a54838696cffcc01f4760f212b55fc80319917235ea40776d280496386c9e278e +EBUILD virtualbox-modules-6.1.16-r1.ebuild 1512 BLAKE2B 5a6cb34498170aa3f9bf5fe4387f0d4918325155c1c8b87d0f8307c2011fda971af63cce5db155e9a070ca7aabdd75042b1e05f60d30a87cf09ad551692a28d9 SHA512 d1d2bec59f9ac961fba04116dd77359481309b4cab600bc04d0ff09f894fdaf792d5a75dbabb9d308a43fa79c267cea7c82abeeb42f1f19f59b18249fa9b2af9 MISC metadata.xml 353 BLAKE2B d7de13b3a8966ab3bca54ae77f7f6c7dfd57f2c5941f09ab1b5f79ac798687ffaaa183afdf9c034a9d50fda8507a3aaa2ef0c11d0fdfa6e09a55a1bdb9f30f4a SHA512 40029c9a246dde5ed51119f42ec5448b7ae08a47ee4d6be201fef282305c809d7d3182abf807dd2444ffe1a980abcd670878567d948bcd3661a55c6848a37000 diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch new file mode 100644 index 000000000000..168d7c24f5a3 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch @@ -0,0 +1,96 @@ +Index: vboxdrv/r0drv/linux/memobj-r0drv-linux.c +=================================================================== +--- a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c ++++ b/vboxdrv/r0drv/linux/memobj-r0drv-linux.c +@@ -56,9 +56,12 @@ + * Whether we use alloc_vm_area (3.2+) for executable memory. + * This is a must for 5.8+, but we enable it all the way back to 3.2.x for + * better W^R compliance (fExecutable flag). */ +-#if RTLNX_VER_MIN(3,2,0) || defined(DOXYGEN_RUNNING) ++#if RTLNX_VER_RANGE(3,2,0, 5,10,0) || defined(DOXYGEN_RUNNING) + # define IPRT_USE_ALLOC_VM_AREA_FOR_EXEC + #endif ++#if RTLNX_VER_MIN(5,10,0) || defined(DOXYGEN_RUNNING) ++# define IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC ++#endif + + /* + * 2.6.29+ kernels don't work with remap_pfn_range() anymore because +@@ -502,7 +505,43 @@ + } + + ++#ifdef IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC + /** ++ * User data passed to the apply_to_page_range() callback. ++ */ ++typedef struct LNXAPPLYPGRANGE ++{ ++ /** Pointer to the memory object. */ ++ PRTR0MEMOBJLNX pMemLnx; ++ /** The page protection flags to apply. */ ++ pgprot_t fPg; ++} LNXAPPLYPGRANGE; ++/** Pointer to the user data. */ ++typedef LNXAPPLYPGRANGE *PLNXAPPLYPGRANGE; ++/** Pointer to the const user data. */ ++typedef const LNXAPPLYPGRANGE *PCLNXAPPLYPGRANGE; ++ ++/** ++ * Callback called in apply_to_page_range(). ++ * ++ * @returns Linux status code. ++ * @param pPte Pointer to the page table entry for the given address. ++ * @param uAddr The address to apply the new protection to. ++ * @param pvUser The opaque user data. ++ */ ++static DECLCALLBACK(int) rtR0MemObjLinuxApplyPageRange(pte_t *pPte, unsigned long uAddr, void *pvUser) ++{ ++ PCLNXAPPLYPGRANGE pArgs = (PCLNXAPPLYPGRANGE)pvUser; ++ PRTR0MEMOBJLNX pMemLnx = pArgs->pMemLnx; ++ uint32_t idxPg = (uAddr - (unsigned long)pMemLnx->Core.pv) >> PAGE_SHIFT; ++ ++ set_pte(pPte, mk_pte(pMemLnx->apPages[idxPg], pArgs->fPg)); ++ return 0; ++} ++#endif ++ ++ ++/** + * Maps the allocation into ring-0. + * + * This will update the RTR0MEMOBJLNX::Core.pv and RTR0MEMOBJ::fMappedToRing0 members. +@@ -584,6 +623,11 @@ + else + # endif + { ++# if defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC) ++ if (fExecutable) ++ pgprot_val(fPg) |= _PAGE_NX; /* Uses RTR0MemObjProtect to clear NX when memory ready, W^X fashion. */ ++# endif ++ + # ifdef VM_MAP + pMemLnx->Core.pv = vmap(&pMemLnx->apPages[0], pMemLnx->cPages, VM_MAP, fPg); + # else +@@ -1851,6 +1895,21 @@ + preempt_enable(); + return VINF_SUCCESS; + } ++# elif defined(IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC) ++ PRTR0MEMOBJLNX pMemLnx = (PRTR0MEMOBJLNX)pMem; ++ if ( pMemLnx->fExecutable ++ && pMemLnx->fMappedToRing0) ++ { ++ LNXAPPLYPGRANGE Args; ++ Args.pMemLnx = pMemLnx; ++ Args.fPg = rtR0MemObjLinuxConvertProt(fProt, true /*fKernel*/); ++ int rcLnx = apply_to_page_range(current->active_mm, (unsigned long)pMemLnx->Core.pv + offSub, cbSub, ++ rtR0MemObjLinuxApplyPageRange, (void *)&Args); ++ if (rcLnx) ++ return VERR_NOT_SUPPORTED; ++ ++ return VINF_SUCCESS; ++ } + # endif + + NOREF(pMem); diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.24-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.24-r2.ebuild index 80c67913b279..a56ac88cb0f4 100644 --- a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.24-r1.ebuild +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.24-r2.ebuild @@ -14,7 +14,7 @@ HOMEPAGE="https://www.virtualbox.org/" SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" LICENSE="GPL-2" -SLOT="0" +SLOT="0/$(ver_cut 1-2)" [[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ KEYWORDS="amd64 x86" IUSE="pax_kernel" diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild deleted file mode 100644 index 6ad5644e2ed2..000000000000 --- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.14.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2020 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 toolchain-funcs - -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" -IUSE="pax_kernel" - -RDEPEND="!=app-emulation/virtualbox-9999" - -S="${WORKDIR}" - -BUILD_TARGETS="all" -MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})" -MODULESD_VBOXDRV_ENABLED="yes" -MODULESD_VBOXNETADP_ENABLED="no" -MODULESD_VBOXNETFLT_ENABLED="no" - -pkg_setup() { - 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 - linux-mod_pkg_postinst -} diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.12-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16-r1.ebuild index 6ad5644e2ed2..28c26bd6c0c9 100644 --- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.12-r1.ebuild +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16-r1.ebuild @@ -14,7 +14,7 @@ HOMEPAGE="https://www.virtualbox.org/" SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" LICENSE="GPL-2" -SLOT="0" +SLOT="0/$(ver_cut 1-2)" [[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ KEYWORDS="~amd64" IUSE="pax_kernel" @@ -29,6 +29,10 @@ MODULESD_VBOXDRV_ENABLED="yes" MODULESD_VBOXNETADP_ENABLED="no" MODULESD_VBOXNETFLT_ENABLED="no" +PATCHES=( + "${FILESDIR}/${P}-linux-5.10-r0drv-memobj-fix-r0.patch" #751328 +) + pkg_setup() { 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" diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16.ebuild deleted file mode 100644 index 6ad5644e2ed2..000000000000 --- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2020 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 toolchain-funcs - -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" -IUSE="pax_kernel" - -RDEPEND="!=app-emulation/virtualbox-9999" - -S="${WORKDIR}" - -BUILD_TARGETS="all" -MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})" -MODULESD_VBOXDRV_ENABLED="yes" -MODULESD_VBOXNETADP_ENABLED="no" -MODULESD_VBOXNETFLT_ENABLED="no" - -pkg_setup() { - 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 - linux-mod_pkg_postinst -} |