2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00
Cyrill Gorcunov fe7b8aeb8c vdso: x86 -- Add handling of vvar zones
New kernel 3.16 will have old vDSO zone splitted into the two vmas:
one for vdso code itself and second that named vvar for data been
referenced from vdso code.

Because I can't do 'dump' and 'restore' parts of the code separately
(otherwise test would fail) the commit is pretty big one and hard to
read so here is detailed explanation what's going on.

 1) When start dumping we detect vvar zone by reading /proc/pid/smap
    and looking up for "[vvar]" token. Note the vvar zone is mapped
    by a kernel with PF/IO flags so we should not fail here.

    Also it's assumed that at least for now kernel won't be changed
    much and [vvar] zone always follows the [vdso] zone, otherwise
    criu will print error.

 2) In previous commits we disabled dumping vvar area contents so
    the restorer code never try to read vvar data but still we need
    to map vvar zone thus vma entry remains in image.

 3) As with previous vdso format we might have 2 cases

    a) Dump and restore is happening on same kernel
    b) Dump and restore are done on different kernels

    To detect which case we have we parse vdso data from image
    and find symbols offsets then compare their values with runtime
    symbols provided us by a kernel. If they match and (!!!) the
    size of vvar zone is the same -- we simply remap both zones
    from runtime kernel into the positions dumpee had at checkpoint
    time. This is that named "inplace" remap (a).

    If this happens the vdso_proxify() routine drops VMA_AREA_REGULAR
    from vvar area provided by a caller code and restorer won't try
    to handle this vma. It looks somehow strange and probably should
    be reworked but for now I left it as is to minimize the patch.

    In case of (b) we need to generate a proxy. We do that in same
    way as we were before just include vvar zone into proxy and save
    vvar proxy address inside vdso mark injected into vdso area. Thus
    on subsequent checkpoint we can detect proxy vvar zone and rip
    it off the list of vmas to handle.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-06-24 22:48:43 +04:00
2014-06-24 22:44:42 +04:00
2014-05-14 17:34:41 +04:00
2012-03-25 23:31:20 +04:00
2014-05-27 23:48:06 +04:00
2013-04-01 12:29:06 +04:00
2014-01-14 09:33:19 +04:00
2012-07-30 13:52:37 +04:00
2013-04-30 20:17:55 +04:00
2014-05-27 23:48:06 +04:00
2014-04-22 12:51:15 +04:00
2014-02-04 20:54:25 +04:00
2014-06-18 13:34:36 +04:00
2014-05-27 23:48:06 +04:00
2014-06-20 16:35:51 +04:00
2014-06-20 16:35:52 +04:00
2013-11-06 18:18:12 +04:00
2013-12-12 10:00:45 +04:00
2013-12-12 09:58:50 +04:00
2013-12-12 09:58:50 +04:00
2013-12-12 10:03:07 +04:00
2013-12-12 10:03:07 +04:00
2013-11-06 18:18:12 +04:00
2014-04-23 02:51:11 +04:00
2014-02-04 14:03:10 +04:00
2013-11-29 15:36:07 +04:00
2013-04-05 08:23:17 +04:00
2013-11-06 18:18:12 +04:00

criu
====

An utility to checkpoint/restore tasks. Using this tool, you can
freeze a running application (or part of it) and checkpoint it to
a hard drive as a collection of files. You can then use the files
to restore and run the application from the point it was frozen
at. The distinctive feature of the CRIU project is that it is
mainly implemented in user space.

The project home is at http://criu.org

Pages worth starting with are
* Kernel configuration, compilation, etc: http://criu.org/Installation
* A simple example of usage: http://criu.org/Simple_loop
* More sophisticated example with graphical app: http://criu.org/VNC
Description
No description provided
Readme 81 MiB
Languages
C 86%
Python 6.1%
Java 2.6%
Shell 2.6%
Makefile 2%
Other 0.7%