[CRIU] [PATCH 05/11] vdso/restorer: Simplify vdso/vvar order checking
Dmitry Safonov
dsafonov at virtuozzo.com
Thu Jun 15 19:36:09 MSK 2017
Ordering check for vvar/vdso blobs was introduced with
the commit b00bdb2dbc31 ("vdso: x86 -- Test VMAs order in vdso_proxify")
Let's simplify it to more readable version.
As above we've compared that vvar/vdso's blob size from dumpee matches
sizes of rt-vvar/rt-vdso, kill that xor here.
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
criu/pie/parasite-vdso.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c
index 4442a1179ed6..4d77a86d7f7a 100644
--- a/criu/pie/parasite-vdso.c
+++ b/criu/pie/parasite-vdso.c
@@ -171,7 +171,7 @@ int vdso_proxify(struct vdso_symtable *sym_rt, unsigned long vdso_rt_parked_at,
long delta_rt = sym_rt->vvar_start - sym_rt->vdso_start;
long delta_this = vma_vvar->start - vma_vdso->start;
- remap_rt = (delta_rt ^ delta_this) < 0 ? false : true;
+ remap_rt = (delta_rt == delta_this);
}
} else
remap_rt = true;
--
2.12.2
More information about the CRIU
mailing list