mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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@gentoo.org>
This commit is contained in:
@@ -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
|
||||
@@ -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}" )
|
||||
@@ -0,0 +1,38 @@
|
||||
# Copyright 2022-2024 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.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}" )
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Copyright 2022-2024 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.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}" )
|
||||
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
|
||||
}
|
||||
@@ -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}" )
|
||||
Reference in New Issue
Block a user