[CRIU] [PATCH 17/20] vdso: do not try to fill symtable for compat tasks in parasite
Dmitry Safonov
dsafonov at virtuozzo.com
Fri Dec 2 11:53:41 PST 2016
Parasite is 64-bit and if we want to check if vma is vDSO,
we need to link parasite blob with util-vdso-elf32.
But luckely, there is no need to do that: mremap() for
compat vDSO works only after v4.8 kernel:
commit b059a453b1cf ("x86/vdso: Add mremap hook to vm_special_mapping").
And in those kernels "[vdso]" is always reported in /proc/.../maps
rightly - so no need to check that.
Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
criu/vdso.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/criu/vdso.c b/criu/vdso.c
index af4431f40e61..d7066b189128 100644
--- a/criu/vdso.c
+++ b/criu/vdso.c
@@ -104,12 +104,8 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
*/
args->start = vma->e->start;
args->len = vma_area_len(vma);
- /*
- * XXX: For compatible tasks, vDSO pfn is different from
- * our native vdso_pfn. Check vma explicitly.
- */
if (!compel_mode_native(ctl))
- args->try_fill_symtable = true;
+ args->try_fill_symtable = false;
else
args->try_fill_symtable = (fd < 0) ? true : false;
args->is_vdso = false;
@@ -172,7 +168,12 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
vma->e->status |= VMA_AREA_VDSO;
}
} else {
- if (unlikely(vma_area_is(vma, VMA_AREA_VDSO))) {
+ /*
+ * Compat vDSO mremap support is only after v4.8,
+ * [vdso] vma name always stays after mremap.
+ */
+ if (unlikely(vma_area_is(vma, VMA_AREA_VDSO)) &&
+ compel_mode_native(ctl)) {
pr_debug("Drop mishinted vDSO status at %lx\n",
(long)vma->e->start);
vma->e->status &= ~VMA_AREA_VDSO;
--
2.10.2
More information about the CRIU
mailing list