1
0
forked from pool/virtualbox
virtualbox/fix_random_stack_failure.patch
Larry Finger 4122f0cd24 Accepting request 906360 from home:lwfinger:branches:Virtualization
- Add file "fix_random_stack_failure.patch" to fix CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT
  problem with kernel 5.13 as shown in boo#118105.

OBS-URL: https://build.opensuse.org/request/show/906360
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=610
2021-07-15 01:13:33 +00:00

24 lines
853 B
Diff

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