[CRIU] checkpoint/restore of an 32bit application on arm64

andi andi.platschek at gmail.com
Thu Oct 11 16:37:42 MSK 2018


Hi,

On 10/9/18 6:15 PM, Dmitry Safonov wrote:
> On Tue, 9 Oct 2018 at 14:53, Cyrill Gorcunov <gorcunov at gmail.com> wrote:
>> On Tue, Oct 09, 2018 at 01:36:30PM +0200, andi wrote:
>>> Hi all,
>>>
>>> I was wondering if anyone has ever looked into the possibility of supporting CONFIG_COMPAT for arm?
>> Hi Andi. None I know of is currently working on compat mode for arm.
>>
>>> P.S.: In case someone is wondering at what point the restore fails:
>>>
>>> (00.055449) pie: 376: Error (criu/pie/restorer.c:1482): sys_prctl(PR_SET_MM, PR_SET_MM_MAP) failed with -14
>>> (00.055471) pie: 376: Error (criu/pie/restorer.c:1700): Restorer fail 376
>>> (00.055515) Error (criu/cr-restore.c:2266): Restoring FAILED.
>> Seems like it is EFAULT, so some value has been able to copy from userspace.
>> Hard to tell what exactly is happening since someone with good arm knowledge
>> is needed here.
It took me a while find out what the exact problem was. On the kernel side, a copy_from_user()
of the auxiliary vector in sys_prctl() failed because the pointer is passed in the prctl_mm_map() from
32bit userspace into 64bit kernelspace but the copy_from_user() did not have a compat_ptr() for that
case ...

So this seems to work now, in combination with a few more quick-fixes "criu restore" ran through
without errors -- but the restored task crashed immediately ...

I am a but unsure on how to proceed -- are there any debugging techniques you use in
such cases?

> Just for the reference another thread about it a year ago:
> https://lists.openvz.org/pipermail/criu/2017-December/040025.html
>
thanks for the link!

best!
andi


More information about the CRIU mailing list