[CRIU] [PATCH] arm: fixed the ARM version of the routine __cr_restore_rt

Alexander Kartashov alekskartashov at parallels.com
Thu Jul 11 13:27:48 EDT 2013


This patch fixes a stack corruption caused by the routine
since it pushes the registers R4, R5, R6, and R7
onto the stack that results in a restorer crash
while restoring a zombie (https://bugzilla.openvz.org/show_bug.cgi?id=2663)

Reported-by: Andrey Vagin <avagin at openvz.org>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
---
 arch/arm/syscall-common.S |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/syscall-common.S b/arch/arm/syscall-common.S
index bad9dc5..09f8a27 100644
--- a/arch/arm/syscall-common.S
+++ b/arch/arm/syscall-common.S
@@ -22,5 +22,7 @@ syscall_common:
 
 
 ENTRY(__cr_restore_rt)
-	b	sys_rt_sigreturn
+	adr	%r7, .nr_sys_rt_sigreturn
+	ldr	%r7, [%r7]
+	svc	#0
 END(__cr_restore_rt)
-- 
1.7.10.4



More information about the CRIU mailing list