[CRIU] [PATCH] Add VDSO time function support for x86 32-bit kernel

Andy Lutomirski luto at amacapital.net
Fri Dec 14 13:44:37 EST 2012


On Fri, Dec 14, 2012 at 10:35 AM, H. Peter Anvin <hpa at zytor.com> wrote:
> On 12/14/2012 12:34 AM, Pavel Emelyanov wrote:
>> On 12/14/2012 06:20 AM, Andy Lutomirski wrote:
>>> On Thu, Dec 13, 2012 at 6:18 PM, H. Peter Anvin <hpa at zytor.com> wrote:
>>>> Wouldn't the vdso get mapped already and could be mremap()'d.  If we
>>> really need more control I'd almost push for a device/filesystem node
>>> that could be mmapped the usual way.
>>>
>>> Hmm.  That may work, but it'll still break ABI.  I'm not sure that
>>> criu is stable enough yet that we should care.  Criu people?
>>
>> It's not yet, but we'd still appreciate the criu-friendly vdso redesign.
>>
>>> (In brief summary: how annoying would it be if the vdso was no longer
>>> just a bunch of constant bytes that lived somewhere?)
>>
>> It depends on what vdso is going to be. In the perfect case it should
>> a) be mremap-able to any address (or be at fixed address _forever_, but
>>    I assume this is not feasible);
>> b) have entry points at fixed (or somehow movable) places.
>>
>> I admit that I didn't understand your question properly, if I did,
>> please correct me.
>>
>
> mremap() should work.  At the same time, the code itself is not going to
> have any stability guarantees between kernel versions -- it obviously
> cannot.

We could guarantee that the symbols in the vdso resolve to particular
offsets within the vdso.  (Yes, this is ugly.)

Does criu support checkpointing with one version of a shared library
and restoring with another?  If there are no textrels (or whatever the
relocation type that actually modifies text as opposed to just the plt
or got) then, in principle, it should be doable.  Otherwise some
kernel help will be needed to checkpoint reliably on one kernel and
restore somewhere else.

(This isn't a regression -- it's already broken.)

>
> Incidentally, the MAYWRITE bit which is there to allow breakpoints is
> obviously problematic for the vvar page.  We could mark the vvar page
> differently, meaning more vmas, or we could decide it just doesn't
> matter and that if you mprotect() the vvar page and write to it you get
> exactly what you asked for...

I have no strong preference here.

--Andy


More information about the CRIU mailing list