- 24 May, 2013 5 commits
-
-
Cyrill Gorcunov authored
Runtime vdso need to be kept in some safe place when all self-vmas are unmapped. So we reserve space for it in restorer blob area and then remap it into. It's quite important to do a remap here rather than data copy because otherwise pfn of vdso disappear and in future we won't be able to detect vdso are on dumping stage. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
During criu startup we need to fill symbol table of own run-time vdso provided by the kernel. We will need this data for vdso proxy. Because this functions are not used in restorer code, we move them out of PIE (since PIE code must remain as small as possible). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's quite minimal at moment and provides only two helpers - vdso_redirect_calls, to patch vdso area redirectling calls to some new place. - vdso_fill_symtable, to parse vma area as vdso library and fill symbols table with offsets and names. Because these routines will be needed in both regular criu code and restorer code -- we compile it in pie format. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need to extend it to support vdso-pie code which used in both -- pie code and plain executable code. I know it's ugly and I must invent some more elegant way, but need some solution at moment to be able to compile existing code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Vladimir Davydov authored
With the patch zdtm will check not only periodic timers, but also one-shot ones. Set one-shot timer to expire in a very long interval (INT_MAX in the test), and check its remaining value after checkpoint/restore. The following relationship must hold: initial_value - remaining_value = time_passed Signed-off-by:
Vladimir Davydov <vdavydov@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 23 May, 2013 11 commits
-
-
Andrey Vagin authored
An archive is saved in unsuccessful case. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's optional. It's going to be used in jenkins. time bash -x test//zdtm.sh static/maps04 real 0m40.220s user 0m0.096s sys 0m12.822s time bash -x test//zdtm.sh -t static/maps04 real 0m9.904s user 0m0.074s sys 0m1.630s Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Here are a few bugs which hide each other. * memcmp(&newset, &oldset, sizeof(newset) returns 0 is masks are equal. * sigprocmask return sigset_t and it contains extra bits for the future, so we need to initialize all this bits otherwise they will contain random data. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need them in pie code soon. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
There will be a couple of more builtin helpers needed in pie code soon. Thus to unify approach do - rename asm/memcpy_64.h to asm/string.h - introduce include/asm-generic/string.h file where all helpers are implemented if optimized variant is not yet provided Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
RHEL6 is shipped with libc 2.12 where no prlimit helper provided (which was pushed into libc itself since 2.13). So we implement own proxy for convenience. Note, if libc does support prlimit itself we simply don't use any proxy and call it directly. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need it for own prlimit proxy call. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This constants are system wide, so move them to mem.h header for reuse sake. [ xemul: It was kerndat.h in the patch ] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 21 May, 2013 6 commits
-
-
Andrey Vagin authored
==22653== Syscall param read(buf) points to unaddressable byte(s) ==22653== at 0x50480B0: __read_nocancel (in /usr/lib64/libpthread-2.17.so) ==22653== by 0x40CF7C: parasite_dump_pages_seized (mem.c:244) ==22653== by 0x41681D: cr_dump_tasks (cr-dump.c:1533) ==22653== by 0x40448C: main (crtools.c:309) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
On ubuntu this don't compile if no check. Signed-off-by:
Pavel Tikhomirov <snorcht@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
When a kernel didn't show vma flags, we set MAP_GROWSDOWN for stack vmas, but it's not reliable. E.g. thread stacks are mapped without MAP_GROWSDOWN. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The size of vma can be changed after parsing flags. For example we need to add a guard page for vma with MAP_GROWSDOWN. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The link must be read after restore on original file descriptor since namespace id do change between c/r sessions. https://bugzilla.openvz.org/show_bug.cgi?id=2599Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 May, 2013 4 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's being reported that some systems (as Ubuntu 13.04) already have struct tcp_repair_opt definition in their system headers. | sk-tcp.c:25:8: error: redefinition of struct tcp_repair_opt | sk-tcp.c:31:2: error: redeclaration of enumerator TCP_NO_QUEUE So add a facility for compile time testing for reported entities to be present on a system. For this we generate include/config.h where all tested entries will lay and source code need to include it only in places where really needed. Reported-by:
Vasily Averin <vvs@parallels.com> Acked-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Some features need to be tested on the system where the project is compiled, so instead of drowning into autoconf hell lets try to handle all this with make facility. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
page-server creates a listen socket and only then goes into the background, so we can be sure, that page-server is ready for work after detaching. v2: call daemon() in a proper place and reuse the option -d Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 18 May, 2013 3 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Just open /proc/self/ns/net and check if it remains the same on restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Based on work done by Cyrill Corcunov (many thanks for that). In this commit we implement c/r for files which have opened /proc/$pid/ns/$ids entries. The idea is rather simple one Checkpoint ========== - Check if the file name is the one of known to be ns ref - If match then write protobuf entry Restore ======= - Read all ns entries from the image - When criu tries to open one we lookup over process tree to figure out which PID should be used in path and then just open it Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 May, 2013 11 commits
-
-
Cyrill Gorcunov authored
[ xemul: rename pb.cflag -> pb.ns_cflag ] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This will be needed for fast parsing of procfs ns references. [ xemul: Add user_ns_desc here ] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
To be able to dump procfs namespace entries we will need to analyze the link name first and then figure out if the file referred indeed a procfs entry or it's plain regular file. This means we read link early, and to escape double reading of same link, once we read it we remember it in fd_parms structure which we pass to dump_one_reg_file. Still the dump_one_reg_file is not solely used from inside of dump_one_file, but from a number of other places (fifo, special files) where fd_parms is filled only partially and fill_fd_params is not even called. Thus dump_one_reg_file must be ready for such scenario and read the link name by own if the caller has not provided one. To achieve all this we do - extend fd_parms structure to have a reference on a new fd_link structure, thus if caller already read the link name it might assign the reference and call for dump_one_reg_file - tune up dump_one_reg_file to fill own copy of fd_link structure if the caller has not provied one [ xemul: Added const to fill_fdlink arg ] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
struct fd_parms is reused for two calls, so don't forget to initialize it before dump_one_reg_file call. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Stupid misprint :( Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
All this sits under config option, so we shouldn't try to read/write them in this case. What to do if they are in different on/off state on src/dst kernels is an open question :\ Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The soft-dirty API has changed slightly -- now the bit in question _is_ in pagemap file (not pagemap2) but to see it we have to reset soft-dirty for anyone first. Teach the kerndat soft-dirty checker this fact. The actual pagemap reading code already knows select pagemap/pagemap2 file itself. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The option -p is used for testing page server Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Libo Chen authored
without this patch, fd will not be freeed * Changelog from v1: * just free fd, no crt.ids Signed-off-by:
Libo Chen <libo.chen@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-