[CRIU] Dealing with VDSO remap

Christopher Covington cov at codeaurora.org
Wed Mar 18 06:28:11 PDT 2015


Hi Laurent,

On 03/18/2015 04:29 AM, Laurent Dufour wrote:

> On my ppc64 system, the attached test case leads to a process's core
> dump when it is returning from the signal handler once the vDSO has been
> remapped.

Thanks, this is helpful.

> I'd appreciate if you could give it a try on an ARM64 box/guest. I tried
> to set up a ARM64 guest on my side, but I failed to make it run :(

In case it's any help, here are steps that that work for me.

URL=http://releases.linaro.org/latest/members/arm/openembedded/aarch64
ROOTFS=linaro-image-minimal-genericarmv8-20150222-741.rootfs.tar.gz
P9ROOT="rootfstype=9p rootflags=trans=virtio,version=9p2000.u"
wget --continue ${URL}/Image
wget --continue ${URL}/${ROOTFS}
mkdir -p sysroot
tar -C sysroot -xf ${ROOTFS}
$dir/bin/x86_64-linux-gnu/qemu-system-aarch64 \
  -nographic \
  -monitor none \
  -M virt \
  -cpu cortex-a57 \
  -m 4G \
  -serial stdio \
  -kernel Image \
  -append "${P9ROOT} console=ttyAMA0" \
  -fsdev local,id=root,security_model=none,path=`pwd`/sysroot \
  -device virtio-9p-device,fsdev=root,mount_tag=/dev/root

My recollection is that older versions of QEMU needed an --enable-virtfs or
similar flag passed to configure to get VirtIO-9P support. You'll definitely
need --target-list=aarch64-softmmu passed to QEMU's configure if you're
building QEMU from source. Hopefully recent distribution packages include all
these features.

Virtme may also help on this front:

https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git/tree/README.md

> My though[t] is that the process should core dump on ARM64 since the
> sigreturn stack frame will point to its old base address.

It does.

> I'm currently working on a kernel patch to handle the vDSO remapping,
> which could solve part of this issue (there is still a window which
> can't be addressed).

I'd be happy to review, test, and if necessary port or extend the patch if
you'd like to copy me when you send it out.

Chris

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


More information about the CRIU mailing list