[CRIU] Dealing with VDSO remap

Cyrill Gorcunov gorcunov at gmail.com
Mon Mar 9 06:39:58 PDT 2015


On Mon, Mar 09, 2015 at 02:32:09PM +0100, Laurent Dufour wrote:
> > 
> > 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.

I could be messing it with something else, so don't pay attention on this moment.

> 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 ;)

Look, I'm not relly knowning person in internal vdso structure for ARM/ARM64,
but if the problem is only that on start the kernel provides own _unmovable_
(ie not pie compiled code, unlike x86 where the vdso is in pie format) then
indeed some kernel tuning is need. On x86 we do the following trick

 - remember current vdso the criu has (we name it rt-vdso)
 - read dumped vdso from image file
 - if vdso in image is different in compare to rt-vdso
   - we simply move rt-vdso into some new place (remapping it)
   - map original vdso from image into original position and
     patch it so that every function in this image vdso would
     jump execution to rt-vdso. we call this process vdso proxy,
     maybe something similar needed on arm


More information about the CRIU mailing list