diff options
author | Daniel Bermond | 2019-09-19 20:25:20 +0000 |
---|---|---|
committer | Daniel Bermond | 2019-09-19 20:25:20 +0000 |
commit | 83f1870f15d86179a665dc0c6b36815a385f6fbe (patch) | |
tree | cdf35906d1f5815ca175ebe9e925c8cf33e62cef | |
parent | 7aa1e1b49b02a0d66da8e6c2f5897f6c7648d128 (diff) | |
download | aur-83f1870f15d86179a665dc0c6b36815a385f6fbe.tar.gz |
Fix for linux 5.3
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | 015-linux-5-3.patch | 76 | ||||
-rw-r--r-- | PKGBUILD | 9 |
3 files changed, 85 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = virtualbox-bin pkgdesc = Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version) pkgver = 6.0.12 - pkgrel = 1 + pkgrel = 2 url = https://www.virtualbox.org/ install = virtualbox-bin.install arch = x86_64 @@ -48,6 +48,7 @@ pkgbase = virtualbox-bin source = do_dkms source = dkms.conf source = 013-Makefile.patch + source = 015-linux-5-3.patch sha256sums = 60659c5096252e768cf1eaeb646e7cdf5547ae832b1f8c52e59b4e8799e6b584 sha256sums = 995310edbc813808c638d96946a6f508099e0b261ee77628c53fd0c924e0f00e sha256sums = 584f02a2a1e83b9cabd7b7e3b00a0515b118e040160eb46c014ea6fd3a16586e @@ -60,6 +61,7 @@ pkgbase = virtualbox-bin sha256sums = cc1c0500ab07bc13563d99037f776bf64bdc90bb521e31e2e0b04e42ea5bb36a sha256sums = e9df0fff15184d0a90abe17707bdbe1931582433bbc14ded4fb3b0252653c801 sha256sums = 268e794de9d66a2751006b2ca3810fc6a05da4af2ffa8b58c56c94b292f1f424 + sha256sums = 37593d09bcde15a056b93d56ad47877a9bbac140474da2c66648871a0537998a pkgname = virtualbox-bin diff --git a/015-linux-5-3.patch b/015-linux-5-3.patch new file mode 100644 index 000000000000..3cc6b383e353 --- /dev/null +++ b/015-linux-5-3.patch @@ -0,0 +1,76 @@ +diff --git a/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c b/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c +index 15ecd351..a2f2a284 100644 +--- a/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c ++++ b/src/vboxhost/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); ++ } + } + + /* +diff --git a/src/vboxhost/vboxdrv/r0drv/linux/mp-r0drv-linux.c b/src/vboxhost/vboxdrv/r0drv/linux/mp-r0drv-linux.c +index ca480683..72b25bb8 100644 +--- a/src/vboxhost/vboxdrv/r0drv/linux/mp-r0drv-linux.c ++++ b/src/vboxhost/vboxdrv/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); @@ -8,7 +8,7 @@ pkgname=virtualbox-bin pkgver=6.0.12 _build=133076 _rev=79806 -pkgrel=1 +pkgrel=2 pkgdesc='Oracle VM VirtualBox Binary Edition (Oracle branded non-OSE version)' arch=('x86_64') url='https://www.virtualbox.org/' @@ -37,7 +37,8 @@ source=("http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver 'vboxweb.conf' 'do_dkms' 'dkms.conf' - '013-Makefile.patch') + '013-Makefile.patch' + '015-linux-5-3.patch') noextract=("VirtualBoxSDK-${pkgver}-${_build}.zip") sha256sums=('60659c5096252e768cf1eaeb646e7cdf5547ae832b1f8c52e59b4e8799e6b584' '995310edbc813808c638d96946a6f508099e0b261ee77628c53fd0c924e0f00e' @@ -50,7 +51,8 @@ sha256sums=('60659c5096252e768cf1eaeb646e7cdf5547ae832b1f8c52e59b4e8799e6b584' '12dbba3b59991f2b68cddeeeda20236aeff63e11b7e2d1b08d9d6a82225f6651' 'cc1c0500ab07bc13563d99037f776bf64bdc90bb521e31e2e0b04e42ea5bb36a' 'e9df0fff15184d0a90abe17707bdbe1931582433bbc14ded4fb3b0252653c801' - '268e794de9d66a2751006b2ca3810fc6a05da4af2ffa8b58c56c94b292f1f424') + '268e794de9d66a2751006b2ca3810fc6a05da4af2ffa8b58c56c94b292f1f424' + '37593d09bcde15a056b93d56ad47877a9bbac140474da2c66648871a0537998a') prepare() { mkdir -p "${pkgname}-${pkgver}" @@ -79,6 +81,7 @@ package() { printf '%s\n' " -> Fixing DKMS build..." cd "${pkgdir}/${_installdir}" patch -Np1 -i "${srcdir}/013-Makefile.patch" + patch -Np1 -i "${srcdir}/015-linux-5-3.patch" # hardened build: mark binaries suid root, and make sure the # directory is only writable by the user |