[CRIU] [PATCH] x86: sigframe -- Don't forget to copy ss

Cyrill Gorcunov gorcunov at openvz.org
Wed Jul 29 15:10:05 PDT 2015


Make sure we don't pass any trash value here, because
the kernel does copy it explicitly. We allocate the
memory for frame as zero filled but stack segment
is special and zero is not acceptable (we've had
a discussion on LKML if we need a special handling
for zero ss but end up that new kernels need new CRIU
version, upon which all agreed). Finally in
commit 296bbf7e3 I managed to hit exactly
this problem :)

Reported-by: Andrey Wagin <avagin at gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 arch/x86/crtools.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/crtools.c b/arch/x86/crtools.c
index caef8514558f..48890133a4ff 100644
--- a/arch/x86/crtools.c
+++ b/arch/x86/crtools.c
@@ -486,10 +486,7 @@ int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r)
 	CPREG2(eflags, flags);
 
 	CPREG1(cs);
-
-#ifdef CONFIG_X86_32
 	CPREG1(ss);
-#endif
 
 #ifdef CONFIG_X86_32
 	CPREG1(gs);
-- 
2.4.3



More information about the CRIU mailing list