LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] powerpc/64: Avoid link stack corruption in kexec_wait()
@ 2021-08-23  7:52 Christophe Leroy
  2021-08-31  6:17 ` Daniel Axtens
  0 siblings, 1 reply; 4+ messages in thread
From: Christophe Leroy @ 2021-08-23  7:52 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linux-kernel, linuxppc-dev

Use bcl 20,31,+4 instead of bl in order to preserve link stack.

See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption
in __get_datapage()") for details.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/kernel/misc_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 4b761a18a74d..613509907166 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -255,7 +255,7 @@ _GLOBAL(scom970_write)
  * Physical (hardware) cpu id should be in r3.
  */
 _GLOBAL(kexec_wait)
-	bl	1f
+	bcl	20,31,1f
 1:	mflr	r5
 	addi	r5,r5,kexec_flag-1b
 
-- 
2.25.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-31 12:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23  7:52 [PATCH] powerpc/64: Avoid link stack corruption in kexec_wait() Christophe Leroy
2021-08-31  6:17 ` Daniel Axtens
2021-08-31  8:54   ` Christophe Leroy
2021-08-31 12:43     ` Daniel Axtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).