commit: f27a561c0424366fe6ce1b1264682fcadf90d9bd Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> AuthorDate: Thu May 29 17:08:20 2025 +0000 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> CommitDate: Thu May 29 17:22:18 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f27a561c
app-emulation/virtualbox-modules: support kernel 6.15 The patch was incomplete. It appears to work this time. Add a check for CONFIG_OBJTOOL_WERROR, it fails to build with this option set. Bug: https://bugs.gentoo.org/956797 Closes: https://bugs.gentoo.org/956675 Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org> .../virtualbox-modules-7.1.8-kernel-6.15.patch | 42 ++++++++++++++++++++++ ...1.ebuild => virtualbox-modules-7.1.8-r2.ebuild} | 3 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-7.1.8-kernel-6.15.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.1.8-kernel-6.15.patch index 33efe9f1b468..5f1140df9d62 100644 --- a/app-emulation/virtualbox-modules/files/virtualbox-modules-7.1.8-kernel-6.15.patch +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-7.1.8-kernel-6.15.patch @@ -72,3 +72,45 @@ https://bugs.gentoo.org/956675 $(VBOXMOD_0_TARGET)-y := $(VBOXMOD_OBJS) obj-m += $(VBOXMOD_0_TARGET).o +--- a/vboxdrv/linux/SUPDrv-linux.c ++++ b/vboxdrv/linux/SUPDrv-linux.c +@@ -1744,10 +1744,17 @@ SUPR0DECL(bool) SUPR0FpuBegin(bool fCtxHook) + */ + Assert(fCtxHook || !RTThreadPreemptIsEnabled(NIL_RTTHREAD)); + kernel_fpu_begin(); +-# if 0 /* Always do it for now for better test coverage. */ ++# if RTLNX_VER_MIN(6,15,0) /* fpregs_unlock may do more than just preempt_enable, so only when necessary now. */ + if (fCtxHook) +-# endif ++# endif ++ { ++# if RTLNX_VER_MIN(6,15,0) ++ if (!irqs_disabled()) ++ fpregs_unlock(); ++# else + preempt_enable(); ++# endif ++ } + return false; /** @todo Not sure if we have license to use any extended state, or + * if we're limited to the SSE & x87 FPU. If it's the former, + * we should return @a true and the caller can skip +@@ -1765,10 +1772,17 @@ SUPR0DECL(void) SUPR0FpuEnd(bool fCtxHook) + #if RTLNX_VER_MIN(4,19,0) + /* HACK ALERT! See SUPR0FpuBegin for an explanation of this. */ + Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD)); +-# if 0 /* Always do it for now for better test coverage. */ ++# if RTLNX_VER_MIN(6,15,0) /* fpregs_unlock may do more than just preempt_enable, so only when necessary now. */ + if (fCtxHook) +-# endif ++# endif ++ { ++# if RTLNX_VER_MIN(6,15,0) ++ if (!irqs_disabled()) ++ fpregs_lock(); ++# else + preempt_disable(); ++# endif ++ } + kernel_fpu_end(); + #endif + } diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.1.8-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.1.8-r2.ebuild similarity index 95% rename from app-emulation/virtualbox-modules/virtualbox-modules-7.1.8-r1.ebuild rename to app-emulation/virtualbox-modules/virtualbox-modules-7.1.8-r2.ebuild index e22f5075bf5d..e8a6bb0002ca 100644 --- a/app-emulation/virtualbox-modules/virtualbox-modules-7.1.8-r1.ebuild +++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.1.8-r2.ebuild @@ -19,7 +19,8 @@ LICENSE="GPL-3" SLOT="0/$(ver_cut 1-2)" KEYWORDS="~amd64" -CONFIG_CHECK="~!SPINLOCK JUMP_LABEL" +# bug #956797 +CONFIG_CHECK="~!SPINLOCK JUMP_LABEL !OBJTOOL_WERROR" PATCHES=( "${FILESDIR}"/${PN}-7.1.8-kernel-6.15.patch
