[CRIU] Dealing with VDSO remap
Laurent Dufour
ldufour at linux.vnet.ibm.com
Mon Mar 9 06:32:09 PDT 2015
On 06/03/2015 15:47, Cyrill Gorcunov wrote:
> On Fri, Mar 06, 2015 at 03:15:56PM +0100, Laurent Dufour wrote:
>> Hi,
>>
>> I'm porting CRIU to the PopwerPC architecture, and among other issues,
>> I'm facing a major one with the VDSO remapping at restart time.
>>
>> On PowerPC, as on ARM64, the kernel keeps track of the VDSO base address
>> because it is using it to jump back to a sigreturn trampoline at the end
>> of a signal processing (see handle_rt_signal64 in
>> arch/powerpc/kernel/signal_64.c, and for ARM64, setup_return in
>> arch/arm64/kernel/signal.c).
>>
>> When remapping the VDSO at restart time, the kernel keep the reference
>> to the previous VDSO mapping, the one inheriting from the criu, so
>> handling signal after the restart leads to unpredictable results, most
>> of the time a SIGSEGV is raised.
>
> Hi Laurent. As far as I remember this indeed a problem on arm64, and
> there should be some CONFIG_ option for that (but I have a little in
> my memory what exactly workaround was). Thus the real fix is somehow
> tune the kernel itself but looks like nothing was implemented in this
> area yet :/ So any help would be appreciated.
Hi Cyrill,
I didn't find any CONFIG_ option relative to that. I should have missed it.
Anyway, I agree that some stuff is needed in the kernel to deal with
that. The big step will now to find the best way to achieve that. I'll
try to be helpful there... even if that mm part of the kernel looks
tricky to me ;)
>
>> I didn't find a smart way to update the kernel reference to the vdso
>> mapping once the VDSO is remapped, so no way to work around that today.
>>
>> Furthermore, since this is the same picture on ARM 64, I'm wondering how
>> it could work on this architecture. Am I missing a major thing here ?
>>
>> If not, is there a plan in the CRIU project to to deal with that, other
>> than by hacking the kernel to update its reference at restart time ?
>
More information about the CRIU
mailing list