2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +00:00

177 Commits

Author SHA1 Message Date
Radostin Stoyanov
b42b3e2ada criu(8): Move --tcp-close under restore
The --tcp-close option was introduced with commit

2c37042821906f013634e305899cb25ff1a5a7b1
tcp: Add tcp-close option to restore connected TCP sockets in closed state

This options is applicable only for restore. Therefore, move the
documentation from 'dump' to 'restore'.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Radostin Stoyanov
e4fa84a32a criu(8): Move --log-pid under restore
The --log-pid option was introduced with commit

fc7bedc50ab4ca08b1c96764a5bd1acbc1889fa6
crtools: make to be able to split messages by pid

This option is applicable only for restore. Therefore, move the
documentation from "Common options" to "restore".

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Radostin Stoyanov
e08c7dc2bc criu(8): Fix typos
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2019-04-20 20:25:26 -07:00
Radostin Stoyanov
a7c384f6ee util: Enable hostname resolution in tcp_client
Add hostname resolution in setup_tcp_client(). This change allows a
valid hostname to be provided as value for --address option when
connecting to page server.

This change is needed for the following path which removes
setup_TCP_client_socket() from img-proxy.c. In this function the
hostname resolution was implemented using gethostbyname()

However, here we use `getaddrinfo` instead because gethostbyname() is
marked obsolescent in POSIX.1-2001 and is removed in POSIX.1-2008
specifications.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:28:01 +03:00
Cyrill Gorcunov
b44eaddb29 x86: cpu -- Require compatibility on instruction level by default
For a long time we've been demanding from cpus to be compatible
on fpu frame level, but growing list of cpu features triggers
inability for restored programs to proceed after restore due
to specific intructions execution (such as avx2). Note the
fpu frame may carry same size but not on instruction level
where SIGILL may happen after the restore.

Thus lets require instruction mode to be set and verified by default.
Still one can drop this option via command line or rpc request.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:28:00 +03:00
Cyrill Gorcunov
cdd8643d64 x86: cpu -- Add more detailed mode description
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmaill.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:28:00 +03:00
Radostin Stoyanov
221f115189 Fix typos
Most of the typos were found by codespell.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:27:58 +03:00
Adrian Reber
a853ccfbe0 Documentation: update RPC configuration file section
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:27:58 +03:00
Veronika Kabatova
5f3853e035 Add documentation for configuration files
Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:27:51 +03:00
Paweł Stradomski
e1a5d71765 Add --ps-socket option to Documentation/criu.txt
Signed-off-by: Pawel Stradomski <pstradomski@google.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-09 18:26:50 +03:00
Dmitry Safonov
cad611b360 Documentation/make: Call check before install
Let's warn about binary needed for `install` target.
Before:
[root@localhost criu]# make install
  GEN      crit.1
make[1]: *** [Makefile:49: crit.1] Error 127
make: *** [Makefile.install:32: install-man] Error 2

After:
[root@localhost criu]# make install
/bin/sh: line 1: xmlto: command not found
make[1]: *** [Makefile:32: check] Error 1
make: *** [Makefile.install:32: install-man] Error 2

