mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 22:50:49 +00:00
virtualbox: 5.1.22 -> 5.1.24
This commit is contained in:
parent
26cf940da8
commit
ee6edb8af5
|
@ -18,10 +18,10 @@ with stdenv.lib;
|
|||
let
|
||||
python = python2;
|
||||
buildType = "release";
|
||||
extpack = "244e6f450cba64e0b025711050db3c43e6ce77e12cd80bcd08796315a90c8aaf";
|
||||
extpackRev = "115126";
|
||||
main = "fcc918000b8c5ece553541ec10a9182410a742b7266257c76dda895dcd389899";
|
||||
version = "5.1.22";
|
||||
extpack = "1952ikz4xsjgdd0pzdx1riwaingyhkxp0ind31yzqc4d0hp8l6b5";
|
||||
extpackRev = "117012";
|
||||
main = "0q5vjsih4ndn1b0s9l1ppxng6dljld5bin5nqfrhvgr2ldlv2bgf";
|
||||
version = "5.1.24";
|
||||
|
||||
# See https://github.com/NixOS/nixpkgs/issues/672 for details
|
||||
extensionPack = requireFile rec {
|
||||
|
@ -88,7 +88,7 @@ in stdenv.mkDerivation {
|
|||
'';
|
||||
|
||||
patches = optional enableHardening ./hardened.patch
|
||||
++ [ ./qtx11extras.patch ./linux-4.12.patch ];
|
||||
++ [ ./qtx11extras.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
|
||||
|
|
|
@ -19,7 +19,7 @@ stdenv.mkDerivation {
|
|||
|
||||
src = fetchurl {
|
||||
url = "http://download.virtualbox.org/virtualbox/${version}/VBoxGuestAdditions_${version}.iso";
|
||||
sha256 = "54df14f234b6aa484b94939ab0f435b5dd859417612b65a399ecc34a62060380";
|
||||
sha256 = "0hxxv2707fb6x34m5cmjhj73sxwgmy2dgir7mbbdh9wivw07b9q1";
|
||||
};
|
||||
|
||||
KERN_DIR = "${kernel.dev}/lib/modules/*/build";
|
||||
|
@ -62,9 +62,6 @@ stdenv.mkDerivation {
|
|||
for i in *
|
||||
do
|
||||
cd $i
|
||||
# Files within the guest additions ISO are using DOS line endings
|
||||
sed -re '/^(@@|---|\+\+\+)/!s/$/\r/' ${../linux-4.12.patch} \
|
||||
| patch -d vboxguest -p4
|
||||
find . -type f | xargs sed 's/depmod -a/true/' -i
|
||||
make
|
||||
cd ..
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
commit 47fee9325e3b5feed0dbc4ba9e2de77c6d55e3bb
|
||||
Author: vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>
|
||||
Date: Wed May 17 09:42:23 2017 +0000
|
||||
|
||||
Runtime/r0drv: Linux 4.12 5-level page table adaptions
|
||||
|
||||
|
||||
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@66927 cfe28804-0f27-0410-a406-dd0f0b0b656f
|
||||
|
||||
diff --git a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
||||
index 28dc33f963..41ed058860 100644
|
||||
--- a/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
||||
+++ b/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
||||
@@ -902,6 +902,9 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
|
||||
union
|
||||
{
|
||||
pgd_t Global;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
+ p4d_t Four;
|
||||
+#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
|
||||
pud_t Upper;
|
||||
#endif
|
||||
@@ -917,12 +920,26 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
|
||||
u.Global = *pgd_offset(current->active_mm, ulAddr);
|
||||
if (RT_UNLIKELY(pgd_none(u.Global)))
|
||||
return NULL;
|
||||
-
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
+ u.Four = *p4d_offset(&u.Global, ulAddr);
|
||||
+ if (RT_UNLIKELY(p4d_none(u.Four)))
|
||||
+ return NULL;
|
||||
+ if (p4d_large(u.Four))
|
||||
+ {
|
||||
+ pPage = p4d_page(u.Four);
|
||||
+ AssertReturn(pPage, NULL);
|
||||
+ pfn = page_to_pfn(pPage); /* doing the safe way... */
|
||||
+ AssertCompile(P4D_SHIFT - PAGE_SHIFT < 31);
|
||||
+ pfn += (ulAddr >> PAGE_SHIFT) & ((UINT32_C(1) << (P4D_SHIFT - PAGE_SHIFT)) - 1);
|
||||
+ return pfn_to_page(pfn);
|
||||
+ }
|
||||
+ u.Upper = *pud_offset(&u.Four, ulAddr);
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
|
||||
u.Upper = *pud_offset(&u.Global, ulAddr);
|
||||
+#endif
|
||||
if (RT_UNLIKELY(pud_none(u.Upper)))
|
||||
return NULL;
|
||||
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
|
||||
if (pud_large(u.Upper))
|
||||
{
|
||||
pPage = pud_page(u.Upper);
|
||||
@@ -931,8 +948,8 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
|
||||
pfn += (ulAddr >> PAGE_SHIFT) & ((UINT32_C(1) << (PUD_SHIFT - PAGE_SHIFT)) - 1);
|
||||
return pfn_to_page(pfn);
|
||||
}
|
||||
-# endif
|
||||
-
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
|
||||
u.Middle = *pmd_offset(&u.Upper, ulAddr);
|
||||
#else /* < 2.6.11 */
|
||||
u.Middle = *pmd_offset(&u.Global, ulAddr);
|
||||
diff --git a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||
index 5afdee9e71..20aab0817f 100644
|
||||
--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
|
||||
@@ -159,6 +159,11 @@
|
||||
# include <asm/tlbflush.h>
|
||||
#endif
|
||||
|
||||
+/* for set_pages_x() */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
+# include <asm/set_memory.h>
|
||||
+#endif
|
||||
+
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
|
||||
# include <asm/smap.h>
|
||||
#else
|
Loading…
Reference in a new issue