public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2016-07-14  9:28 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2016-07-14  9:28 UTC (permalink / raw
  To: gentoo-commits

commit:     26ac535a9f950c2906fffaac9145aaefa2f64457
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 09:27:55 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 09:28:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26ac535a

app-emulation/virtualbox-modules: Added vboxpci to virtualbox.conf

and mention it in the pkg_postinst elog messages.

Change suggested by masterzorag.

Package-Manager: portage-2.3.0
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-emulation/virtualbox-modules/files/virtualbox.conf                | 1 +
 ...lbox-modules-5.0.24.ebuild => virtualbox-modules-5.0.24-r1.ebuild} | 4 ++--
 ...ualbox-modules-5.1.0.ebuild => virtualbox-modules-5.1.0-r1.ebuild} | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app-emulation/virtualbox-modules/files/virtualbox.conf b/app-emulation/virtualbox-modules/files/virtualbox.conf
index 6e882a1..452f0a9 100644
--- a/app-emulation/virtualbox-modules/files/virtualbox.conf
+++ b/app-emulation/virtualbox-modules/files/virtualbox.conf
@@ -1,3 +1,4 @@
 vboxnetflt
 vboxnetadp
 vboxdrv
+vboxpci

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.0.24.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.24-r1.ebuild
similarity index 95%
rename from app-emulation/virtualbox-modules/virtualbox-modules-5.0.24.ebuild
rename to app-emulation/virtualbox-modules/virtualbox-modules-5.0.24-r1.ebuild
index 0cdee85..7da1a80 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.0.24.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.24-r1.ebuild
@@ -55,7 +55,7 @@ src_install() {
 
 pkg_postinst() {
 	linux-mod_pkg_postinst
-	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\""
-	elog "and \"vboxnetadp\" to:"
+	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\","
+	elog "\"vboxnetadp\" and \"vboxpci\" to:"
 	elog "  /etc/conf.d/modules"
 }

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.0.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.0-r1.ebuild
similarity index 95%
rename from app-emulation/virtualbox-modules/virtualbox-modules-5.1.0.ebuild
rename to app-emulation/virtualbox-modules/virtualbox-modules-5.1.0-r1.ebuild
index 0cdee85..7da1a80 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.0.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.0-r1.ebuild
@@ -55,7 +55,7 @@ src_install() {
 
 pkg_postinst() {
 	linux-mod_pkg_postinst
-	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\""
-	elog "and \"vboxnetadp\" to:"
+	elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\","
+	elog "\"vboxnetadp\" and \"vboxpci\" to:"
 	elog "  /etc/conf.d/modules"
 }


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2016-12-18 11:41 Justin Lecher
  0 siblings, 0 replies; 7+ messages in thread
From: Justin Lecher @ 2016-12-18 11:41 UTC (permalink / raw
  To: gentoo-commits

commit:     3f41f9237243fd7b26a7885dfcf9ab1a8cd90397
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 18 11:41:45 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Dec 18 11:41:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f41f923

app-emulation/virtualbox-modules: Backport fix for compatibility with linux-4.9

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=602942

Package-Manager: Portage-2.3.3, Repoman-2.3.1
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../files/virtualbox-modules-5.1.10-ALIGN-backport.patch     | 12 ++++++++++++
 app-emulation/virtualbox-modules/metadata.xml                |  6 +++---
 .../virtualbox-modules/virtualbox-modules-5.1.10.ebuild      |  4 ++++
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch
new file mode 100644
index 00000000..1bc3fdd
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-5.1.10-ALIGN-backport.patch
@@ -0,0 +1,12 @@
+Index: trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
+===================================================================
+--- a/vboxdrv/SUPDrvInternal.h
++++ b/vboxdrv/SUPDrvInternal.h
+@@ -65,7 +65,4 @@
+ #           include <linux/modversions.h>
+ #       endif
+-#   endif
+-#   if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 0)
+-#       undef ALIGN
+ #   endif
+ #   ifndef KBUILD_STR

diff --git a/app-emulation/virtualbox-modules/metadata.xml b/app-emulation/virtualbox-modules/metadata.xml
index 18da31a..851d70d 100644
--- a/app-emulation/virtualbox-modules/metadata.xml
+++ b/app-emulation/virtualbox-modules/metadata.xml
@@ -9,7 +9,7 @@
     <email>masterzorag@gmail.com</email>
     <description>Proxy maintainer. CC him on bugs</description>
   </maintainer>
-<use>
-	<flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag>
-</use>
+  <use>
+    <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag>
+  </use>
 </pkgmetadata>

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.10.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.10.ebuild
index 76cc8f0..847e3c7 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.10.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.10.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}-ALIGN-backport.patch
+)
+
 pkg_setup() {
 	enewgroup vboxusers
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2018-02-16 13:12 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2018-02-16 13:12 UTC (permalink / raw
  To: gentoo-commits

commit:     fd3837fde30ac9f5f6c186ab82334f04a7db0cea
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 13:10:29 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 13:12:12 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd3837fd

app-emulation/virtualbox-modules: Replaced epatch with eapply.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/virtualbox-modules-4.1.4-pax-const.patch   | 20 ++++++++------------
 .../virtualbox-modules-5.1.32.ebuild                 |  4 ++--
 .../virtualbox-modules-5.2.6.ebuild                  |  2 +-
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch
index 4e4cde06c78..f9878848ae1 100644
--- a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch
@@ -1,6 +1,5 @@
-diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h
---- vboxdrv.orig/SUPDrvIDC.h	2011-09-06 15:53:27.852567531 +0200
-+++ vboxdrv/SUPDrvIDC.h	2011-09-06 15:54:05.420565524 +0200
+--- vboxdrv/SUPDrvIDC.h
++++ vboxdrv/SUPDrvIDC.h
 @@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM
          {
              /** The symbol address. */
@@ -10,9 +9,8 @@ diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h
      } u;
  } SUPDRVIDCREQGETSYM;
  /** Pointer to a SUPDRV IDC get symbol request. */
-diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h
---- vboxnetflt.orig/include/VBox/intnet.h	2011-09-06 15:53:27.852567531 +0200
-+++ vboxnetflt/include/VBox/intnet.h	2011-09-06 15:54:05.424565524 +0200
+--- vboxnetflt/include/VBox/intnet.h
++++ vboxnetflt/include/VBox/intnet.h
 @@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY
      DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName,
                                                     PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags,
@@ -22,9 +20,8 @@ diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h
  /** Pointer to the trunk factory. */
  typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY;
  
-diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c
---- vboxnetflt.orig/linux/VBoxNetFlt-linux.c	2011-07-19 12:15:22.000000000 +0200
-+++ vboxnetflt/linux/VBoxNetFlt-linux.c	2011-09-06 15:56:00.516559379 +0200
+--- vboxnetflt/linux/VBoxNetFlt-linux.c
++++ vboxnetflt/linux/VBoxNetFlt-linux.c
 @@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE;
  
  # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */
@@ -34,9 +31,8 @@ diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-l
  # define OVR_OPS  netdev_ops
  # define OVR_XMIT pOrgOps->ndo_start_xmit
  
-diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h
---- vboxpci.orig/include/VBox/rawpci.h	2011-04-18 17:01:12.000000000 +0200
-+++ vboxpci/include/VBox/rawpci.h	2011-09-06 15:57:17.340555277 +0200
+--- vboxpci/include/VBox/rawpci.h
++++ vboxpci/include/VBox/rawpci.h
 @@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY
      DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY       pFactory,
                                              PVM                  pVM,

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.32.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.32.ebuild
index 065ee901081..c0d163e68ee 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.32.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.32.ebuild
@@ -44,11 +44,11 @@ src_prepare() {
 	fi
 
 	if use pax_kernel && kernel_is -ge 3 0 0 ; then
-		epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+		eapply "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
 	fi
 
 	if kernel_is -ge 4 14 0 ; then
-		epatch "${FILESDIR}"/${PN}-5.1.30-udp.patch
+		eapply "${FILESDIR}"/${PN}-5.1.30-udp.patch
 	fi
 
 	default

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.6.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.6.ebuild
index 212a1449e0e..9ff1abb8099 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.6.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.6.ebuild
@@ -39,7 +39,7 @@ pkg_setup() {
 
 src_prepare() {
 	if use pax_kernel && kernel_is -ge 3 0 0 ; then
-		epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
+		eapply "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
 	fi
 
 	default


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2019-11-27 12:17 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2019-11-27 12:17 UTC (permalink / raw
  To: gentoo-commits

commit:     9e99aae326f9512cf08560abd4f784b15baee850
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 27 12:17:12 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 12:17:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e99aae3

app-emulation/virtualbox-modules: Fixed build with kernel-5.4

Closes: https://bugs.gentoo.org/701154
Package-Manager: Portage-2.3.80, Repoman-2.3.18
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../virtualbox-modules-6.0.14-kernel-5.4_rc6.patch | 308 +++++++++++++++++++++
 .../virtualbox-modules-6.0.14.ebuild               |   4 +
 2 files changed, 312 insertions(+)

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 00000000000..2c52aa6757c
--- /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/virtualbox-modules-6.0.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.14.ebuild
index 7257cb3b581..e98eef5b938 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2020-12-14 10:56 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2020-12-14 10:56 UTC (permalink / raw
  To: gentoo-commits

commit:     aa4ae7bff0fcd4972c8258a53e979976dd7a7afc
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 14 10:56:09 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Dec 14 10:56:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa4ae7bf

app-emulation/virtualbox-modules: Fixed build with kernel-5.10

Thanks-to: jospezial <jospezial <AT> gmx.de>
Reported-by: Helmut Jarausch <jarausch <AT> igpm.rwth-aachen.de>
Closes: https://bugs.gentoo.org/751328
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...les-6.1.16-linux-5.10-r0drv-memobj-fix-r0.patch | 96 ++++++++++++++++++++++
 .../virtualbox-modules-6.1.16-r1.ebuild            |  4 +
 2 files changed, 100 insertions(+)

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 00000000000..168d7c24f5a
--- /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.1.16-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16-r1.ebuild
index 29faf7632fd..28c26bd6c0c 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16-r1.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.16-r1.ebuild
@@ -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"


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2023-08-14 15:29 Viorel Munteanu
  0 siblings, 0 replies; 7+ messages in thread
From: Viorel Munteanu @ 2023-08-14 15:29 UTC (permalink / raw
  To: gentoo-commits

commit:     ab41891b6bc4e255d09bca572220d571ca300a5a
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 14 15:25:59 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Aug 14 15:25:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab41891b

app-emulation/virtualbox-modules: patch for kernel 6.4.10

Closes: https://bugs.gentoo.org/912168
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../virtualbox-modules-7.0.10-kernel-6.4.10.patch  | 13 ++++++++
 .../virtualbox-modules-6.1.46-r1.ebuild            | 36 ++++++++++++++++++++++
 .../virtualbox-modules-7.0.10-r1.ebuild            | 36 ++++++++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.10-kernel-6.4.10.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.10-kernel-6.4.10.patch
new file mode 100644
index 000000000000..189a2ce4085e
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.10-kernel-6.4.10.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/912168
+
+--- a/vboxnetflt/linux/VBoxNetFlt-linux.c
++++ b/vboxnetflt/linux/VBoxNetFlt-linux.c
+@@ -47,7 +47,7 @@
+ #if RTLNX_VER_MIN(2,6,24)
+ # include <linux/nsproxy.h>
+ #endif
+-#if RTLNX_VER_MIN(6,5,0)
++#if RTLNX_VER_MIN(6,4,10)
+ # include <net/gso.h>
+ #endif
+ #include <linux/netdevice.h>

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.46-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.46-r1.ebuild
new file mode 100644
index 000000000000..2b866fda3662
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.46-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2022-2023 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-*.run
+# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
+
+EAPI=8
+
+inherit linux-mod-r1
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+
+PATCHES=( "${FILESDIR}"/${PN}-7.0.10-kernel-6.4.10.patch )
+
+src_compile() {
+	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
+	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+	linux-mod-r1_src_compile
+}
+
+src_install() {
+	linux-mod-r1_src_install
+	insinto /usr/lib/modules-load.d/
+	newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.10-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.10-r1.ebuild
new file mode 100644
index 000000000000..655c1e954921
--- /dev/null
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.10-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2022-2023 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-*.run
+# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb
+
+EAPI=8
+
+inherit linux-mod-r1
+
+MY_P="vbox-kernel-module-src-${PV}"
+DESCRIPTION="Kernel Modules for Virtualbox"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="GPL-3"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64"
+
+CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
+
+PATCHES=( "${FILESDIR}"/${PN}-7.0.10-kernel-6.4.10.patch )
+
+src_compile() {
+	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
+	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+	linux-mod-r1_src_compile
+}
+
+src_install() {
+	linux-mod-r1_src_install
+	insinto /usr/lib/modules-load.d/
+	newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/
@ 2024-02-24  9:02 Viorel Munteanu
  0 siblings, 0 replies; 7+ messages in thread
From: Viorel Munteanu @ 2024-02-24  9:02 UTC (permalink / raw
  To: gentoo-commits

commit:     b8d6d2d875d4d1b5a46ef66c7524e197d1f73623
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 24 08:59:33 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Feb 24 09:01:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8d6d2d8

app-emulation/virtualbox-modules: patch for kernel 6.6

Apply upstream patch for module crash under kenrel 6.6.x.

Closes: https://bugs.gentoo.org/923277
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 ...tualbox-modules-7.0.14-kernel-6.6-warning.patch | 27 ++++++++++++++++++++++
 ....ebuild => virtualbox-modules-6.1.48-r1.ebuild} |  4 ++++
 ....ebuild => virtualbox-modules-6.1.50-r1.ebuild} |  4 ++++
 ....ebuild => virtualbox-modules-7.0.12-r1.ebuild} |  4 ++++
 ....ebuild => virtualbox-modules-7.0.14-r1.ebuild} |  4 ++++
 5 files changed, 43 insertions(+)

diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch
new file mode 100644
index 000000000000..64bafa84e365
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.0.14-kernel-6.6-warning.patch
@@ -0,0 +1,27 @@
+https://www.virtualbox.org/changeset/103168/vbox
+https://bugs.gentoo.org/923277
+
+--- a/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
++++ b/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+@@ -244,9 +244,21 @@
+ #if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
+             if (fKernel)
+             {
++# if RTLNX_VER_MIN(6,6,0)
++                /* In kernel 6.6 mk_pte() macro was fortified with additional
++                 * check which does not allow to use our custom mask anymore
++                 * (see kernel commit ae1f05a617dcbc0a732fbeba0893786cd009536c).
++                 * For this particular mapping case, an existing mask PAGE_KERNEL_ROX
++                 * can be used instead. PAGE_KERNEL_ROX was introduced in
++                 * kernel 5.8, however, lets apply it for kernels 6.6 and newer
++                 * to be on a safe side.
++                 */
++                return PAGE_KERNEL_ROX;
++# else
+                 pgprot_t fPg = MY_PAGE_KERNEL_EXEC;
+                 pgprot_val(fPg) &= ~_PAGE_RW;
+                 return fPg;
++# endif
+             }
+             return PAGE_READONLY_EXEC;
+ #else

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.48-r1.ebuild
similarity index 93%
copy from app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild
copy to app-emulation/virtualbox-modules/virtualbox-modules-6.1.48-r1.ebuild
index e6ea30a58fd9..3b1165d18eb7 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.48-r1.ebuild
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
 
 CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.0.14-kernel-6.6-warning.patch
+)
+
 src_compile() {
 	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
 	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild
similarity index 93%
rename from app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild
rename to app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild
index e6ea30a58fd9..3b1165d18eb7 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.50-r1.ebuild
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
 
 CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.0.14-kernel-6.6-warning.patch
+)
+
 src_compile() {
 	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
 	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild
similarity index 93%
copy from app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild
copy to app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild
index 08e22e5e0379..590b20110b46 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.12-r1.ebuild
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
 
 CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-7.0.14-kernel-6.6-warning.patch
+)
+
 src_compile() {
 	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
 	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14-r1.ebuild
similarity index 94%
rename from app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild
rename to app-emulation/virtualbox-modules/virtualbox-modules-7.0.14-r1.ebuild
index 08e22e5e0379..5466947cbf9d 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.14-r1.ebuild
@@ -21,6 +21,10 @@ KEYWORDS="~amd64"
 
 CONFIG_CHECK="~!SPINLOCK JUMP_LABEL"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-kernel-6.6-warning.patch
+)
+
 src_compile() {
 	local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc )
 	local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-24  9:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-18 11:41 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/, app-emulation/virtualbox-modules/files/ Justin Lecher
  -- strict thread matches above, loose matches on Subject: below --
2024-02-24  9:02 Viorel Munteanu
2023-08-14 15:29 Viorel Munteanu
2020-12-14 10:56 Lars Wendler
2019-11-27 12:17 Lars Wendler
2018-02-16 13:12 Lars Wendler
2016-07-14  9:28 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox