Thread (41 messages) 41 messages, 3 authors, 2022-06-30
STALE1436d
Revisions (3)
  1. v4 [diff vs current]
  2. v5 [diff vs current]
  3. v5 current

[PATCH v6 28/33] arm64: sleep: Properly set frame pointer before call

From: Chen Zhongjin <hidden>
Date: 2022-06-23 01:54:07
Also in: linux-arch, linux-arm-kernel, linux-kbuild, live-patching, lkml
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

In __cpu_suspend_enter, the FP and LR are properly saved on the stack to
form a stack frame, but the frame pointer is not set afterwards.

Have the frame pointer point to the new frame.

Signed-off-by: Julien Thierry <redacted>
Signed-off-by: Chen Zhongjin <redacted>
---
 arch/arm64/kernel/sleep.S | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/kernel/sleep.S b/arch/arm64/kernel/sleep.S
index 799ec01b0649..7fd276f3c532 100644
--- a/arch/arm64/kernel/sleep.S
+++ b/arch/arm64/kernel/sleep.S
@@ -92,6 +92,7 @@ SYM_FUNC_START(__cpu_suspend_enter)
 	str	x0, [x1]
 	add	x0, x0, #SLEEP_STACK_DATA_SYSTEM_REGS
 	stp	x29, lr, [sp, #-16]!
+	mov	x29, sp
 	bl	cpu_do_suspend
 	ldp	x29, lr, [sp], #16
 	mov	x0, #1
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help