From 7f4e49c8f4eeb49d07801e5a2466c662f5ccac8d18c02ad4fe1e1844336d18be Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 7 Oct 2019 18:39:56 +0000 Subject: [PATCH] Accepting request 735938 from home:lwfinger:branches:Virtualization - Rework "fixes_for_5.4.patch" to unconditionally remove set_pages_nx() and set_pages_x() as these changes are backported to Kernel:HEAD:KMP. OBS-URL: https://build.opensuse.org/request/show/735938 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=508 --- fixes_for_5.4.patch | 22 ++++++++++------------ virtualbox.changes | 6 ++++++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/fixes_for_5.4.patch b/fixes_for_5.4.patch index d02a488..812a7b0 100644 --- a/fixes_for_5.4.patch +++ b/fixes_for_5.4.patch @@ -34,25 +34,23 @@ Index: VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c =================================================================== --- VirtualBox-6.0.12.orig/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c +++ VirtualBox-6.0.12/src/VBox/Runtime/r0drv/linux/alloc-r0drv-linux.c -@@ -444,8 +444,10 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHY +@@ -443,9 +443,6 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHY + } SetPageReserved(&paPages[iPage]); - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) - MY_SET_PAGES_EXEC(&paPages[iPage], 1); - #endif -+#endif +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ +- MY_SET_PAGES_EXEC(&paPages[iPage], 1); +-#endif } *pPhys = page_to_phys(paPages); pvRet = phys_to_virt(page_to_phys(paPages)); -@@ -492,8 +494,10 @@ RTR0DECL(void) RTMemContFree(void *pv, s +@@ -491,9 +488,6 @@ RTR0DECL(void) RTMemContFree(void *pv, s + for (iPage = 0; iPage < cPages; iPage++) { ClearPageReserved(&paPages[iPage]); - #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) - MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); - #endif -+#endif +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ +- MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); +-#endif } __free_pages(paPages, cOrder); IPRT_LINUX_RESTORE_EFL_AC(); diff --git a/virtualbox.changes b/virtualbox.changes index ca4b1e3..7193dd0 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 7 14:58:25 UTC 2019 - Larry Finger + +- Rework "fixes_for_5.4.patch" to unconditionally remove set_pages_nx() and + set_pages_x() as these changes are backported to Kernel:HEAD:KMP. + ------------------------------------------------------------------- Wed Oct 2 19:08:58 UTC 2019 - Larry Finger