Compare commits
No commits in common. "rawhide" and "f37" have entirely different histories.
15 changed files with 2397 additions and 197 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -55,8 +55,3 @@
|
|||
/criu-3.17.tar.gz
|
||||
/criu-3.17.1.tar.gz
|
||||
/criu-3.18.tar.gz
|
||||
/criu-3.19.tar.gz
|
||||
/criu-4.0.tar.gz
|
||||
/criu-4.1.tar.gz
|
||||
/criu-4.1.1.tar.gz
|
||||
/criu-4.2.tar.gz
|
||||
|
|
|
|||
11
aio-fix.patch
Normal file
11
aio-fix.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/criu/aio.c 2015-07-01 11:02:50.360004543 -0400
|
||||
+++ b/criu/aio.c 2015-07-01 11:03:33.099757812 -0400
|
||||
@@ -74,7 +74,7 @@
|
||||
* up back to the k_max_reqs.
|
||||
*/
|
||||
|
||||
- return (k_max_reqs - 2) / 2;
|
||||
+ return (k_max_reqs - 2);
|
||||
}
|
||||
|
||||
unsigned long aio_rings_args_size(struct vm_area_list *vmas)
|
||||
373
compel.1
Normal file
373
compel.1
Normal file
|
|
@ -0,0 +1,373 @@
|
|||
'\" t
|
||||
.\" Title: compel
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
|
||||
.\" Date: 09/12/2019
|
||||
.\" Manual: CRIU Manual
|
||||
.\" Source: criu 3.13
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "COMPEL" "1" "09/12/2019" "criu 3\&.13" "CRIU Manual"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * (re)Define some macros
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" toupper - uppercase a string (locale-aware)
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de toupper
|
||||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
|
||||
\\$*
|
||||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SH-xref - format a cross-reference to an SH section
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de SH-xref
|
||||
.ie n \{\
|
||||
.\}
|
||||
.toupper \\$*
|
||||
.el \{\
|
||||
\\$*
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SH - level-one heading that works better for non-TTY output
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de1 SH
|
||||
.\" put an extra blank line of space above the head in non-TTY output
|
||||
.if t \{\
|
||||
.sp 1
|
||||
.\}
|
||||
.sp \\n[PD]u
|
||||
.nr an-level 1
|
||||
.set-an-margin
|
||||
.nr an-prevailing-indent \\n[IN]
|
||||
.fi
|
||||
.in \\n[an-margin]u
|
||||
.ti 0
|
||||
.HTML-TAG ".NH \\n[an-level]"
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
\." make the size of the head bigger
|
||||
.ps +3
|
||||
.ft B
|
||||
.ne (2v + 1u)
|
||||
.ie n \{\
|
||||
.\" if n (TTY output), use uppercase
|
||||
.toupper \\$*
|
||||
.\}
|
||||
.el \{\
|
||||
.nr an-break-flag 0
|
||||
.\" if not n (not TTY), use normal case (not uppercase)
|
||||
\\$1
|
||||
.in \\n[an-margin]u
|
||||
.ti 0
|
||||
.\" if not n (not TTY), put a border/line under subheading
|
||||
.sp -.6
|
||||
\l'\n(.lu'
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SS - level-two heading that works better for non-TTY output
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de1 SS
|
||||
.sp \\n[PD]u
|
||||
.nr an-level 1
|
||||
.set-an-margin
|
||||
.nr an-prevailing-indent \\n[IN]
|
||||
.fi
|
||||
.in \\n[IN]u
|
||||
.ti \\n[SN]u
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.ps \\n[PS-SS]u
|
||||
\." make the size of the head bigger
|
||||
.ps +2
|
||||
.ft B
|
||||
.ne (2v + 1u)
|
||||
.if \\n[.$] \&\\$*
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" BB/EB - put background/screen (filled box) around block of text
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de BB
|
||||
.if t \{\
|
||||
.sp -.5
|
||||
.br
|
||||
.in +2n
|
||||
.ll -2n
|
||||
.gcolor red
|
||||
.di BX
|
||||
.\}
|
||||
..
|
||||
.de EB
|
||||
.if t \{\
|
||||
.if "\\$2"adjust-for-leading-newline" \{\
|
||||
.sp -1
|
||||
.\}
|
||||
.br
|
||||
.di
|
||||
.in
|
||||
.ll
|
||||
.gcolor
|
||||
.nr BW \\n(.lu-\\n(.i
|
||||
.nr BH \\n(dn+.5v
|
||||
.ne \\n(BHu+.5v
|
||||
.ie "\\$2"adjust-for-leading-newline" \{\
|
||||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
|
||||
.\}
|
||||
.el \{\
|
||||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
|
||||
.\}
|
||||
.in 0
|
||||
.sp -.5v
|
||||
.nf
|
||||
.BX
|
||||
.in
|
||||
.sp .5v
|
||||
.fi
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" BM/EM - put colored marker in margin next to block of text
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de BM
|
||||
.if t \{\
|
||||
.br
|
||||
.ll -2n
|
||||
.gcolor red
|
||||
.di BX
|
||||
.\}
|
||||
..
|
||||
.de EM
|
||||
.if t \{\
|
||||
.br
|
||||
.di
|
||||
.ll
|
||||
.gcolor
|
||||
.nr BH \\n(dn
|
||||
.ne \\n(BHu
|
||||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
|
||||
.in 0
|
||||
.nf
|
||||
.BX
|
||||
.in
|
||||
.fi
|
||||
.\}
|
||||
..
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "Name"
|
||||
compel \- Execute parasitic code within another process\&.
|
||||
.SH "Synopsis"
|
||||
.sp
|
||||
\fBcompel\fR \fIhgen\fR [\fIoption\fR \&...]
|
||||
.sp
|
||||
\fBcompel\fR \fIplugins\fR [\fIPLUGIN_NAME\fR \&...]
|
||||
.sp
|
||||
\fBcompel\fR [\fI\-\-compat\fR] \fIincludes\fR | \fIcflags\fR | \fIldflags\fR
|
||||
.sp
|
||||
\fBcompel\fR [\fI\-\-compat\fR] [\fI\-\-static\fR] \fIlibs\fR
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
\fBcompel\fR is a utility to execute arbitrary code, also called parasite code, in the context of a foreign process\&. The parasitic code, once compiled with compel flags and packed, can be executed in the context of other tasks\&. Currently there is only one way to load the parasitic blob into victim task using libcompel\&.a, called c\-header\&.
|
||||
.SH "ARGUMENTS"
|
||||
.SS "Positional Arguments"
|
||||
.PP
|
||||
\fBhgen\fR
|
||||
.RS 4
|
||||
create a header from the \&.po file, which is the parasite binary\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBplugins\fR
|
||||
.RS 4
|
||||
prints the plugins available\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBldflags\fR
|
||||
.RS 4
|
||||
prints the ldflags available to compel during linking of parasite code\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBcflags\fR
|
||||
.RS 4
|
||||
prints the compel cflags to be used during compilation of parasitic code\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBincludes\fR
|
||||
.RS 4
|
||||
prints list of standard include directories\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBlibs\fR
|
||||
.RS 4
|
||||
prints list of static or dynamic libraries that compel can link with\&.
|
||||
.RE
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\fB\-f\fR, \fB\-\-file\fR \fIFILE\fR
|
||||
.RS 4
|
||||
Path to the binary file,
|
||||
\fIFILE\fR, which
|
||||
\fBcompel\fR
|
||||
must turn into a header
|
||||
.RE
|
||||
.PP
|
||||
\fB\-o\fR, \fB\-\-output\fR \fIFILE\fR
|
||||
.RS 4
|
||||
Path to the header file,
|
||||
\fIFILE\fR, where compel must write the resulting header\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-p\fR, \fB\-\-prefix\fR \fINAME\fR
|
||||
.RS 4
|
||||
Specify prefix for var names
|
||||
.RE
|
||||
.PP
|
||||
\fB\-l\fR, \fB\-\-log\-level\fR \fINUM\fR
|
||||
.RS 4
|
||||
Default log level of compel\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
.RS 4
|
||||
Prints usage and exits\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-V\fR, \fB\-\-version\fR
|
||||
.RS 4
|
||||
Prints version number of compel\&.
|
||||
.RE
|
||||
.SH "SOURCE EXAMPLES"
|
||||
.SS "Parasitic Code"
|
||||
.sp
|
||||
\fB#include <compel/plugins/std\&.h>\fR
|
||||
.sp
|
||||
\fBint parasite_trap_cmd(int cmd, void *args);\fR //gets called by compel_run_in_thread()
|
||||
.sp
|
||||
\fBint parasite_daemon_cmd(int cmd, void *arg);\fR // gets called by compel_rpc_call() and compel_rpc_call_sync()
|
||||
.sp
|
||||
\fBvoid parasite_cleanup(void);\fR //gets called on parasite unload by compel_cure()
|
||||
.SS "Infecting code"
|
||||
.sp
|
||||
The parasitic code is compiled and converted to a header using \fBcompel\fR, and included here\&.
|
||||
.sp
|
||||
\fB#include <compel/compel\&.h>\fR
|
||||
.sp
|
||||
\fB#include "parasite\&.h"\fR
|
||||
.sp
|
||||
Following steps are perfomed to infect the victim process:
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
stop the task:
|
||||
\fBint compel_stop_task(int pid);\fR
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
prepare infection handler:
|
||||
\fBstruct parasite_ctl *compel_prepare(int pid);\fR
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
execute system call:
|
||||
\fBint compel_syscall(ctl, int syscall_nr, long *ret, int arg \&...);\fR
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
infect victim:
|
||||
\fBint compel_infect(ctl, nr_thread, size_of_args_area);\fR
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
cure the victim:
|
||||
\fBint compel_cure(ctl);\fR
|
||||
//ctl pointer is freed by this call
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
Resume victim:
|
||||
\fBint compel_resume_task(pid, orig_state, state);\fR
|
||||
.RE
|
||||
.sp
|
||||
\fBctl\fR must be configured with blob information by calling \fBPREFIX_setup_c_header()\fR, with ctl as its argument\&. \fBPREFIX\fR is the argument given to \fB\-p\fR when calling hgen, else it is deduced from file name\&.
|
||||
.SH "EXAMPLES"
|
||||
.sp
|
||||
To generate a header file(\&.h) from a parasite binary file(\&.po) use:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.fam C
|
||||
.ps -1
|
||||
.nf
|
||||
.BB lightgray
|
||||
compel hgen \-f parasite\&.po \-o parasite\&.h
|
||||
.EB lightgray
|
||||
.fi
|
||||
.fam
|
||||
.ps +1
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.sp
|
||||
\fIparasite\&.po\fR file is obtained by compiling the parasite source with compel flags and linking it with the compel plugins\&.
|
||||
.SH "AUTHOR"
|
||||
.sp
|
||||
The CRIU team\&.
|
||||
235
crit.1
Normal file
235
crit.1
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
'\" t
|
||||
.\" Title: crit
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
|
||||
.\" Date: 04/23/2019
|
||||
.\" Manual: CRIU Manual
|
||||
.\" Source: criu 3.12
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "CRIT" "1" "04/23/2019" "criu 3\&.12" "CRIU Manual"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * (re)Define some macros
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" toupper - uppercase a string (locale-aware)
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de toupper
|
||||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
|
||||
\\$*
|
||||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SH-xref - format a cross-reference to an SH section
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de SH-xref
|
||||
.ie n \{\
|
||||
.\}
|
||||
.toupper \\$*
|
||||
.el \{\
|
||||
\\$*
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SH - level-one heading that works better for non-TTY output
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de1 SH
|
||||
.\" put an extra blank line of space above the head in non-TTY output
|
||||
.if t \{\
|
||||
.sp 1
|
||||
.\}
|
||||
.sp \\n[PD]u
|
||||
.nr an-level 1
|
||||
.set-an-margin
|
||||
.nr an-prevailing-indent \\n[IN]
|
||||
.fi
|
||||
.in \\n[an-margin]u
|
||||
.ti 0
|
||||
.HTML-TAG ".NH \\n[an-level]"
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
\." make the size of the head bigger
|
||||
.ps +3
|
||||
.ft B
|
||||
.ne (2v + 1u)
|
||||
.ie n \{\
|
||||
.\" if n (TTY output), use uppercase
|
||||
.toupper \\$*
|
||||
.\}
|
||||
.el \{\
|
||||
.nr an-break-flag 0
|
||||
.\" if not n (not TTY), use normal case (not uppercase)
|
||||
\\$1
|
||||
.in \\n[an-margin]u
|
||||
.ti 0
|
||||
.\" if not n (not TTY), put a border/line under subheading
|
||||
.sp -.6
|
||||
\l'\n(.lu'
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SS - level-two heading that works better for non-TTY output
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de1 SS
|
||||
.sp \\n[PD]u
|
||||
.nr an-level 1
|
||||
.set-an-margin
|
||||
.nr an-prevailing-indent \\n[IN]
|
||||
.fi
|
||||
.in \\n[IN]u
|
||||
.ti \\n[SN]u
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.ps \\n[PS-SS]u
|
||||
\." make the size of the head bigger
|
||||
.ps +2
|
||||
.ft B
|
||||
.ne (2v + 1u)
|
||||
.if \\n[.$] \&\\$*
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" BB/EB - put background/screen (filled box) around block of text
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de BB
|
||||
.if t \{\
|
||||
.sp -.5
|
||||
.br
|
||||
.in +2n
|
||||
.ll -2n
|
||||
.gcolor red
|
||||
.di BX
|
||||
.\}
|
||||
..
|
||||
.de EB
|
||||
.if t \{\
|
||||
.if "\\$2"adjust-for-leading-newline" \{\
|
||||
.sp -1
|
||||
.\}
|
||||
.br
|
||||
.di
|
||||
.in
|
||||
.ll
|
||||
.gcolor
|
||||
.nr BW \\n(.lu-\\n(.i
|
||||
.nr BH \\n(dn+.5v
|
||||
.ne \\n(BHu+.5v
|
||||
.ie "\\$2"adjust-for-leading-newline" \{\
|
||||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
|
||||
.\}
|
||||
.el \{\
|
||||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
|
||||
.\}
|
||||
.in 0
|
||||
.sp -.5v
|
||||
.nf
|
||||
.BX
|
||||
.in
|
||||
.sp .5v
|
||||
.fi
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" BM/EM - put colored marker in margin next to block of text
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de BM
|
||||
.if t \{\
|
||||
.br
|
||||
.ll -2n
|
||||
.gcolor red
|
||||
.di BX
|
||||
.\}
|
||||
..
|
||||
.de EM
|
||||
.if t \{\
|
||||
.br
|
||||
.di
|
||||
.ll
|
||||
.gcolor
|
||||
.nr BH \\n(dn
|
||||
.ne \\n(BHu
|
||||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
|
||||
.in 0
|
||||
.nf
|
||||
.BX
|
||||
.in
|
||||
.fi
|
||||
.\}
|
||||
..
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "Name"
|
||||
crit \- CRiu Image Tool
|
||||
.SH "Synopsis"
|
||||
.sp
|
||||
\fBcrit\fR \fIdecode\fR [\-h] [\-i IN] [\-o OUT] [\-\-pretty]
|
||||
.sp
|
||||
\fBcrit\fR \fIencode\fR [\-h] [\-i IN] [\-o OUT]
|
||||
.sp
|
||||
\fBcrit\fR \fIinfo\fR [\-h] in
|
||||
.sp
|
||||
\fBcrit\fR \fIx\fR [\-h] dir {ps,fds,mems}
|
||||
.sp
|
||||
\fBcrit\fR \fIshow\fR [\-h] in
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
\fBcrit\fR is a feature\-rich replacement for existing \fBcriu\fR show\&.
|
||||
.SH "ARGUMENTS"
|
||||
.SS "Positional Arguments"
|
||||
.PP
|
||||
\fBdecode\fR
|
||||
.RS 4
|
||||
convert
|
||||
\fBcriu\fR
|
||||
image from binary type JSON
|
||||
.RE
|
||||
.PP
|
||||
\fBencode\fR
|
||||
.RS 4
|
||||
convert
|
||||
\fBcriu\fR
|
||||
image from JSON type to binary
|
||||
.RE
|
||||
.PP
|
||||
\fBinfo\fR
|
||||
.RS 4
|
||||
show info about image
|
||||
.RE
|
||||
.PP
|
||||
\fBx\fR
|
||||
.RS 4
|
||||
explore image directory
|
||||
.RE
|
||||
.PP
|
||||
\fBshow\fR
|
||||
.RS 4
|
||||
convert
|
||||
\fBcriu\fR
|
||||
image from binary to human\-readable JSON
|
||||
.RE
|
||||
.SS "Optional Arguments"
|
||||
.PP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
.RS 4
|
||||
Print some help and exit
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.sp
|
||||
criu(8)
|
||||
.SH "AUTHOR"
|
||||
.sp
|
||||
The CRIU team
|
||||
194
criu-ns.1
Normal file
194
criu-ns.1
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
'\" t
|
||||
.\" Title: criu-ns
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
|
||||
.\" Date: 09/22/2021
|
||||
.\" Manual: CRIU Manual
|
||||
.\" Source: criu 3.16
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "CRIU\-NS" "1" "09/22/2021" "criu 3\&.16" "CRIU Manual"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * (re)Define some macros
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" toupper - uppercase a string (locale-aware)
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de toupper
|
||||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
|
||||
\\$*
|
||||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SH-xref - format a cross-reference to an SH section
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de SH-xref
|
||||
.ie n \{\
|
||||
.\}
|
||||
.toupper \\$*
|
||||
.el \{\
|
||||
\\$*
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SH - level-one heading that works better for non-TTY output
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de1 SH
|
||||
.\" put an extra blank line of space above the head in non-TTY output
|
||||
.if t \{\
|
||||
.sp 1
|
||||
.\}
|
||||
.sp \\n[PD]u
|
||||
.nr an-level 1
|
||||
.set-an-margin
|
||||
.nr an-prevailing-indent \\n[IN]
|
||||
.fi
|
||||
.in \\n[an-margin]u
|
||||
.ti 0
|
||||
.HTML-TAG ".NH \\n[an-level]"
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
\." make the size of the head bigger
|
||||
.ps +3
|
||||
.ft B
|
||||
.ne (2v + 1u)
|
||||
.ie n \{\
|
||||
.\" if n (TTY output), use uppercase
|
||||
.toupper \\$*
|
||||
.\}
|
||||
.el \{\
|
||||
.nr an-break-flag 0
|
||||
.\" if not n (not TTY), use normal case (not uppercase)
|
||||
\\$1
|
||||
.in \\n[an-margin]u
|
||||
.ti 0
|
||||
.\" if not n (not TTY), put a border/line under subheading
|
||||
.sp -.6
|
||||
\l'\n(.lu'
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" SS - level-two heading that works better for non-TTY output
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de1 SS
|
||||
.sp \\n[PD]u
|
||||
.nr an-level 1
|
||||
.set-an-margin
|
||||
.nr an-prevailing-indent \\n[IN]
|
||||
.fi
|
||||
.in \\n[IN]u
|
||||
.ti \\n[SN]u
|
||||
.it 1 an-trap
|
||||
.nr an-no-space-flag 1
|
||||
.nr an-break-flag 1
|
||||
.ps \\n[PS-SS]u
|
||||
\." make the size of the head bigger
|
||||
.ps +2
|
||||
.ft B
|
||||
.ne (2v + 1u)
|
||||
.if \\n[.$] \&\\$*
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" BB/EB - put background/screen (filled box) around block of text
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de BB
|
||||
.if t \{\
|
||||
.sp -.5
|
||||
.br
|
||||
.in +2n
|
||||
.ll -2n
|
||||
.gcolor red
|
||||
.di BX
|
||||
.\}
|
||||
..
|
||||
.de EB
|
||||
.if t \{\
|
||||
.if "\\$2"adjust-for-leading-newline" \{\
|
||||
.sp -1
|
||||
.\}
|
||||
.br
|
||||
.di
|
||||
.in
|
||||
.ll
|
||||
.gcolor
|
||||
.nr BW \\n(.lu-\\n(.i
|
||||
.nr BH \\n(dn+.5v
|
||||
.ne \\n(BHu+.5v
|
||||
.ie "\\$2"adjust-for-leading-newline" \{\
|
||||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
|
||||
.\}
|
||||
.el \{\
|
||||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
|
||||
.\}
|
||||
.in 0
|
||||
.sp -.5v
|
||||
.nf
|
||||
.BX
|
||||
.in
|
||||
.sp .5v
|
||||
.fi
|
||||
.\}
|
||||
..
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" BM/EM - put colored marker in margin next to block of text
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.de BM
|
||||
.if t \{\
|
||||
.br
|
||||
.ll -2n
|
||||
.gcolor red
|
||||
.di BX
|
||||
.\}
|
||||
..
|
||||
.de EM
|
||||
.if t \{\
|
||||
.br
|
||||
.di
|
||||
.ll
|
||||
.gcolor
|
||||
.nr BH \\n(dn
|
||||
.ne \\n(BHu
|
||||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
|
||||
.in 0
|
||||
.nf
|
||||
.BX
|
||||
.in
|
||||
.fi
|
||||
.\}
|
||||
..
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "Name"
|
||||
criu-ns \- run criu in different namespaces
|
||||
.SH "Synopsis"
|
||||
.sp
|
||||
\fBcriu\-ns\fR \fIdump\fR \-t PID [<options>]
|
||||
.sp
|
||||
\fBcriu\-ns\fR \fIpre\-dump\fR \-t PID [<options>]
|
||||
.sp
|
||||
\fBcriu\-ns\fR \fIrestore\fR [<options>]
|
||||
.sp
|
||||
\fBcriu\-ns\fR \fIcheck\fR [<options>]
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
The \fBcriu\-ns\fR command executes \fIcriu\fR in a new PID and mount namespace\&. The purpose of this wrapper script is to enable restoring a process tree that might require a specific PID that is already used on the system; so called "PID mismatch" problem\&.
|
||||
.SH "SEE ALSO"
|
||||
.sp
|
||||
nsenter(1) namespaces(7) criu(8)
|
||||
.SH "AUTHOR"
|
||||
.sp
|
||||
The CRIU team
|
||||
200
criu.spec
200
criu.spec
|
|
@ -1,5 +1,10 @@
|
|||
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
|
||||
%global py_prefix python3
|
||||
%global py_binary %{py_prefix}
|
||||
%else
|
||||
%global py_prefix python
|
||||
%global py_binary python2
|
||||
%endif
|
||||
|
||||
# With annobin enabled, CRIU does not work anymore. It seems CRIU's
|
||||
# parasite code breaks if annobin is enabled.
|
||||
|
|
@ -11,52 +16,67 @@
|
|||
%undefine _auto_set_build_flags
|
||||
|
||||
Name: criu
|
||||
Version: 4.2
|
||||
Release: 11%{?dist}
|
||||
Version: 3.18
|
||||
Release: 1%{?dist}
|
||||
Summary: Tool for Checkpoint/Restore in User-space
|
||||
License: GPL-2.0-only AND LGPL-2.1-only AND MIT
|
||||
License: GPLv2
|
||||
URL: http://criu.org/
|
||||
Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
|
||||
|
||||
# Fix to work on CPUs with larger XSAVE area (Sapphire Rapids)
|
||||
Patch0: https://github.com/checkpoint-restore/criu/commit/d739260c57576c636759afb312340fa3827312f6.patch
|
||||
|
||||
# Add protobuf-c as a dependency.
|
||||
# We use this patch because the protobuf-c package name
|
||||
# in RPM and DEB is different.
|
||||
Patch99: criu.pc.patch
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: perl
|
||||
# RHEL has no asciidoc; take man-page from Fedora 26
|
||||
# zcat /usr/share/man/man8/criu.8.gz > criu.8
|
||||
Source1: criu.8
|
||||
Source2: crit.1
|
||||
Source3: criu-ns.1
|
||||
|
||||
# The patch aio-fix.patch is needed as RHEL7
|
||||
# doesn't do "nr_events *= 2" in ioctx_alloc().
|
||||
Patch100: aio-fix.patch
|
||||
%endif
|
||||
|
||||
Source5: criu-tmpfiles.conf
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: systemd
|
||||
BuildRequires: libnet-devel
|
||||
BuildRequires: protobuf-devel protobuf-c-devel %{py_prefix}-devel libnl3-devel libcap-devel
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
BuildRequires: %{py_prefix}-pip
|
||||
BuildRequires: %{py_prefix}-setuptools
|
||||
BuildRequires: (%{py_prefix}-wheel if %{py_prefix}-setuptools < 71)
|
||||
BuildRequires: %{py_prefix}-protobuf
|
||||
BuildRequires: asciidoctor
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: gnutls-devel
|
||||
BuildRequires: libdrm-devel
|
||||
BuildRequires: libuuid-devel
|
||||
# Checkpointing containers with a tmpfs requires tar
|
||||
Recommends: tar
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: libbsd-devel
|
||||
BuildRequires: nftables-devel
|
||||
%endif
|
||||
%endif
|
||||
BuildRequires: make
|
||||
|
||||
# user-space and kernel changes are only available for x86_64, arm,
|
||||
# ppc64le, aarch64 and s390x
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=902875
|
||||
ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x riscv64
|
||||
ExclusiveArch: x86_64 %{arm} ppc64le aarch64 s390x
|
||||
|
||||
%description
|
||||
criu is the user-space part of Checkpoint/Restore in User-space
|
||||
(CRIU), a project to implement checkpoint/restore functionality for
|
||||
Linux in user-space.
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%package devel
|
||||
Summary: Header files and libraries for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
|
@ -71,25 +91,18 @@ Requires: %{name} = %{version}-%{release}
|
|||
|
||||
%description libs
|
||||
This package contains the libraries for %{name}
|
||||
|
||||
%package amdgpu-plugin
|
||||
Summary: AMD GPU plugin for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description amdgpu-plugin
|
||||
This package contains the AMD GPU plugin for %{name}
|
||||
|
||||
%package cuda-plugin
|
||||
Summary: CUDA plugin for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description cuda-plugin
|
||||
This package contains the CUDA plugin for %{name}
|
||||
%endif
|
||||
|
||||
%package -n %{py_prefix}-%{name}
|
||||
%{?python_provide:%python_provide %{py_prefix}-%{name}}
|
||||
Summary: Python bindings for %{name}
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
Requires: protobuf-python
|
||||
Requires: %{name} = %{version}-%{release} %{py_prefix}-ipaddr
|
||||
%else
|
||||
Requires: %{py_prefix}-protobuf
|
||||
Obsoletes: python2-criu < 3.10-1
|
||||
%endif
|
||||
|
||||
%description -n %{py_prefix}-%{name}
|
||||
%{py_prefix}-%{name} contains Python bindings for %{name}.
|
||||
|
|
@ -113,8 +126,13 @@ This script can help to workaround the so called "PID mismatch" problem.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 0 -p1
|
||||
%patch -P 99 -p1
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%patch -P 100 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
# This package calls LD directly without specifying the LTO plugins. Until
|
||||
# that is fixed, disable LTO.
|
||||
|
|
@ -122,36 +140,56 @@ This script can help to workaround the so called "PID mismatch" problem.
|
|||
|
||||
# %{?_smp_mflags} does not work
|
||||
# -fstack-protector breaks build
|
||||
CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=0 PREFIX=%{_prefix} RUNDIR=/run/criu PYTHON=%{py_binary} PLUGINDIR=%{_libdir}/criu NETWORK_LOCK_DEFAULT=NETWORK_LOCK_NFTABLES
|
||||
make V=1 WERROR=0 PREFIX=%{_prefix} PLUGINDIR=%{_libdir}/criu amdgpu_plugin
|
||||
CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=0 PREFIX=%{_prefix} RUNDIR=/run/criu PYTHON=%{py_binary}
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
make docs V=1
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
sed -e "s,--upgrade --ignore-installed,--no-index --no-deps -v --no-build-isolation,g" -i lib/Makefile -i crit/Makefile
|
||||
make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} BINDIR=%{_bindir} SBINDIR=%{_sbindir}
|
||||
make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary} PIPFLAGS="--no-build-isolation --no-index --no-deps --progress-bar off --upgrade --ignore-installed"
|
||||
make install-amdgpu_plugin DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PLUGINDIR=%{_libdir}/criu
|
||||
make install-cuda_plugin DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PLUGINDIR=%{_libdir}/criu
|
||||
make install-crit DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} BINDIR=%{_bindir} SBINDIR=%{_sbindir} PYTHON=%{py_binary} PIPFLAGS="--no-build-isolation --no-index --no-deps --progress-bar off --upgrade --ignore-installed"
|
||||
sed -e "s,--upgrade --force-reinstall,--disable-pip-version-check --progress-bar off --verbose,g" -i lib/Makefile
|
||||
rm -f crit/pyproject.toml
|
||||
make install-criu DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||
make install-lib DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} PYTHON=%{py_binary}
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
# only install documentation on Fedora as it requires asciidoc,
|
||||
# which is not available on RHEL7
|
||||
make install-man DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/compel.1
|
||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/amdgpu_plugin.1
|
||||
%else
|
||||
install -p -m 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
|
||||
install -p -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/crit.1
|
||||
install -p -m 644 -D %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/criu-ns.1
|
||||
rm -f compel.1 amdgpu_plugin.1
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||
install -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
install -d -m 0755 %{buildroot}/run/%{name}/
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
# remove devel and libs packages
|
||||
rm -rf $RPM_BUILD_ROOT%{_includedir}/criu
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*.so*
|
||||
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
||||
rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
|
||||
%endif
|
||||
|
||||
# remove static lib
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
|
||||
|
||||
%files
|
||||
%{_sbindir}/%{name}
|
||||
%doc %{_mandir}/man8/criu.8*
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%{_libexecdir}/%{name}
|
||||
%endif
|
||||
%dir /run/%{name}
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%doc README.md COPYING
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%files devel
|
||||
%{_includedir}/criu
|
||||
%{_libdir}/*.so
|
||||
|
|
@ -159,111 +197,27 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
|
|||
|
||||
%files libs
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files amdgpu-plugin
|
||||
%{_libdir}/%{name}/amdgpu_plugin.so
|
||||
%doc %{_mandir}/man1/criu-amdgpu-plugin.1*
|
||||
|
||||
%files cuda-plugin
|
||||
%{_libdir}/%{name}/cuda_plugin.so
|
||||
%doc plugins/cuda/README.md
|
||||
%endif
|
||||
|
||||
%files -n %{py_prefix}-%{name}
|
||||
%{python3_sitelib}/pycriu*
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%{python2_sitelib}/pycriu/*
|
||||
%{python2_sitelib}/*egg-info
|
||||
%else
|
||||
%{python3_sitelib}/pycriu/*
|
||||
%endif
|
||||
|
||||
%files -n crit
|
||||
%{_bindir}/crit
|
||||
%{python3_sitelib}/crit-%{version}.dist-info/
|
||||
%{python3_sitelib}/crit
|
||||
%{python3_sitelib}/crit-%{version}*egg-info
|
||||
%doc %{_mandir}/man1/crit.1*
|
||||
|
||||
%files -n criu-ns
|
||||
%{_sbindir}/criu-ns
|
||||
%doc %{_mandir}/man1/criu-ns.1*
|
||||
|
||||
%post
|
||||
%tmpfiles_create %{name}.conf
|
||||
|
||||
%changelog
|
||||
* Mon Nov 17 2025 Cristian Le <git@lecris.dev> - 4.2-11
|
||||
- Convert STI tests to TMT (rhbz#2382879)
|
||||
|
||||
* Mon Nov 17 2025 Adrian Reber <adrian@lisas.de> - 4.2-5
|
||||
- Update to 4.2
|
||||
|
||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 4.1.1-4
|
||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
||||
|
||||
* Wed Aug 27 2025 Miro Hrončok <mhroncok@redhat.com> - 4.1.1-3
|
||||
- Drop unused BuildRequires on python3-wheel
|
||||
|
||||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 4.1.1-2
|
||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
||||
|
||||
* Wed Jul 30 2025 Adrian Reber <adrian@lisas.de> - 4.1.1-1
|
||||
- Update to 4.1.1
|
||||
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Tue Jun 17 2025 Python Maint <python-maint@redhat.com> - 4.1-4
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
* Wed Apr 23 2025 David Abdurachmanov <davidlt@rivosinc.com> - 4.1-3
|
||||
- Enable for riscv64
|
||||
|
||||
* Mon Apr 21 2025 Adrian Reber <adrian@lisas.de> - 4.1-2
|
||||
- Apply upstream patch to fix a runc regression
|
||||
|
||||
* Mon Apr 07 2025 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 4.1-1
|
||||
- Update to 4.1
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sun Dec 08 2024 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 4.0-3
|
||||
- Apply patch to handle vvar_vclock vma-s in rawhide
|
||||
|
||||
* Thu Oct 17 2024 Adrian Reber <adrian@lisas.de> - 4.0-2
|
||||
- Recommends: iptables
|
||||
|
||||
* Thu Sep 26 2024 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 4.0-1
|
||||
- Update to 4.0
|
||||
- Add package for cuda-plugin
|
||||
- Run pip install without internet access
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Jul 09 2024 Radostin Stoyanov <rstoyanov@fedoraproject.org> - 3.19-6
|
||||
- Add package for amdgpu-plugin
|
||||
|
||||
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 3.19-5
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.19-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Nov 28 2023 Adrian Reber <adrian@lisas.de> - 3.19-2
|
||||
- Fix test setup
|
||||
|
||||
* Tue Nov 28 2023 Adrian Reber <adrian@lisas.de> - 3.19-1
|
||||
- Update to 3.19
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.18-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jul 06 2023 Adrian Reber <adrian@lisas.de> - 3.18-3
|
||||
- migrated to SPDX license
|
||||
- remove RHEL 7 conditionals
|
||||
|
||||
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.18-2
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Tue Apr 25 2023 Adrian Reber <adrian@lisas.de> - 3.18-1
|
||||
* Tue Apr 25 2034 Adrian Reber <adrian@lisas.de> - 3.18-1
|
||||
- Update to 3.18
|
||||
- Apply patch from upstream to support newer CPUs
|
||||
|
||||
|
|
|
|||
74
d739260c57576c636759afb312340fa3827312f6.patch
Normal file
74
d739260c57576c636759afb312340fa3827312f6.patch
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
From d739260c57576c636759afb312340fa3827312f6 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Reber <areber@redhat.com>
|
||||
Date: Mon, 24 Apr 2023 09:28:19 +0200
|
||||
Subject: [PATCH] compel: support XSAVE on newer Intel CPUs
|
||||
|
||||
Newer Intel CPUs (Sapphire Rapids) have a much larger xsave area than
|
||||
before. Looking at older CPUs I see 2440 bytes.
|
||||
|
||||
# cpuid -1 -l 0xd -s 0
|
||||
...
|
||||
bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
|
||||
|
||||
On newer CPUs (Sapphire Rapids) it grows to 11008 bytes.
|
||||
|
||||
# cpuid -1 -l 0xd -s 0
|
||||
...
|
||||
bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
|
||||
|
||||
This increase the xsave area from one page to four pages.
|
||||
|
||||
Without this patch the fpu03 test fails, with this patch it works again.
|
||||
|
||||
Signed-off-by: Adrian Reber <areber@redhat.com>
|
||||
---
|
||||
.../arch/x86/src/lib/include/uapi/asm/fpu.h | 28 +++++++++++++++++--
|
||||
1 file changed, 26 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
||||
index bd3b0cbd5c..8c83dd9ae4 100644
|
||||
--- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
||||
+++ b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
|
||||
@@ -21,7 +21,28 @@
|
||||
#define XSTATE_YMM 0x4
|
||||
|
||||
#define FXSAVE_SIZE 512
|
||||
-#define XSAVE_SIZE 4096
|
||||
+/*
|
||||
+ * This used to be 4096 (one page). There is a comment below concerning
|
||||
+ * this size:
|
||||
+ * "One page should be enough for the whole xsave state ;-)"
|
||||
+ * Which is kind of funny as it is no longer enough ;-)
|
||||
+ *
|
||||
+ * Older CPUs:
|
||||
+ * # cpuid -1 -l 0xd -s 0
|
||||
+ * ...
|
||||
+ * bytes required by XSAVE/XRSTOR area = 0x00000988 (2440)
|
||||
+ *
|
||||
+ * Newer CPUs (Sapphire Rapids):
|
||||
+ * # cpuid -1 -l 0xd -s 0
|
||||
+ * ...
|
||||
+ * bytes required by XSAVE/XRSTOR area = 0x00002b00 (11008)
|
||||
+ *
|
||||
+ * So one page is no longer enough... But:
|
||||
+ *
|
||||
+ * Four pages should be enough for the whole xsave state ;-)
|
||||
+ */
|
||||
+
|
||||
+#define XSAVE_SIZE 4*4096
|
||||
|
||||
#define XSAVE_HDR_SIZE 64
|
||||
#define XSAVE_HDR_OFFSET FXSAVE_SIZE
|
||||
@@ -235,8 +256,11 @@ struct pkru_state {
|
||||
*
|
||||
*
|
||||
* One page should be enough for the whole xsave state ;-)
|
||||
+ *
|
||||
+ * Of course it was not ;-) Now using four pages...
|
||||
+ *
|
||||
*/
|
||||
-#define EXTENDED_STATE_AREA_SIZE (4096 - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
|
||||
+#define EXTENDED_STATE_AREA_SIZE (XSAVE_SIZE - sizeof(struct i387_fxsave_struct) - sizeof(struct xsave_hdr_struct))
|
||||
|
||||
/*
|
||||
* cpu requires it to be 64 byte aligned
|
||||
21
plans.fmf
21
plans.fmf
|
|
@ -1,21 +0,0 @@
|
|||
summary: Run all tests
|
||||
discover:
|
||||
how: fmf
|
||||
prepare:
|
||||
- name: Install the main package
|
||||
how: install
|
||||
package:
|
||||
- criu
|
||||
execute:
|
||||
how: tmt
|
||||
|
||||
/zdtm:
|
||||
# Use the srpm sources
|
||||
discover+:
|
||||
dist-git-source: true
|
||||
dist-git-merge: true
|
||||
test: /tests/zdtm
|
||||
|
||||
/podman:
|
||||
discover+:
|
||||
test: /tests/podman
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
annocheck:
|
||||
jobs:
|
||||
- hardened: --verbose --skip-dynamic-tags --skip-property-note --skip-bind-now --skip-pie --skip-cf-protection --skip-notes --skip-gaps --skip-optimization --skip-stack-clash --skip-stack-prot
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (criu-4.2.tar.gz) = f7e0ac17d46dd560bb2439f617a0a3b3933eb86f4b8b9b16852d300e4ffc6a4851d72be9342dfd40792a53fca8b65d26fde4e1b1f02bcd04923a8b6f0e5c8a62
|
||||
SHA512 (criu-3.18.tar.gz) = 3d15554ebd2d08c8904c23b0aba00d505891c14caa4790c2fd12ad6b20bf4058fd210f1d03fd63aacc5ad8bc47e341396b48abbeb474f1fd43c3023fd1ff9171
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@
|
|||
set -eux
|
||||
|
||||
ls -la
|
||||
uname -a
|
||||
rpm -qi criu || true
|
||||
criu --version
|
||||
|
||||
echo "Start container"
|
||||
podman --log-level debug run -d quay.io/adrianreber/counter
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
set -x
|
||||
|
||||
uname -a
|
||||
rpm -qi criu || true
|
||||
criu --version
|
||||
|
||||
# These zdtm tests are skipped because they fail only in CI system
|
||||
EXCLUDES=" \
|
||||
|
|
@ -15,31 +13,15 @@ EXCLUDES=" \
|
|||
-x zdtm/static/socket-tcp4v6-closed \
|
||||
-x zdtm/static/maps01 \
|
||||
-x zdtm/static/maps04 \
|
||||
-x zdtm/static/del_standalone_un \
|
||||
-x zdtm/static/del_standalone_un_seqpacket \
|
||||
-x zdtm/static/deleted_unix_sock \
|
||||
-x zdtm/static/fifo_upon_unix_socket00 \
|
||||
-x zdtm/static/sk-unix-dgram-ghost \
|
||||
-x zdtm/static/sk-unix01 \
|
||||
-x zdtm/static/sk-unix01-seqpacket \
|
||||
-x zdtm/static/socket-tcpbuf \
|
||||
-x zdtm/static/socket-tcpbuf6 \
|
||||
-x zdtm/static/sockets00 \
|
||||
-x zdtm/static/sockets00-seqpacket \
|
||||
-x zdtm/static/sockets03 \
|
||||
-x zdtm/static/sockets03-seqpacket \
|
||||
-x zdtm/static/cgroup04 \
|
||||
-x zdtm/static/cgroup_ifpriomap \
|
||||
-x zdtm/static/netns_sub \
|
||||
-x zdtm/static/netns_sub_veth \
|
||||
-x zdtm/static/file_locks01 \
|
||||
-x zdtm/static/mntns_link_remap \
|
||||
-x zdtm/static/unlink_fstat03 \
|
||||
-x zdtm/static/unlink_regular00 \
|
||||
-x zdtm/static/cgroup02 "
|
||||
|
||||
run_test() {
|
||||
python3 ./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \
|
||||
./zdtm.py run --criu-bin /usr/sbin/criu ${EXCLUDES} \
|
||||
-a --ignore-taint --keep-going
|
||||
|
||||
RESULT=$?
|
||||
|
|
@ -48,13 +30,17 @@ run_test() {
|
|||
|
||||
RESULT=42
|
||||
|
||||
# this socket breaks CRIU's test cases
|
||||
# F30, F29 do not provide python -> python3 symlink
|
||||
test -e /usr/bin/python || ln -sf /usr/bin/python3 /usr/bin/python
|
||||
python -V
|
||||
|
||||
# this socket brakes CRIU's test cases
|
||||
rm -f /var/lib/sss/pipes/nss
|
||||
|
||||
cd ../criu-$(crit --version)
|
||||
cd source
|
||||
|
||||
echo "Build CRIU"
|
||||
make -j"$(nproc)"
|
||||
make
|
||||
|
||||
cd test
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,21 @@
|
|||
/zdtm:
|
||||
summary: Test zdtm
|
||||
test: ./run-zdtm.sh
|
||||
duration: 30m
|
||||
require:
|
||||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-source
|
||||
tags:
|
||||
- classic
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- podman
|
||||
- curl
|
||||
- jq
|
||||
- checkpolicy
|
||||
- policycoreutils
|
||||
- make
|
||||
- gcc
|
||||
- python3
|
||||
- coreutils
|
||||
- libnet-devel
|
||||
- protobuf-devel
|
||||
- protobuf-c-devel
|
||||
|
|
@ -16,17 +23,14 @@
|
|||
- libnl3-devel
|
||||
- libcap-devel
|
||||
- libaio-devel
|
||||
- libuuid-devel
|
||||
- nftables-devel
|
||||
- python3-pyyaml
|
||||
- python3-protobuf
|
||||
- python-unversioned-command
|
||||
- crit
|
||||
- python3-criu
|
||||
/podman:
|
||||
summary: Test podman
|
||||
test: ./run-podman-checkpoint-restore.sh
|
||||
require:
|
||||
- podman
|
||||
- curl
|
||||
- jq
|
||||
tests:
|
||||
- zdtm:
|
||||
dir: .
|
||||
run: ./run-zdtm.sh
|
||||
- podman:
|
||||
dir: .
|
||||
run: ./run-podman-checkpoint-restore.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue