The infected code must be executed in the ARM mode but the dumpee
may run in the Thumb mode while being dumped so the bit CPSR.T
may be set when the control is transfered to the infected blobs
so this code is executed in the Thumb mode too.
We have to clear the bit CPSR.T before transfering control
to the infected code to prevent the behavior described above.
Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Reported-by: Chanho Park <chanho61.park@samsusng.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
In case if we are migrating a session leader task with a solely
slave peer we should not try to restore a group on the terminal
but rather simply inherit it, because a session of the group of
the inherited terminal is not the same as a session of our leader
thus kernel refuse to set any different group here.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Since we're migrating session leader here, test for session has not
been changed instead.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This is easier for debugging, the former SID/PGID remains untouched
and printed out in logs.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
If enabled CONFIG_VFP, we should use PTRACE_GETVFPREGS instead of GETFPREGS.
Most of arm hardwares(since then armv6) use VFP. If we need runtime checking of
vfp, we should parse /proc/cpu_info or use any other techniques.
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Note to package maintainers:
1 Yes we do support DESTDIR.
2 From packaging scripts, use something like this:
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr
(v2: add PREFIX, install to /usr/local not /usr by default)
(v3: fix criu man section -- it is 8 not 1)
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Without this patch, ifd will leak when inotify_add_watch fail.
Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Without this patch, fd will leak when epoll_create fail!
Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Let's save 4 lines of output and put -vvv at the same line as -v 3.
Also, -v argument is in fact option, so mark it as such: [NUM]
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
From where I stand, any help output that exceeds 80 columns is hardly
readable, so let's try to fit into that.
Apparently in many cases we can do that by removing some extra info
which, I guess, belongs to documentation or wiki but not to --help
output which should be just a short reference.
For this reason, this patch also removes information about environmental
variable set for external scripts -- such documentation does not belong
here.
Please review carefully to make sure I haven't thrown the baby out
with the bathwater.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1. "written in file" -> "written to file"
2. "relative path is relative" -> "path is relative"
3. "each restored processes is written to the FILE.pid file\n" ->
"log of each restored process is written to a separate FILE.pid file"
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Alternatively, we could add [<options>] but since this is the only
option let's just add this one.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1. Now either <arg> or ARG or [ARG] were used to denote an option
argument. Let's be consistent and use ARG everywhere. An alternative
could be be <arg>, but I'm strongly against [ARG] since square brackets
traditionally denote something that is optional.
2. If argument is a file name, use FILE, not NAME or SRC
3. For options that require argument, add argument. List includes:
-t|--tree
-D|--images-dir (twice)
-f|--file
Maybe I missed something else, hopefully not.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Some lines were using tabs, some were not. Personally I am not in favor
of any style, but let's be consistent in either using tabs or not.
Changing tabs with spaces produced a smaller patch, so let's do this
way.
This patch should not produce any visual change in output.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This patch reformats the source to print extended help using just one
pr_msg command. Having it this way is easier to do further edits.
I have checked ./criu --help output before and after to make sure it's
the same.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1. s/pid 1234/pid of 1234/
2. Remove all those "one should type" or "run".
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
A manual page is formal document, not a chitchat, so use of contracted
forms is not appropriate.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1. Use *bold* for option names.
2. Separate long and short option by a comma and a space.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1. Move commands out of OPTIONS subsection.
2. Don't use bulleted list -- definition list (such as in OPTIONS) is
better.
Also follwong -> following
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
It's actually not very complicated. Just do this:
1 For literals (verbal text, such as command or option name) use *bold*
2 For substitutions (variable parameter name) use 'italic'
3 Do not use <angle brackets> at all.
Example:
*-f* 'file'
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This command is for root, so section 8 of manual is
more appropriate than 1.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
1 It should be COPYRIGHT not COPYING
2 Happy New Year!
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
When silent make rules are enabled, we use special format
to inform what is going on, like this
$(E) " ACTION " files
We maintain specific whitespace around ACTION so different ones
are aligned nicely. Fix two places that were not aligned to the rest.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>