When it is run, cscope complains about files it cannot find:
cscope: cannot find file test/zdtm/live/streaming/socket-tcp.c
cscope: cannot find file test/zdtm/live/streaming/socket-tcp6.c
cscope: cannot find file test/zdtm/live/static/socket-tcpbuf-local.c
cscope: cannot find file test/zdtm/live/static/mntns_shared_bind02.c
cscope: cannot find file test/zdtm/live/static/socket_listen6.c
cscope: cannot find file test/zdtm/live/static/socket-tcp6.c
cscope: cannot find file test/zdtm/live/static/socket-tcpbuf6.c
cscope: cannot find file test/zdtm/live/static/mntns_link_ghost.c
cscope: cannot find file test/zdtm/live/transition/fork2.c
These files are relative symbolic links, and since cscope is run at the top
directory, the ../* links are not valid.
This patch removes the symbolic links from the list of scanned files. This
is not removing any tags since the real file are still scanned.
In addition, the test directory is not taken in account.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
I use Makefile.local to add my own rules for submitting a build
to Coverity. As those rules contain login credentials, they should
be kept private. Including Makefile.local (if present) seems to be
the best way to achieve that.
Also, add Makefile.local to .gitignore to make sure it never gets
commited into repo.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This patch initiates the ppc64le architecture support in CRIU.
Note that ppc64 (Big Endian) architecture is not yet supported since there
are still several issues to address with this architecture. However, in the
long term, the two architectures should be addressed using the almost the
same code, so sharing the ppc64 directory.
Major ppc64 issues:
Loader is not involved when the parasite code is loaded. So no relocation
is done for the parasite code. As a consequence r2 must be set manually
when entering the parasite code, and GOT is not filled.
Furthermore, the r2 fixup code at the services's global address which has
not been fixed by the loader should not be run. Branching at local address,
as the assembly code does is jumping over it.
On the long term, relocation should be done when loading the parasite code.
We are introducing 2 trampolines for the 2 entry points of the restorer
blob. These entry points are dealing with r2. These ppc64 specific entry
points are overwritting the standard one in sigreturn_restore() from
cr-restore.c. Instead of using #ifdef, we may introduce a per arch wrapper
here.
CRIU needs 2 kernel patches to be run powerpc which are not yet upstream:
- Tracking the vDSO remapping
- Enabling the kcmp system call on powerpc
Feature not yet supported:
- Altivec registers C/R
- VSX registers C/R
- TM support
- all lot of things I missed..
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We will need it for x86-32 as well, not on ARM only.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
# Build criu in a docker container
$ make direct-build
# Execute tests in a docker container
$ make direct-test
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Here it is. The major new thing I think is the CRIT tool
that will be the main one to mainupulate images and will
eventually replace the "criu show" action.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Currently we run into lots of race conditions when building in
multithreded mode.
Reported-by: Mr Jenkins
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
install-crit uses scripts/crit-setup.py install --prefix=$(DESTDIR)
to act the way the install target expects it too.
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
/tmp/ccq2xzf8.s: Assembler messages:
/tmp/ccq2xzf8.s:5748: Error: thumb conditional instruction should be in IT block -- strexeq r1,r2,[r3]'
Cc: Alexander Kartashov <alekskartashov@parallels.com>
Cc: Ruslan Kuprieiv <kupruser@gmail.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
So, according to the recently accepted plan we have 1.4.
Biggest achievement here is that we've finally started with
user namespaces, fixed CRIU to work smoothly with the p.haul
project and optimized images and /proc files IO.
And a bunch of bugs, of course.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It's been a long delay since 1.2, but we did it :)
The greatest new acheivement is finally support for Docker
and LXC on CRIU side. Some work is still to be don on the
other, but here in CRIU everything is ready.
Another notable things are AArch64 support and, of course,
a lot of bugfixes.
Further plan is to make releases be not so rare :)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This modifies the x86 VDSO code to work on AArch64.
Signed-off-by: Christopher Covington <cov@codeaurora.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Building criu with "make criu" on a clean tree was not working, failing on:
make[1]: *** No rule to make target `arch/x86/vdso-pie.o'. Stop.
make: *** [arch/x86/vdso-pie.o] Error 2
git bisect traced the regression to commit c473461d24 (vdso: Make it arch
specific) which apparently dropped the rule to build $(ARCH_DIR)/vdso-pie.o
using the pie rule. Restore the dependency for "make criu" to work again from
a clean tree.
Tested:
$ git clean -fdx
$ make criu
Fixes: c473461d24
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Next acheivement -- external bind mounts and tasks-to-cgroups
bindings. Plus many bugfixes in memory restore and mounpoints
dump, many thanks to Google guys for reports and patches!
We have quite a few things left to make workable LXC and Docker
support, hopefully the next tag will be the 1.3 one :)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We use config.h in vDSO handling code so arch
targets should depend on it.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Currently we build vDSO handling code for all archs provided
in the source code having some "common" parts inside pie/vdso.c,
pie/vdso-stub.c, vdso-stub.c and vdso.c. This were more or
less well but in new linux kernels (starting from 3.16 presumably)
the vDSO has been significantly reworked so every architecture
must have own vDSO handling engine (just like the kernel does).
So in this patch we move vDSO code to arch specific and because
aarch64 actually doesn't implement proxification yet due to
kernel restrictions -- we drops it out. When there will be
kernel support we bring it back in proper arch/aarch64
implementation.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We will need it to figure out if architecture
needs vDSO handling code to be built. Note
currently only x86 is exporting vDSO simply
because ARM support is not yet ready.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Without the added dependencies, "make criu" will fail when trying to
build arch/x86/crtools.d because it can not find include/config.h, the
extra dependencies force the "config" rule to be processed before the
dependencies of "criu" are evaluated.
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test/Makefile knows better how to execute tests.
For example it allows to execute tests simultaneously
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
We have made big step towards C/R of LXC containers -- made support
for nested mount namespaces and addressed the re-attach issue. Also
we have AArch64 support merged.
Some work is still to be done, but it's good time to show what we
have so far, thus -- the 1.3-rc1.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This patch splits the file arch/x86/vdso-pie.c into machine-dependent
and machine-independent parts by moving the routines vdso_fill_symtable(),
vdso_proxify(), and vdso_remap() to the file pie/vdso.c.
The ARM version of the routines is moved to the source pie/vdso-stub.c
to provide the vDSO proxy stub implementation for architectures
that don't provide the vDSO.
Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This patch splits the file arch/x86/vdso.c into machine-independent
and machine-dependent parts by moving the routine vdso_init()
from the file vdso.c. The routine seems to be suitable for all
architectures supporting the vDSO.
The ARM version of the routine is moved to the source vdso-stub.c
that is supposed to be the vDSO proxy stub implementation for
architectures that don't provide the vDSO. The build scripts are
adjusted as well to enable selection between the full-fledged
and stub vDSO proxy implementations.
Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This time we've made minimal required support for live-migration,
so that the p.haul project can work. Another big achievement is
better dump and restore performance.
Other than this -- a lot of bugfixes here and there, as usual.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
To be able to profile CRIU with gprof support we need a special flag
passed to the compiler and linker. But same time we can't build parasite
code with prof support because it'll call for mcount() service routine
for which we don't have any stub yet (and even if we had there are
other tech details involved). Thus PIE code won't be profiled.
To compile with prof support make it as
make DEBUG=1 GMON=1
The idea to run gprof then over criu sources. Once you've it
compiled with the flags mentioned above -- simply run it (test or whatever,
I've been running sh test/zdtm.st static.maps00).
Then run gprof ./criu gmon.out
Note the gmon.out file lays in directory where criu were running, thus
in case of sh test/zdtm.st static.maps00 the output file will be in test/
directory.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Otherwise the build can fail with the following message.
ln: .../libcriu.so.1: File exists
make: *** [install] Error 1
Signed-off-by: Christopher Covington <cov@codeaurora.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Thank Vladimir Davydov <vdavidov@parallels.com> for help and config.
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Acked-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The current -march settings will cause an error if the user a
conflicting flags such as -mcpu=cortex-a15. Use USERCFLAGS instead
of CFLAGS so that a default is provided but can be overridden.
Change-Id: I8ffecd6bfd7ad5794486a5d14d27bce3170898d3
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Ideally, a user could set CFLAGS on the command line to contain
compilation options and include and library paths (or maybe set
those last two with CPPFLAGS and LDFLAGS). Unfortunately, setting
CFLAGS on the command line currently short-circuits essential
logic in the makefile and breaks the build. After a first failed
attempt it appears that a monolithic overhaul or "flag day" to
fix this is a substantial undertaking, so for now just provide a
workaround in the form of a USERCFLAGS variable.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Perhaps left over from when a single types.h was being used for
multiple architectures, remove the ARM definition of
AT_VECTOR_SIZE from the x86 types.h header. Also remove the
CONFIG_ARM definition since it unused.
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The current mechanism for determining ARM architecture version
breaks down when cross-compiling. Default to ARMv7 if the user
specifies ARCH=arm. Users wishing to cross-compile for ARMv6
platforms such as the Raspberry Pi should use ARCH=armv6 as
previously required.
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
ARCH is a user-facing variable and setting it on the command line
clobbers any manipulation attempted in the makefile. Following
the example of the Linux kernel makefiles, use a SRCARCH variable
instead for the internal, potentially fixed-up, architecture name.
This fixes the following error.
make ARCH=x86_64
Makefile:69: *** "The architecture x86_64 isn't supported". Stop.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The top-level makefile defines an ARCH_DIR variable. Always use
it rather than referencing ARCH directly, since ARCH may be set
by the user on the command line and that raw input may not be
what needs to be used internally.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The makefile includes need to be moved for everything to be
defined properly when the configure tests run.
The Ubuntu 12.04 x86_64 GCC and Linaro's 13.08 and newer AArch64
GCC's have the if_packet.h kernel header, but as of 13.12,
the Linaro AArch32 GCC does not.
Change-Id: I363c43fdb81b028f99aac77e15bff9462c87af4b
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The links to the versioned libcriu.so.* included $(DESTDIR) and
$(LIBDIR) which will generate wrong links if building criu packages.
Now the links points to the correct file without any path.
For some reason criu.8 was installed with executable permission. Use
'install' with '-m 644' to make sure this does not happen.
Signed-off-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Using a soname makes it easy for applications to
detect if the ABI of libcriu.so has changed.
It still creates libcriu.so as before in lib. During
'make install' additional links are created:
libcriu.so -> libcriu.so.1.0
libcriu.so.1 -> libcriu.so.1.0
Signed-off-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
To link Open MPI against CRIU I need the header files installed.
Attached is a patch which adds the necessary Makefile rules to
install libcriu.so and the header file to compile against CRIU.
Signed-off-by: Adrian Reber <adrian@lisas.de>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The bugfix period after 1.1-rc1 seems to be over.
With this version we pin down the API to plugins and libcriu.so.
Next steps will be tied with live-migration usecase for CRIU :)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
The feedback we got helped us to improve several issues all over
the criu code. And we have some more stuff to get fixed before we
can make a good release.
That said, let's go ahead with the -rc2.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Two major changes so far -- libcriu.so (RPC wrapper) and plugins.
Both define some API and we want to check this API is good enough.
Thus we tag the -rc1 to let people try it. If things go smooth, we
will just go agead and tar the 1.1.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Libraries (plugins) is going to be used for dumping and restoring
external dependencies (e.g. dbus, systemd journal sockets, charecter
devices, etc)
A plugin can have the cr_plugin_init() and cr_plugin_fini functions for
initialization and deinialization.
criu-plugin.h contains all things, which can be used in plugins.
v2: rename lib to plugin
v3: add a default value for a plugin path.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>