[CRIU] [RFC 4/5] vdso: Move vdso signature to proper place

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


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/signatures.h | 1 +
 include/vdso.h       | 9 ++++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/signatures.h b/include/signatures.h
index 5e182ec..d5a86a6 100644
--- a/include/signatures.h
+++ b/include/signatures.h
@@ -10,5 +10,6 @@
  */
 
 #define CRIU_SIG_RESTORER	_AC(0x7274737275697263, ULL)	/* criurstr */
+#define CRIU_SIG_VDSO		_AC(0x6f73647675697263, ULL)	/* criuvdso */
 
 #endif /* __CR_SIGNATURES_H__ */
diff --git a/include/vdso.h b/include/vdso.h
index 3f93b3a..d5283bf 100644
--- a/include/vdso.h
+++ b/include/vdso.h
@@ -6,6 +6,8 @@
 #include "asm/vdso.h"
 #include "asm/int.h"
 
+#include "signatures.h"
+
 #define VDSO_PROT		(PROT_READ | PROT_EXEC)
 
 /*
@@ -87,14 +89,11 @@ struct vdso_mark {
 	unsigned long		proxy_addr;
 };
 
-/* Magic number (criuvdso) */
-#define VDSO_MARK_SIGNATURE	(0x6f73647675697263ULL)
-
 static inline bool is_vdso_mark(void *addr)
 {
 	struct vdso_mark *m = addr;
 
-	return m->signature == VDSO_MARK_SIGNATURE &&
+	return m->signature == CRIU_SIG_VDSO &&
 		m->proxy_addr != VDSO_BAD_ADDR;
 }
 
@@ -102,7 +101,7 @@ static inline void vdso_put_mark(void *where, unsigned long proxy_addr)
 {
 	struct vdso_mark *m = where;
 
-	m->signature = VDSO_MARK_SIGNATURE;
+	m->signature = CRIU_SIG_VDSO;
 	m->proxy_addr = proxy_addr;
 }
 
-- 
1.8.1.4



More information about the CRIU mailing list