1
0
forked from pool/virtualbox

Accepting request 1069741 from home:lwfinger:branches:Virtualization

- Added file "fixea_for_kernel_6.3.patch" to handle API change.
- File "fixes_for_gcc13.patch" updated for additional changes in GCC 13 boo#1207468

OBS-URL: https://build.opensuse.org/request/show/1069741
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=682
This commit is contained in:
Larry Finger 2023-03-06 21:06:16 +00:00 committed by Git OBS Bridge
parent 7ebcafdc8c
commit d3dbcc4265
3 changed files with 62 additions and 2 deletions

View File

@ -0,0 +1,40 @@
Patch to fix VirtualBox builds on kernel 6.3.0 and newer
Beginning with 6.3, a user is no loncer to write directly info the
vm_flags member of struct vm_area_struct. It is now necessary to use
the vm_flags_set() wrapper. Two locations in memobj-r0drv-linux.c are
affected.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Index: VirtualBox-7.0.6/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
===================================================================
--- VirtualBox-7.0.6.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
+++ VirtualBox-7.0.6/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
@@ -1401,8 +1401,12 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
while (rc-- > 0)
{
flush_dcache_page(pMemLnx->apPages[rc]);
- papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
- }
+# if RTLNX_VER_MIN(6, 3, 0)
+ vm_flags_set(papVMAs[rc], VM_DONTCOPY | VM_LOCKED);
+#else
+ papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
+#endif
+ }
LNX_MM_UP_READ(pTask->mm);
@@ -1873,7 +1877,11 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(
/* Thes flags help making 100% sure some bad stuff wont happen (swap, core, ++).
* See remap_pfn_range() in mm/memory.c */
#if RTLNX_VER_MIN(3,7,0)
+# if RTLNX_VER_MIN(6, 3, 0)
+ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP);
+#else
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+#endif
#else
vma->vm_flags |= VM_RESERVED;
#endif

View File

@ -1,7 +1,8 @@
-------------------------------------------------------------------
Sun Mar 5 20:24:32 UTC 2023 - Larry Finger <Larry.Finger@gmail.com>
Mon Mar 6 20:57:14 UTC 2023 - Larry Finger <Larry.Finger@gmail.com>
- GCC 13 changed and the fixes patch needed revising. boo#1207468
- Added file "fixea_for_kernel_6.3.patch" to handle API change.
- File "fixes_for_gcc13.patch" updated for additional changes in GCC 13 boo#1207468
-------------------------------------------------------------------
Wed Mar 1 16:13:24 UTC 2023 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -160,6 +160,8 @@ Patch34: fix_kmp_build.patch
Patch35: fixes_for_leap15.5.patch
# Fix for GCC13
Patch36: fixes_for_gcc13.patch
# Fix for kernel 6.3
Patch37: fixes_for_kernel_6.3.patch
#
# Common BuildRequires for both virtualbox and virtualbox-kmp
BuildRequires: %{kernel_module_package_buildreqs}
@ -316,6 +318,8 @@ the terms of the GNU Public License (GPL).
@ -354,6 +358,8 @@ This package contains the code for the GUI used to control VMs.
@ -386,6 +392,8 @@ The VirtualBox web server is used to control headless VMs using a browser.
@ -429,6 +437,8 @@ VirtualBox guest addition tools.
@ -468,6 +478,8 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
@ -502,6 +514,8 @@ Development file for %{name}
@ -553,6 +567,8 @@ sudo %{_sbindir}/vboxguestconfig
@ -585,6 +601,8 @@ This package contains icons for guest desktop files that were created on the des
@ -656,6 +674,7 @@ This package contains the kernel-modules that VirtualBox uses to create or run v
%if 0%{gcc_version} >= 13
%patch36 -p1
%endif
%patch37 -p1
### Documents for virtualbox main package ###
%if %{main_package}