public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, ...
Date: Tue, 24 Sep 2019 19:56:16 +0000 (UTC)	[thread overview]
Message-ID: <1569354963.ca27b4f4319e1955f399c9766bbd9199a2a4c3a2.whissi@gentoo> (raw)

commit:     ca27b4f4319e1955f399c9766bbd9199a2a4c3a2
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 24 19:55:40 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Sep 24 19:56:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca27b4f4

app-emulation/virtualbox-guest-additions: add linux-5.3+ compatibility

Closes: https://bugs.gentoo.org/694614
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...additions-6.0.12-linux-5.3+-compatibility.patch | 75 ++++++++++++++++++++++
 .../virtualbox-guest-additions-6.0.12.ebuild       |  4 ++
 2 files changed, 79 insertions(+)

diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch
new file mode 100644
index 00000000000..ad4b460c814
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch
@@ -0,0 +1,75 @@
+https://bugs.gentoo.org/694614
+https://www.virtualbox.org/ticket/18911#comment:5
+
+--- a/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
++++ b/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
+@@ -2123,7 +2123,9 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign
+ #endif
+     if (in_dev != NULL)
+     {
+-        for_ifa(in_dev) {
++        struct in_ifaddr *ifa;
++
++        for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
+             if (VBOX_IPV4_IS_LOOPBACK(ifa->ifa_address))
+                 return NOTIFY_OK;
+ 
+@@ -2137,7 +2139,7 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign
+ 
+             pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
+                 /* :fAdded */ true, kIntNetAddrType_IPv4, &ifa->ifa_address);
+-        } endfor_ifa(in_dev);
++        }
+     }
+ 
+     /*
+--- a/Runtime/r0drv/linux/mp-r0drv-linux.c
++++ b/Runtime/r0drv/linux/mp-r0drv-linux.c
+@@ -283,12 +283,15 @@ RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
+     if (RTCpuSetCount(&OnlineSet) > 1)
+     {
+         /* Fire the function on all other CPUs without waiting for completion. */
+-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
++        smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
++# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+         int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */);
++        Assert(!rc); NOREF(rc);
+ # else
+         int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */);
+-# endif
+         Assert(!rc); NOREF(rc);
++# endif
+     }
+ #endif
+ 
+@@ -326,7 +329,6 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
+ {
+ #ifdef CONFIG_SMP
+     IPRT_LINUX_SAVE_EFL_AC();
+-    int rc;
+     RTMPARGS Args;
+ 
+     RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
+@@ -337,14 +339,17 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
+     Args.cHits = 0;
+ 
+     RTThreadPreemptDisable(&PreemptState);
+-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+-    rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
++    smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
++# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
++    int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */);
++    Assert(rc == 0); NOREF(rc);
+ # else /* older kernels */
+-    rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
++    int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */);
++    Assert(rc == 0); NOREF(rc);
+ # endif /* older kernels */
+     RTThreadPreemptRestore(&PreemptState);
+ 
+-    Assert(rc == 0); NOREF(rc);
+     IPRT_LINUX_RESTORE_EFL_AC();
+ #else
+     RT_NOREF(pfnWorker, pvUser1, pvUser2);

diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild
index efbf2bd2fdf..9ac2195b1e0 100644
--- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.12.ebuild
@@ -71,6 +71,10 @@ src_prepare() {
 	eend
 	popd &>/dev/null || die
 
+	pushd src/VBox &>/dev/null || die
+	eapply "${FILESDIR}"/virtualbox-guest-additions-6.0.12-linux-5.3+-compatibility.patch
+	popd &>/dev/null || die
+
 	# PaX fixes (see bug #298988)
 	pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
 	eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch


             reply	other threads:[~2019-09-24 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 19:56 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-13  9:44 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-guest-additions/, Viorel Munteanu
2022-09-05 12:39 Joonas Niilola
2022-07-27 21:05 Sam James
2016-11-01 15:35 Lars Wendler
2015-10-20 21:42 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569354963.ca27b4f4319e1955f399c9766bbd9199a2a4c3a2.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox