[CRIU] [PATCH 08/11] rt-vdso: Be verbose if !blobs_matches()
Dmitry Safonov
dima at arista.com
Wed May 22 21:18:22 MSK 2019
(00.251007) pie: 4: vdso: Runtime vdso mismatches dumpee, generate proxy
And I want to know why :)
Signed-off-by: Dmitry Safonov <dima at arista.com>
---
criu/pie/parasite-vdso.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c
index 90e20f767c33..00bc2bffa29e 100644
--- a/criu/pie/parasite-vdso.c
+++ b/criu/pie/parasite-vdso.c
@@ -95,23 +95,44 @@ static int __vdso_fill_symtable(uintptr_t mem, size_t size,
static bool blobs_matches(VmaEntry *vdso_img, VmaEntry *vvar_img,
struct vdso_symtable *sym_img, struct vdso_symtable *sym_rt)
{
+ unsigned long vdso_size = vma_entry_len(vdso_img);
+ unsigned long rt_vdso_size = sym_rt->vdso_size;
size_t i;
- if (vma_entry_len(vdso_img) != sym_rt->vdso_size)
+ if (vdso_size != rt_vdso_size) {
+ pr_info("size differs: %lx != %lx (rt)\n",
+ vdso_size, rt_vdso_size);
return false;
+ }
for (i = 0; i < ARRAY_SIZE(sym_img->symbols); i++) {
- if (sym_img->symbols[i].offset != sym_rt->symbols[i].offset)
+ unsigned long sym_offset = sym_img->symbols[i].offset;
+ unsigned long rt_sym_offset = sym_rt->symbols[i].offset;
+ char *sym_name = sym_img->symbols[i].name;
+
+ if (sym_offset != rt_sym_offset) {
+ pr_info("[%zu]`%s` offset differs: %lx != %lx (rt)\n",
+ i, sym_name, sym_offset, rt_sym_offset);
return false;
+ }
}
if (vvar_img && sym_rt->vvar_size != VVAR_BAD_SIZE) {
bool vdso_firstly = (vvar_img->start > vdso_img->start);
+ unsigned long vvar_size = vma_entry_len(vvar_img);
+ unsigned long rt_vvar_size = sym_rt->vvar_size;
- if (sym_rt->vvar_size != vma_entry_len(vvar_img))
+ if (vvar_size != rt_vvar_size) {
+ pr_info("vvar size differs: %lx != %lx (rt)\n",
+ vdso_size, rt_vdso_size);
return false;
+ }
- return (vdso_firstly == sym_rt->vdso_before_vvar);
+ if (vdso_firstly != sym_rt->vdso_before_vvar) {
+ pr_info("[%s] pair has different order\n",
+ vdso_firstly ? "vdso/vvar" : "vvar/vdso");
+ return false;
+ }
}
return true;
--
2.21.0
More information about the CRIU
mailing list