]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 May 2022 16:41:31 +0000 (18:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 May 2022 16:41:31 +0000 (18:41 +0200)
added patches:
x86-xen-fix-booting-32-bit-pv-guest.patch
x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch

queue-5.4/series
queue-5.4/x86-xen-fix-booting-32-bit-pv-guest.patch [new file with mode: 0644]
queue-5.4/x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch [new file with mode: 0644]

index 2974dfd83edd147434c614e31764ada2924b1646..14f422859a87fbf577f6c189d81d28a2460548dc 100644 (file)
@@ -62,5 +62,7 @@ net-stmmac-disable-split-header-sph-for-intel-platforms.patch
 firmware_loader-use-kernel-credentials-when-reading-firmware.patch
 arm-dts-imx7-use-audio_mclk_post_div-instead-audio_mclk_root_clk.patch
 reinstate-some-of-swiotlb-rework-fix-info-leak-with-dma_from_device.patch
+x86-xen-fix-booting-32-bit-pv-guest.patch
+x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch
 i2c-mt7621-fix-missing-clk_disable_unprepare-on-erro.patch
 afs-fix-afs_getattr-to-refetch-file-status-if-callba.patch
diff --git a/queue-5.4/x86-xen-fix-booting-32-bit-pv-guest.patch b/queue-5.4/x86-xen-fix-booting-32-bit-pv-guest.patch
new file mode 100644 (file)
index 0000000..00fb6c3
--- /dev/null
@@ -0,0 +1,34 @@
+From d6f34f4c6b4a962eb7a86c923fea206f866a40be Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Thu, 9 Apr 2020 09:00:01 +0200
+Subject: x86/xen: fix booting 32-bit pv guest
+
+From: Juergen Gross <jgross@suse.com>
+
+commit d6f34f4c6b4a962eb7a86c923fea206f866a40be upstream.
+
+Commit 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable")
+introduced a regression for booting 32 bit Xen PV guests: the address
+of the initial stack needs to be a virtual one.
+
+Fixes: 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable")
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Link: https://lore.kernel.org/r/20200409070001.16675-1-jgross@suse.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/xen/xen-head.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/xen/xen-head.S
++++ b/arch/x86/xen/xen-head.S
+@@ -38,7 +38,7 @@ ENTRY(startup_xen)
+ #ifdef CONFIG_X86_64
+       mov initial_stack(%rip), %rsp
+ #else
+-      mov pa(initial_stack), %esp
++      mov initial_stack, %esp
+ #endif
+ #ifdef CONFIG_X86_64
diff --git a/queue-5.4/x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch b/queue-5.4/x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch
new file mode 100644 (file)
index 0000000..cd71df4
--- /dev/null
@@ -0,0 +1,42 @@
+From 9af9dcf11bda3e2c0e24c1acaacb8685ad974e93 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Thu, 24 Jun 2021 11:41:00 +0200
+Subject: x86/xen: Mark cpu_bringup_and_idle() as dead_end_function
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit 9af9dcf11bda3e2c0e24c1acaacb8685ad974e93 upstream.
+
+The asm_cpu_bringup_and_idle() function is required to push the return
+value on the stack in order to make ORC happy, but the only reason
+objtool doesn't complain is because of a happy accident.
+
+The thing is that asm_cpu_bringup_and_idle() doesn't return, so
+validate_branch() never terminates and falls through to the next
+function, which in the normal case is the hypercall_page. And that, as
+it happens, is 4095 NOPs and a RET.
+
+Make asm_cpu_bringup_and_idle() terminate on it's own, by making the
+function it calls as a dead-end. This way we no longer rely on what
+code happens to come after.
+
+Fixes: c3881eb58d56 ("x86/xen: Make the secondary CPU idle tasks reliable")
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Miroslav Benes <mbenes@suse.cz>
+Link: https://lore.kernel.org/r/20210624095147.693801717@infradead.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/objtool/check.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/objtool/check.c
++++ b/tools/objtool/check.c
+@@ -144,6 +144,7 @@ static bool __dead_end_function(struct o
+               "usercopy_abort",
+               "machine_real_restart",
+               "rewind_stack_do_exit",
++              "cpu_bringup_and_idle",
+       };
+       if (!func)