[CRIU] [PATCH 7/8] vdso: Add compatible property to vdso_maps

Dmitry Safonov dima at arista.com
Fri Jul 26 01:01:13 MSK 2019


We need to differ compatible (ia32) vdso maps from x86_64.
That dictates ABI on vdso code.
According to that, the decision to (not) use gettimeofday() from vdso in
64-bit restorer.

Signed-off-by: Dmitry Safonov <dima at arista.com>
---
 criu/include/util-vdso.h | 1 +
 criu/vdso.c              | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/criu/include/util-vdso.h b/criu/include/util-vdso.h
index c74360c876f8..33b7411deeb1 100644
--- a/criu/include/util-vdso.h
+++ b/criu/include/util-vdso.h
@@ -38,6 +38,7 @@ struct vdso_maps {
 	unsigned long		vdso_start;
 	unsigned long		vvar_start;
 	struct vdso_symtable	sym;
+	bool			compatible;
 };
 
 #define VDSO_SYMBOL_INIT	{ .offset = VDSO_BAD_ADDR, }
diff --git a/criu/vdso.c b/criu/vdso.c
index 257cbcd929cf..50b8b8dba52c 100644
--- a/criu/vdso.c
+++ b/criu/vdso.c
@@ -597,7 +597,8 @@ int vdso_init_restore(void)
 
 	vdso_maps.sym = kdat.vdso_sym;
 #ifdef CONFIG_COMPAT
-	vdso_maps_compat.sym = kdat.vdso_sym_compat;
+	vdso_maps_compat.sym		= kdat.vdso_sym_compat;
+	vdso_maps_compat.compatible	= true;
 #endif
 
 	return 0;
@@ -621,7 +622,8 @@ int kerndat_vdso_fill_symtable(void)
 		pr_err("Failed to fill compat vdso symtable\n");
 		return -1;
 	}
-	kdat.vdso_sym_compat = vdso_maps_compat.sym;
+	vdso_maps_compat.compatible	= true;
+	kdat.vdso_sym_compat		= vdso_maps_compat.sym;
 #endif
 
 	return 0;
-- 
2.22.0



More information about the CRIU mailing list