Commit b7c4ca51 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

vdso: do not try to fill symtable for compat tasks in parasite

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.

travis-ci: success for Rectify 32-bit compatible C/R on x86
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 3755e414
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment