From: Greg Kroah-Hartman Date: Mon, 23 May 2022 16:41:31 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.9.316~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5cbf8ff14704e9f9feb5b3396742b02a836f4b3;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: x86-xen-fix-booting-32-bit-pv-guest.patch x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index 2974dfd83ed..14f422859a8 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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 index 00000000000..00fb6c3a830 --- /dev/null +++ b/queue-5.4/x86-xen-fix-booting-32-bit-pv-guest.patch @@ -0,0 +1,34 @@ +From d6f34f4c6b4a962eb7a86c923fea206f866a40be Mon Sep 17 00:00:00 2001 +From: Juergen Gross +Date: Thu, 9 Apr 2020 09:00:01 +0200 +Subject: x86/xen: fix booting 32-bit pv guest + +From: Juergen Gross + +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 +Reviewed-by: Boris Ostrovsky +Link: https://lore.kernel.org/r/20200409070001.16675-1-jgross@suse.com +Signed-off-by: Juergen Gross +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..cd71df444ae --- /dev/null +++ b/queue-5.4/x86-xen-mark-cpu_bringup_and_idle-as-dead_end_function.patch @@ -0,0 +1,42 @@ +From 9af9dcf11bda3e2c0e24c1acaacb8685ad974e93 Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Thu, 24 Jun 2021 11:41:00 +0200 +Subject: x86/xen: Mark cpu_bringup_and_idle() as dead_end_function + +From: Peter Zijlstra + +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) +Reviewed-by: Juergen Gross +Reviewed-by: Miroslav Benes +Link: https://lore.kernel.org/r/20210624095147.693801717@infradead.org +Signed-off-by: Greg Kroah-Hartman +--- + 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)