1
0
forked from pool/virtualbox

Accepting request 906361 from Virtualization

OBS-URL: https://build.opensuse.org/request/show/906361
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virtualbox?expand=0&rev=219
This commit is contained in:
Dominique Leuenberger 2021-07-17 21:36:24 +00:00 committed by Git OBS Bridge
commit 9e1215bf4a
4 changed files with 163 additions and 13 deletions

View File

@ -0,0 +1,23 @@
Index: VirtualBox-6.1.22/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
===================================================================
--- VirtualBox-6.1.22.orig/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
+++ VirtualBox-6.1.22/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
@@ -32,10 +32,17 @@
%define STACK_PADDING 0eeeeeeeeeeeeeeeeh
;; Workaround for linux 4.6 fast/slow syscall stack depth difference.
+;; Update: This got worse with linux 5.13 and CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT.
+;; The x86 arch_exit_to_user_mode_prepare code limits the offset to 255,
+;; while the generic limit is 1023. See bugref:10064 for details.
%ifdef VMM_R0_SWITCH_STACK
%define STACK_FUZZ_SIZE 0
%else
- %define STACK_FUZZ_SIZE 128
+ %ifdef RT_OS_LINUX
+ %define STACK_FUZZ_SIZE 384
+ %else
+ %define STACK_FUZZ_SIZE 128
+ %endif
%endif

50
fixes_for_5.14.patch Normal file
View File

