[CRIU] [RFC 3/5] pie: Put magic signature at restorer head code

Cyrill Gorcunov gorcunov at openvz.org
Sun May 26 17:12:40 EDT 2013


The subsequent checkpoint will be able to detect it.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 pie/Makefile        | 1 +
 pie/restorer-head.S | 7 +++++++
 2 files changed, 8 insertions(+)
 create mode 100644 pie/restorer-head.S

diff --git a/pie/Makefile b/pie/Makefile
index e912ab4..dc10ea3 100644
--- a/pie/Makefile
+++ b/pie/Makefile
@@ -11,6 +11,7 @@ parasite-libs-e		+= $(SYSCALL-LIB)
 restorer-obj-y		+= restorer.o
 restorer-obj-e		+= $(ARCH_DIR)/restorer.o
 restorer-obj-e		+= $(ARCH_DIR)/vdso-pie.o
+restorer-asm-y		+= restorer-head.o
 restorer-libs-e		+= $(SYSCALL-LIB)
 
 cflags-y		+= -DCR_NOGLIBC -fpie  -Wa,--noexecstack -fno-stack-protector
diff --git a/pie/restorer-head.S b/pie/restorer-head.S
new file mode 100644
index 0000000..79b993b
--- /dev/null
+++ b/pie/restorer-head.S
@@ -0,0 +1,7 @@
+#include "asm/linkage.h"
+#include "signatures.h"
+
+	.section .head.text, "ax"
+ENTRY(__export_restorer_head)
+	.quad CRIU_SIG_RESTORER
+END(__export_restorer_head)
-- 
1.8.1.4



More information about the CRIU mailing list