1
0
forked from pool/virtualbox

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
This commit is contained in:
Larry Finger 2019-10-07 18:39:56 +00:00 committed by Git OBS Bridge
parent 6f89660efe
commit 7f4e49c8f4
2 changed files with 16 additions and 12 deletions

View File

@ -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();

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 7 14:58:25 UTC 2019 - Larry Finger <Larry.Finger@gmail.com>
- 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 <Larry.Finger@gmail.com>