[CRIU] [PATCH 3/5] zdtm/vdso/ia32: Ignore vsyscall page appear

Dmitry Safonov dima at arista.com
Thu May 2 04:34:43 MSK 2019


Not a major bummer.
On the other side, it's also becomes less important as it seems that
distribution switches from LEGACY_VSYSCALL_EMULATE to
LEGACY_VSYSCALL_NONE (by security reasons).
Might be not worth fixing at all in the end.

Signed-off-by: Dmitry Safonov <dima at arista.com>
---
 test/zdtm/static/vdso-proxy.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/test/zdtm/static/vdso-proxy.c b/test/zdtm/static/vdso-proxy.c
index 66d6741f4b2d..ecb71e892116 100644
--- a/test/zdtm/static/vdso-proxy.c
+++ b/test/zdtm/static/vdso-proxy.c
@@ -8,7 +8,7 @@ const char *test_doc	= "Compare mappings before/after C/R for vdso/vvar presence
 const char *test_author	= "Dmitry Safonov <dsafonov at virtuozzo.com>";
 
 #define BUILD_BUG_ON(condition)	((void)sizeof(char[1 - 2*!!(condition)]))
-#define VDSO_BAD_ADDR		(-1ul)
+#define VSYSCALL_START 0xffffffffff600000ULL
 /*
  * Use constant MAX_VMAS - to minimize the risk of allocating a new
  * mapping or changing the size of existent VMA with realloc()
@@ -55,6 +55,18 @@ static int parse_maps(struct vm_area *vmas)
 
 		v->start = strtoull(buf, &end, 16);
 		v->end = strtoull(end + 1, NULL, 16);
+
+#if defined(__i386__)
+		/*
+		 * XXX: ia32 is being restored from x86_64 and leaves
+		 * emulated vsyscall "mapping". Hopefully, will be done
+		 * per-process, ignore for now.
+		 */
+		if (v->start == VSYSCALL_START) {
+			i--;
+			continue;
+		}
+#endif
 		v->is_vvar_or_vdso |= strstr(buf, "[vdso]") != NULL;
 		v->is_vvar_or_vdso |= strstr(buf, "[vvar]") != NULL;
 		test_msg("[NOTE]\tVMA: [%#" PRIx64 ", %#" PRIx64 "]\n",
-- 
2.21.0



More information about the CRIU mailing list