@ -0,0 +1,50 @@
Index: VirtualBox-6.1.22/src/VBox/Additions/linux/sharedfolders/regops.c
===================================================================
--- VirtualBox-6.1.22.orig/src/VBox/Additions/linux/sharedfolders/regops.c
+++ VirtualBox-6.1.22/src/VBox/Additions/linux/sharedfolders/regops.c
@@ -2126,7 +2126,11 @@ static int vbsf_iter_lock_pages(struct i
int rc = 0;
Assert(iov_iter_count(iter) + pStash->cb > 0);
+#if RTLNX_VER_MAX(5, 14,0)
if (!(iter->type & ITER_KVEC)) {
+#else
+ if (iov_iter_type(iter) != ITER_KVEC) {
+#endif
/*
* Do we have a stashed page?
*/
@@ -2373,7 +2377,11 @@ static size_t vbsf_iter_max_span_of_page
{
size_t cPages;
# if RTLNX_VER_MIN(3,16,0)
+# if RTLNX_VER_MAX(5, 14, 0)
if (iter_is_iovec(iter) || (iter->type & ITER_KVEC)) {
+#else
+ if (iter_is_iovec(iter) || (iter_is_iovec(iter) == ITER_KVEC)) {
+#endif
#endif
const struct iovec *pCurIov = iter->iov;
size_t cLeft = iter->nr_segs;
@@ -2436,7 +2444,11 @@ static size_t vbsf_iter_max_span_of_page
} else {
/* Won't bother with accurate counts for the next two types, just make
some rough estimates (does pipes have segments?): */
+#if RTLNX_VER_MAX(5, 14,0)
size_t cSegs = iter->type & ITER_BVEC ? RT_MAX(1, iter->nr_segs) : 1;
+#else
+ size_t cSegs = (iov_iter_type(iter) == ITER_BVEC) ? RT_MAX(1, iter->nr_segs) : 1;
+#endif
cPages = (iov_iter_count(iter) + (PAGE_SIZE * 2 - 2) * cSegs) >> PAGE_SHIFT;
}
# endif
@@ -3793,7 +3805,9 @@ struct address_space_operations vbsf_reg
#endif
#if RTLNX_VER_MIN(2,6,24)
.write_begin = vbsf_write_begin,
+#if RTLNX_VER_MAX(5, 14, 0)
.write_end = simple_write_end,
+#endif
#elif RTLNX_VER_MIN(2,5,45)
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write,

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jul 15 00:31:08 UTC 2021 - Larry Finger <Larry.Finger@gmail.com>
- Add file "fix_random_stack_failure.patch" to fix CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT
problem with kernel 5.13 as shown in boo#118105.
-------------------------------------------------------------------
Wed Jul 14 04:03:16 UTC 2021 - Larry Finger <Larry.Finger@gmail.com>
- Add file "fixes_for_5.14.patch" to fix builds on kernel 5.14.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 17 15:59:52 UTC 2021 - Larry Finger <Larry.Finger@gmail.com> Mon May 17 15:59:52 UTC 2021 - Larry Finger <Larry.Finger@gmail.com>

View File

@ -1,5 +1,5 @@
# #
# spec file for package virtualbox%{?dash}%{?name_suffix} # spec file
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
@ -186,8 +186,10 @@ Patch137: handle_gsoap_208103.patch
# Fix for struct file_operations backport in 15.3 # Fix for struct file_operations backport in 15.3
Patch139: fixes_for_leap15.3.patch Patch139: fixes_for_leap15.3.patch
Patch141: vb-6.1.16-modal-dialog-parent.patch Patch141: vb-6.1.16-modal-dialog-parent.patch
# Fixes for kernel 5.13 # Fixes for kernel 5.14
# Patch142: fixes_for_5.13.patch Patch142: fixes_for_5.14.patch
# Fix for CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT
Patch143: fix_random_stack_failure.patch
Patch999: virtualbox-fix-ui-background-color.patch Patch999: virtualbox-fix-ui-background-color.patch
# #
@ -337,8 +339,15 @@ the terms of the GNU Public License (GPL).
##########################################
##########################################
%package qt %package qt
Summary: Qt GUI part for %{name} Summary: Qt GUI part for %{name}
Group: System/Emulators/PC Group: System/Emulators/PC
@ -380,8 +389,15 @@ This package contains the code for the GUI used to control VMs.
#########################################
#########################################
%package websrv %package websrv
Summary: WebService GUI part for %{name} Summary: WebService GUI part for %{name}
Group: System/Emulators/PC Group: System/Emulators/PC
@ -417,8 +433,15 @@ The VirtualBox web server is used to control headless VMs using a browser.
#########################################
#########################################
%package guest-x11 %package guest-x11
Summary: VirtualBox X11 drivers for mouse and video Summary: VirtualBox X11 drivers for mouse and video
Group: System/X11/Servers/XF86_4 Group: System/X11/Servers/XF86_4
@ -456,8 +479,15 @@ This package contains X11 guest utilities and X11 guest mouse and video drivers
###########################################
###########################################
%package guest-tools %package guest-tools
Summary: VirtualBox guest tools Summary: VirtualBox guest tools
Group: System/Emulators/PC Group: System/Emulators/PC
@ -500,8 +530,15 @@ VirtualBox guest addition tools.
###########################################
###########################################
%package -n python3-%{name} %package -n python3-%{name}
Summary: Python bindings for %{name} Summary: Python bindings for %{name}
Group: Development/Libraries/Python Group: Development/Libraries/Python
@ -544,8 +581,15 @@ Python XPCOM bindings to %{name}. Used e.g. by vboxgtk package.
###########################################
###########################################
%package devel %package devel
Summary: Devel files for %{name} Summary: Devel files for %{name}
Group: Development/Libraries/Other Group: Development/Libraries/Other
@ -583,8 +627,15 @@ Development file for %{name}
###########################################
###########################################
%package host-source %package host-source
Summary: Source files for %{name} host kernel modules Summary: Source files for %{name} host kernel modules
Group: Development/Sources Group: Development/Sources
@ -624,8 +675,15 @@ sudo /sbin/vboxguestconfig
###########################################
###########################################
%package guest-desktop-icons %package guest-desktop-icons
Summary: Icons for guest desktop files Summary: Icons for guest desktop files
Group: System/Emulators/PC Group: System/Emulators/PC
@ -661,8 +719,15 @@ This package contains icons for guest desktop files that were created on the des
###########################################
###########################################
%package vnc %package vnc
Summary: VNC desktop sharing Summary: VNC desktop sharing
Group: System/Emulators/PC Group: System/Emulators/PC
@ -734,7 +799,8 @@ This package contains the kernel-modules that VirtualBox uses to create or run v
%patch139 -p1 %patch139 -p1
%endif %endif
%patch141 -p1 %patch141 -p1
#%patch142 -p1 %patch142 -p1
%patch143 -p1
# make VB UI background colors look sane again # make VB UI background colors look sane again
%patch999 -p1 %patch999 -p1