[CRIU] [PATCH 2/5] vdso: make vDSO symbol names architecture-specific
Alexander Kartashov
alekskartashov at parallels.com
Tue Mar 18 10:14:12 PDT 2014
This patch moves the enum VDSO_SYMBOL_* and macros VDSO_SYMBOL_*_NAME
to the x86 specific header since different architectures export
different symbols from their vDSOs.
Signed-off-by: Alexander Kartashov <alekskartashov at parallels.com>
Cc: Cyrill Gorcunov <gorcunov at openvz.org>
---
arch/arm/include/asm/vdso.h | 2 ++
arch/x86/include/asm/vdso.h | 20 ++++++++++++++++++++
include/vdso.h | 17 -----------------
3 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/arch/arm/include/asm/vdso.h b/arch/arm/include/asm/vdso.h
index 56d8007..0f4626f 100644
--- a/arch/arm/include/asm/vdso.h
+++ b/arch/arm/include/asm/vdso.h
@@ -9,6 +9,8 @@ struct vdso_symtable;
struct parasite_ctl;
struct vm_area_list;
+#define VDSO_SYMBOL_MAX 1
+
extern int vdso_redirect_calls(void *base_to, void *base_from, struct vdso_symtable *to, struct vdso_symtable *from);
extern int vdso_fill_symtable(char *mem, size_t size,struct vdso_symtable *t);
extern int vdso_remap(char *who, unsigned long from, unsigned long to, size_t size);
diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h
index 56d8007..a9173ea 100644
--- a/arch/x86/include/asm/vdso.h
+++ b/arch/x86/include/asm/vdso.h
@@ -5,6 +5,26 @@
#include "protobuf/vma.pb-c.h"
+
+/*
+ * This is a minimal amount of symbols
+ * we should support at the moment.
+ */
+enum {
+ VDSO_SYMBOL_GETTIMEOFDAY,
+ VDSO_SYMBOL_GETCPU,
+ VDSO_SYMBOL_CLOCK_GETTIME,
+ VDSO_SYMBOL_TIME,
+
+ VDSO_SYMBOL_MAX
+};
+
+#define VDSO_SYMBOL_GETTIMEOFDAY_NAME "__vdso_gettimeofday"
+#define VDSO_SYMBOL_GETCPU_NAME "__vdso_getcpu"
+#define VDSO_SYMBOL_CLOCK_GETTIME_NAME "__vdso_clock_gettime"
+#define VDSO_SYMBOL_TIME_NAME "__vdso_time"
+
+
struct vdso_symtable;
struct parasite_ctl;
struct vm_area_list;
diff --git a/include/vdso.h b/include/vdso.h
index 3f2f01f..0aa1337 100644
--- a/include/vdso.h
+++ b/include/vdso.h
@@ -9,23 +9,6 @@
#define VDSO_PROT (PROT_READ | PROT_EXEC)
-/*
- * This is a minimal amount of symbols
- * we should support at the moment.
- */
-enum {
- VDSO_SYMBOL_GETTIMEOFDAY,
- VDSO_SYMBOL_GETCPU,
- VDSO_SYMBOL_CLOCK_GETTIME,
- VDSO_SYMBOL_TIME,
-
- VDSO_SYMBOL_MAX
-};
-
-#define VDSO_SYMBOL_GETTIMEOFDAY_NAME "__vdso_gettimeofday"
-#define VDSO_SYMBOL_GETCPU_NAME "__vdso_getcpu"
-#define VDSO_SYMBOL_CLOCK_GETTIME_NAME "__vdso_clock_gettime"
-#define VDSO_SYMBOL_TIME_NAME "__vdso_time"
#define VDSO_BAD_ADDR (-1ul)
#define VDSO_BAD_PFN (-1ull)
--
1.7.9.5
More information about the CRIU
mailing list