From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 54461138239 for ; Sun, 25 Apr 2021 12:59:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A60BAE07D8; Sun, 25 Apr 2021 12:59:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BD18E07D8 for ; Sun, 25 Apr 2021 12:59:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 945643414ED for ; Sun, 25 Apr 2021 12:59:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EE67859C for ; Sun, 25 Apr 2021 12:59:55 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1619355570.9d0b3a7793ef1bdf42d4f5acc30bb427eb5b17e4.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/virtualbox-modules/files/virtualbox-modules-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch X-VCS-Directories: app-emulation/virtualbox-modules/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: 9d0b3a7793ef1bdf42d4f5acc30bb427eb5b17e4 X-VCS-Branch: master Date: Sun, 25 Apr 2021 12:59:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 154fb520-1dcf-420b-9962-aac1fd4be711 X-Archives-Hash: bb6e6e1b29ae860e40a105c9f66677fb commit: 9d0b3a7793ef1bdf42d4f5acc30bb427eb5b17e4 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Thu Apr 22 18:10:15 2021 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Sun Apr 25 12:59:30 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d0b3a77 app-emulation/virtualbox-modules: remove unused patch Closes: https://github.com/gentoo/gentoo/pull/20505 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Signed-off-by: Conrad Kostecki gentoo.org> ...les-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch | 96 ---------------------- 1 file changed, 96 deletions(-) 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 deleted file mode 100644 index 168d7c24f5a..00000000000 --- a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch +++ /dev/null @@ -1,96 +0,0 @@ -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);