[CRIU] [PATCHv3 02/23] x86/parasite-head: add 32-bit parasite entry

Dmitry Safonov dsafonov at virtuozzo.com
Fri Dec 9 10:19:28 PST 2016


To drop the second parasite blob, create another entry in 64-bit
parasite.
Didn't remove parasite-head-compat.S - it we gonna support native 32-bit
buids, we gonna need it.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 compel/arch/x86/plugins/std/parasite-head.S | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/compel/arch/x86/plugins/std/parasite-head.S b/compel/arch/x86/plugins/std/parasite-head.S
index 9622af1ee4b0..2757828cf1bd 100644
--- a/compel/arch/x86/plugins/std/parasite-head.S
+++ b/compel/arch/x86/plugins/std/parasite-head.S
@@ -6,6 +6,16 @@
 # error 64-bit parasite should compile with CONFIG_X86_64
 #endif
 
+#ifdef CONFIG_COMPAT
+.code32
+ENTRY(__export_parasite_head_start_compat)
+	/* A long jump to 64-bit parasite. */
+	jmp $__USER_CS,$__export_parasite_head_start
+	int	$0x03
+END(__export_parasite_head_start_compat)
+.code64
+#endif
+
 ENTRY(__export_parasite_head_start)
 	subq	$16, %rsp
 	andq	$~15, %rsp
@@ -15,7 +25,8 @@ ENTRY(__export_parasite_head_start)
 	leaq	__export_parasite_args(%rip), %rsi
 	call	parasite_service
 	int	$0x03
-	.align 8
-__export_parasite_cmd:
-	.long 0
 END(__export_parasite_head_start)
+
+.align 8
+GLOBAL(__export_parasite_cmd)
+	.long 0
-- 
2.10.2



More information about the CRIU mailing list