Fixes: #481
Reported-by: treaki@gmail.com
Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-18 01:44:32 +03:00
Mike Rapoport
e5d7d71b1e Documentation: add --lazy-pages option to page-server description
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-17 03:27:02 +03:00
Mike Rapoport
4b5605d986 Documentation: spelling fix
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Acked-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-09-17 03:27:02 +03:00
Mike Rapoport
668ea674bd docs: start documenting lazy-pages
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-09-17 03:27:02 +03:00
Veronika Kabatova
8fcfa59b04 Add long option for verbosity changes
Only long options are supported in configuration files. "-v" is the only
short option which doesn't have a corresponding long option, therefore
users wouldn't be able to setup verbosity in configuration files without
this patch.

Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 20:01:28 +03:00
Pavel Begunkov
2c37042821 tcp: Add tcp-close option to restore connected TCP sockets in closed state
New restore option 'tcp-close' was introduced. It restores all connected
TCP sockets in TCP_CLOSE state. Here we consider tcp sockets in
TCP_ESTABLISHED, TCP_FIN_WAIT2, TCP_FIN_WAIT1, TCP_CLOSE_WAIT,
TCP_LAST_ACK, TCP_CLOSING, TCP_SYN_SENT states as connected sockets.
This is consistent with current CRIU usage of these states. Thus this
option doesn't affect sockets with original states of TCP_LISTEN and
TCP_CLOSE.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-07-18 09:34:43 +03:00
Veronika Kabatova
f17b60eff3 Extend the parser to accept negative options
Introducing negative options for true / false values. The original
getopt_long parser is kept since it is able to set flag-like values
(instead of setting these values in the switch when it's not needed).
The type of the options needed to be changed to integers for getopt_long
to accept flag-like value settings (as per getopt_long documentation,
the address of integer variable has to be passed).

Corresponding negative options are not added for deprecated options.

This patch is a preparation for the addition of configuration files
(GitHub issue #278). General idea of this feature is to have global
configuration files in /etc/criu.d/ directory and user-specific
configuration files in $HOME/.criu.d/ directory, with the possibility
of specifying a chosen file to be used (default files will be used if
none is specified, or none in case the default ones are not present,
to not break compatibility). The options in configuration files should
be possible to be overriden by the options specified on command line,
hence the negative options addition.

The whole feature of configuration files will remove the need of
specifying all the options on command line, with the possibility of
reusing a file for different use case with only overriding some of the
values specified there.

In case both types of option (negative and positive) are passed, the
later one will be applied -- this works with the philosophy of
overriding the "earlier" options from configuration files.

Changes since v1:
- Describe the --no- option prefix in the beginning of OPTIONS section in
  both man page and --help instead of mentioning it at every eligible line
  (this also fixes line length issue with --help)
- Fix the accidental removal of check_only case caused by bad rebase
- Use a macro for getopt_long struct option generating instead of additional
  defines and hardcoded lines

Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-10 04:07:00 +03:00
Dmitry Safonov
4bccd6a6bc .gitignore: update to recent changes
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14 21:03:22 +03:00
Kir Kolyshkin
c4247302f7 criu: change the way -v works
For most of the CLI tools I see, adding -v option increases their verbosity.

Currently, this is not the case for criu. Default verbosity is set it 2,
and using -v actually decreases the verbosity level to 1, so to increase
verbosity you need to use -vvv (or -v3). To me, this behavior is
quite counterintuitive.

This patch changes the way -v works (but retains -vNUM as it was). Now,
using -v increases verbosity by +1 from the default value (and e.g. -vvv
increases it by +3).

Surely, this changes user experience: for example someone who
was using -v (rather than -v1 or -v0) to silent warnings, will
now have verbosity increased. IMHO this is for the better.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-03-02 00:19:03 +03:00
Andrei Vagin
ac5cac188d crtools: close a signal descriptor after passing a preparation stage
This patch adds the --siganl-fd FD option to specify a file descriptor.
CRIU will write '\0' to this descriptor and close it after passing
a preparation stage.

It is alternative way to demonizing a criu process after a preparation
stage. It's imposiable to get exit code, if a process has daemonized.

The introduced way allows to wait a preparation stage and to get an exit
code. It can be easy used from shell and other script languages.

v3: fix a help message

v4: Here is a sequence of actions how it can be used:
     * open a pipe
     * run a service with the pipe[1] as status_fd
     * read(pipe[0]) to wait a moment when the service will be ready to
       accept connections
     * do a work which requires the service
     * wait the service process to gets its exit status to be sure that
       everything okey

travis-ci: success for crtools: close a signal descriptor after passing a preparation stage (rev6)
Cc: Mike Rapoport <mike.rapoport@gmail.com>
Cc: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-02-03 16:55:07 +03:00
Cyrill Gorcunov
f823681acc docs: criu -- Explain pre-resume stage
travis-ci: success for Add "pre-resume" stage
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-02-01 18:41:31 +03:00
Adrian Reber
d08622811d crit: added crit manpage
Based on debian's manpage from Salvatore Bonaccorso:

e708a3a Sync manpage for crit to include short explanation for new subcommands
7dd571a Fix position for optional arguments in crit's manpage
017f8d9 Add minimal manpage for the crit

travis-ci: success for crit: added crit manpage
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-12 11:34:22 +03:00
Kir Kolyshkin
3f9a0aae67 criu(8): describe --weak-sysctls
This is an addition to commit 6273a5c ("Add ability to restore with
missing sysctls on the target node").

travis-ci: success for Document --weak-syscalls
Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-12-05 23:35:15 +03:00
Kir Kolyshkin
1dc67ae8b8 criu(8): typos
A couple of typos.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-12 11:04:38 +03:00
Kir Kolyshkin
7f4907fe6f criu(8): describe --external option
This adds the description of --external option for all the supported
cases, both for dump and restore.

References: https://criu.org/CLI/opt/--external

travis-ci: success for Add/fix description of --external and --inherit-fd
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-03 18:17:15 +03:00
Kir Kolyshkin
0df3f79fc0 criu(8): fix --inherit-fd description
This patch describes the correct syntax of --inherit-fd.

travis-ci: success for Add/fix description of --external and --inherit-fd
CC: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-03 18:17:15 +03:00
Kir Kolyshkin
aa2cb64d58 criu(8): remove obsoleted options
Remove the following options (obsoleted by --external):

	--ext-unix-sk
	--veth-pair
	--ext-mount-map
	--enable-external-masters
	--enable-exteral-sharing

travis-ci: success for Add/fix description of --external and --inherit-fd
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-11-03 18:17:15 +03:00
Kir Kolyshkin
e2f6bb831a criu.8: document restore --leave-stopped
Option --leave-stopped can now be used during restore,
but this was not reflected in the man page.

[v2: fix wording]

https://github.com/xemul/criu/issues/215

travis-ci: success for criu.8: document restore --leave-stopped (rev2)
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-24 16:00:15 +03:00
Adrian Reber
64f964f071 Added --display-stats to the man page
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-24 14:59:35 +03:00
Kir Kolyshkin
ca2cee201e doc/Makefile: fix deps
The "$(SRC): $(FOOTER)" dependency listed is incorrect, as criu.txt file
is not dependent on footer.txt. Having said that, criu.8 in fact do
depend on footer.txt but that was not reflected in Makefile. Fix it.

While at it, add the custom.xsl dependency, which was also missing.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
9ca1db576b doc/Makefile: make sure CRIU_VERSION is defined
I just discovered that if I run make right from Documentation/ subdir,
CRIU_VERSION is not defined so the generated man page is lacking it.

Let's fix by conditionally including ../Makefile.versions.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-10 12:48:20 +03:00
Kir Kolyshkin
9e2ce61cac Makefile nitpicks
1. As __nmk_dir already ends with a slash, there's no need
   for an extra one.

2. No need to include macro.mk into criu/Makefile -- nothing it defines
   is used from there.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-10-05 13:11:26 +03:00
Kir Kolyshkin
b149048812 Documentation: enable monospaced font in PS/PDF
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
5c6817349d Documentation: prettify the man page
This adds a way to re-enable justification and hyphenation for
the man page (which in enabled by default in troff but then
Docbook explicitly disables it). The man page looks better this way.

The reason why hyphenation for man pages is disabled by Docbook is
"The problem is that groff is not particularly smart about how it
does hyphenation; it can end up hyphenating a lot of things that you
don't want hyphenated".

The reason why justification for man pages is disabled by Docbook is
"justified text looks good only when it is also hyphenated.
Without hyphenation, excessive amounts of space often end up
getting between words, in order to "pad" lines out to align
on the right margin".

I carefully checked the resuling man page using both terminal output
on 80 columns and the PS/PDF generated. In both cases hyphenation
looks normal, i.e. I don't see any unwanted cases of extra hyphenation.
Same for justification.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
69c79bb500 criu(8): massive man page update
This is an attempt to cleanup the man page. I am very sorry this comes
in this one big patch. Here are the changes:

1. Use *BOLD* for literals, 'ITALIC' for arguments (variable
substituions)

2. Do not use <> for arguments, as they are already marked so (italic)

3. Remove details about "criu exec" and remote syscalls execution;
   add note that it's obsoleted by Compel.

4. Some descriptions are shrunk, some made longer, many are rephrased.

5. Formatting: use second-level lists (*value*:::) where appropriate
   (mostly instead of bulleted lists of values).

6. Properly show comma-separated lists of arguments (with second pair
   of [] and ...

7. Proper use of terms 'option' and 'argument' (*--option* 'argument').

8. Other fixes to formatting and English (such as missing a/the articles).

...

98. Change author to be "the CRIU team".

99. Update copyright years, copyright holder is Parallels Holdings.

[v2: rebase]

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
4edc7c9cb2 Documentation/Makefile: set nmkdir
I was not able to find a way to make a target in sub-makefile
(such as "cd Documentation && make pdf") without this hack.

If there's a better way, please let me know

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Tycho Andersen
66c2b67532 doc: document --cgroup-root on dump
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Adrian Reber
ce4dc6177d criu: fix some spelling errors in criu.txt
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:12:59 +03:00
Adrian Reber
ed8fecd12d criu: add RPC interface for skip in-flight connections
For the previously added option to skip in-flight connections this adds
that option to the RPC interface. The skip in-flight connections is also
described in criu.txt.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:12:59 +03:00
Cyrill Gorcunov
b28f93efaf cg: Add documentation about dumping specified controllers
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:04:00 +03:00
Cyrill Gorcunov
04deb5f37a cg: Add documentation about props
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:03:12 +03:00
Cyrill Gorcunov
3276406d65 build: Add uninstall action
While most are handled from the scratch there is a significant
problem with python setup. So I added some preliminaty solution,
probably someohe with good knowledge of how setup.py works
improve it later.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-04-27 14:13:35 +03:00
Saied Kazemi
70cb4326b6 rework criu check logic
The "criu check" command to check if the kernel is properly configured
to run criu is broken.

The "criu check --ms" command used to be the way to tell criu to check
only for features that have been merged upstream.  But recent kernels
have a set of features whose presence doesn't necessarily mean that
dump or restore will fail but rather *may* fail depending on whether
the process tree uses those features.

This patch deprecates --ms and introduces --extra, --experimental,
and --all.  See "criu --help" or "man criu" for more info.

Typical use cases are:

	$ sudo criu check
	<zero or more warnings and errors...>
	Looks good.
	$ echo $?
	0

	$ sudo criu check --extra
	<zero or more warnings and errors...>
	Looks good.
	$ echo $?
	1

	$ sudo criu check --extra
	<one or more warnings...>
	Looks good but some kernel features are missing
	which, depending on your process tree, may cause
	dump or restore failure.
	$ echo $?
	1

	$ sudo criu check --feature list
	mnt_id aio_remap timerfd tun userns fdinfo_lock seccomp_suspend \
		seccomp_filters loginuid cgroupns

	$ sudo criu check --feature mnt_id
	Warn  (cr-check.c:283): fdinfo doesn't contain the mnt_id field
	$ echo $?
	1

	$ sudo criu check --feature tun
	tun is supported
	$ echo $?
	0

Signed-off-by: Saied Kazemi <saied@google.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-25 23:39:21 +03:00
Cyrill Gorcunov
6fe502dc80 build: docs -- Use autogenerated footer
We can generate footer dynamically and
provide criu.8 version the same as
the program has.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-03-21 10:15:31 +03:00
Pavel Emelyanov
3cffd523e4 Revert "seccomp: add a --no-seccomp option to disable dumping seccomp"
This reverts commit a98014f306be4b4fefdf01af31e1efa5d83e5e4f.

As per Saied Kazemi, actually dump works without seccomp support
from the kernel on non-seccomped tasks. The only problem was with
criu check, but this would be addressed separately.

Reverting the commit not to burden the API with (yet) unneeded stuff.

Conflicts:
	lib/c/criu.h
2016-02-20 13:35:47 +03:00
Tycho Andersen
a98014f306 seccomp: add a --no-seccomp option to disable dumping seccomp
Sometimes we may want to use CRIU on older kernels which don't support
dumping seccomp state where we don't actually care about the seccomp state.
Of course this is unsafe, but it does allow for c/r of things using
seccomp on these older kernels in some cases. When the task is in
SECCOMP_MODE_STRICT or SECCOMP_MODE_FILTER with filters that block the
syscalls criu's parasite code needs, the dump will still fail.

Note that we disable seccomp by simply feigning that we are in mode 0. This
is a little hacky, but avoids distributing ifs throughout the code and
keeps them in this one place.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Saied Kazemi <saied@google.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-17 13:46:55 +03:00
Cyrill Gorcunov
db6cb69394 build: Move everything criu related into criu directory
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-15 15:32:45 +03:00
Cyrill Gorcunov
e71e063890 build: Drop docs about old build engine
No longer valid.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-15 15:32:30 +03:00
Tycho Andersen
ffcdeb7d0a docs: add a note about the default mode
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-01-27 16:45:32 +03:00
Laurent Dufour
2f481f02fc Build pie objects separately
This patch change the build chain to not use pie objects in the crtools
executable.

This done by building the shared source files twice:
 1. for parasite/restorer as '<file>-pie-build.o'
 2. for crtools as '<file>.o'

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-10-14 15:53:07 +03:00