-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[draft] support of bindmounted unix dgram sockets #1001
base: criu-dev
Are you sure you want to change the base?
[draft] support of bindmounted unix dgram sockets #1001
Commits on Jan 24, 2020
-
remote: Remove unused constants
Drop the constants for default cache host/port and page size because they are not used anywhere. Signed-off-by: Radostin Stoyanov <[email protected]> Reviewed-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36b628b - Browse repository at this point
Copy the full SHA 36b628bView commit details -
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1a8c654 - Browse repository at this point
Copy the full SHA 1a8c654View commit details -
criu: fix leaks detected by coverity scan
1) fix sfle memory leak on get_fle_for_scm error 2) fix gfd open descriptor leak on get_fle_for_scm error 3-6) fix buf memory leak on read and pwrite errors Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for be22689 - Browse repository at this point
Copy the full SHA be22689View commit details -
test: make zdtm.py python2/python3 compatible
Cc: Adrian Reber <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 91babe7 - Browse repository at this point
Copy the full SHA 91babe7View commit details -
crtools: image-{cache, proxy} requires address/port
Show error message when image-{cache,proxy} is called without --port and image-proxy without --address argument. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2df652d - Browse repository at this point
Copy the full SHA 2df652dView commit details -
criu/sk-packet.c:443:3: error: 'strncpy' output may be truncated copying 14 bytes from a string of length 15 strncpy(addr_spkt.sa_data, req.ifr_name, sa_data_size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/img-remote.c:383:3: error: 'strncpy' specified bound 4096 equals destination size strncpy(snapshot_id, li->snapshot_id, PATHLEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/img-remote.c:384:3: error: 'strncpy' specified bound 4096 equals destination size strncpy(path, li->name, PATHLEN); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/files.c:288:3: error: 'strncpy' output may be truncated copying 4095 bytes from a string of length 4096 strncpy(buf, link->name, PATH_MAX - 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/sk-unix.c:239:36: error: '/' directive output may be truncated writing 1 byte into a region of size between 0 and 4095 snprintf(path, sizeof(path), ".%s/%s", dir, sk->name); ^ criu/sk-unix.c:239:3: note: 'snprintf' output 3 or more bytes (assuming 4098) into a destination of size 4096 snprintf(path, sizeof(path), ".%s/%s", dir, sk->name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/mount.c:2563:3: error: 'strncpy' specified bound 4096 equals destination size strncpy(path, m->mountpoint, PATH_MAX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ criu/cr-restore.c:3647:2: error: 'strncpy' specified bound 16 equals destination size strncpy(task_args->comm, core->tc->comm, sizeof(task_args->comm)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 62c6539 - Browse repository at this point
Copy the full SHA 62c6539View commit details -
remote: don't read from pointer after free
CID 190778 (checkpoint-restore#1 of 1): Read from pointer after free (USE_AFTER_FREE) 7. deref_after_free: Dereferencing freed pointer rop. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f2054ba - Browse repository at this point
Copy the full SHA f2054baView commit details -
img-proxy: Remove duplicated include
Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d170cca - Browse repository at this point
Copy the full SHA d170ccaView commit details -
remote: Merge check_pending_{reads,forwards}
Both functions check_pending_forwards() and check_pending_reads() have very similar functionality. This patch aims to reduce the duplication of code by merging both functions into check_pending() Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 383da03 - Browse repository at this point
Copy the full SHA 383da03View commit details -
remote: Replace PATHLEN with PATH_MAX
The macro PATHLEN is redundant. It is defined such that its replacement token sequence is the token PATH_MAX. Signed-off-by: Radostin Stoyanov <[email protected]> Acked-by: Adrian Reber <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 69ed736 - Browse repository at this point
Copy the full SHA 69ed736View commit details -
remote: Refactor TCP server setup
The function `setup_TCP_server_socket` (defined in img-remote.c) and `setup_tcp_server` (defined in util.c) have very similar functionality. Replace setup_TCP_server_socket() with setup_tcp_server() to reduce code duplication and to enable IPv6 support for the image-cache action of CRIU. We set SO_REUSEADDR flag to allow reuse of local addresses. Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 68d4924 - Browse repository at this point
Copy the full SHA 68d4924View commit details -
remote: Refactor TCP client setup
Remove setup_TCP_client_socket() and use setup_tcp_server() instead as both functions have very similar functionality. Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a713c2c - Browse repository at this point
Copy the full SHA a713c2cView commit details -
remote: pull_snapshot_ids: Simplify if condition
Check only once if (sockfd < 0) Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b99a274 - Browse repository at this point
Copy the full SHA b99a274View commit details -
remote: Use tmp file buffer when restore ip dump
When CRIU calls the ip tool on restore, it passes the fd of remote socket by replacing the STDIN before execvp. The stdin is used by the ip tool to receive input. However, the ip tool calls ftell(stdin) which fails with "Illegal seek" since UNIX sockets do not support file positioning operations. To resolve this issue, read the received content from the UNIX socket and store it into temporary file, then replace STDIN with the fd of this tmp file. # python test/zdtm.py run -t zdtm/static/env00 --remote -f ns === Run 1/1 ================ zdtm/static/env00 ========================= Run zdtm/static/env00 in ns ========================== Start test ./env00 --pidfile=env00.pid --outfile=env00.out --envname=ENV_00_TEST Adding image cache Adding image proxy Run criu dump Run criu restore =[log]=> dump/zdtm/static/env00/31/1/restore.log ------------------------ grep Error ------------------------ RTNETLINK answers: File exists (00.229895) 1: do_open_remote_image RDONLY path=route-9.img snapshot_id=dump/zdtm/static/env00/31/1 (00.230316) 1: Running ip route restore Failed to restore: ftell: Illegal seek (00.232757) 1: Error (criu/util.c:712): exited, status=255 (00.232777) 1: Error (criu/net.c:1479): IP tool failed on route restore (00.232803) 1: Error (criu/net.c:2153): Can't create net_ns (00.255091) Error (criu/cr-restore.c:1177): 105 killed by signal 9: Killed (00.255307) Error (criu/mount.c:2960): mnt: Can't remove the directory /tmp/.criu.mntns.dTd7ak: No such file or directory (00.255339) Error (criu/cr-restore.c:2119): Restoring FAILED. ------------------------ ERROR OVER ------------------------ ################# Test zdtm/static/env00 FAIL at CRIU restore ################## ##################################### FAIL ##################################### Fixes checkpoint-restore#311 Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3b9babc - Browse repository at this point
Copy the full SHA 3b9babcView commit details -
python: Replace xrange with range
In Py2 `range` returns a list and `xrange` creates a sequence object that evaluates lazily. In Py3 `range` is equivalent to `xrange` in Py2. Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ae5a850 - Browse repository at this point
Copy the full SHA ae5a850View commit details -
image: fix typo in debug message
Signed-off-by: Pavel Tikhomirov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2fffe9c - Browse repository at this point
Copy the full SHA 2fffe9cView commit details -
py: Reformat everything into pep8 style
As discussed on the mailing list, current .py files formatting does not conform to the world standard, so we should better reformat it. For this the yapf tool is used. The command I used was yapf -i $(find -name *.py) Signed-off-by: Pavel Emelyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 85f1a3e - Browse repository at this point
Copy the full SHA 85f1a3eView commit details -
Most of the typos were found by codespell. Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0dbf262 - Browse repository at this point
Copy the full SHA 0dbf262View commit details -
This patch does not introduce any functional changes. Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 88c337e - Browse repository at this point
Copy the full SHA 88c337eView commit details -
img-cache: Drop unnecessary accept_proxy_to_cache
The function accept_proxy_to_cache() is a wrapper around accept(). Use accept() directly instead. Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 96a823e - Browse repository at this point
Copy the full SHA 96a823eView commit details -
img-cache/proxy: Close sockets on failure
Signed-off-by: Radostin Stoyanov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66f2f31 - Browse repository at this point
Copy the full SHA 66f2f31View commit details -
remote: Drop unused PB_LOCAL_IMAGE_SIZE
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2c44c3 - Browse repository at this point
Copy the full SHA d2c44c3View commit details -
remote: Introduce strflags() macro
Reduce code duplication by introducing a strflags() macro which maps a flag to corresponding string. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a539277 - Browse repository at this point
Copy the full SHA a539277View commit details -
remote: Fix stringop-truncation warning
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7223ac7 - Browse repository at this point
Copy the full SHA 7223ac7View commit details -
remote: Fix 'flags' maybe uninitialized warning
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0a58954 - Browse repository at this point
Copy the full SHA 0a58954View commit details -
remote: Make private functions static
This patch makes various private variables and procedures static. These changes conform to the following code style conventions: When declaring pointer data or a function that returns a pointer type, the preferred use of ``*`` is adjacent to the data name or function name and not adjacent to the type name. Statements longer than 80 columns will be broken into sensible chunks, unless exceeding 80 columns significantly increases readability and does not hide information. Descendants are always substantially shorter than the parent and are placed substantially to the right. The same applies to function headers with a long argument list. from https://www.kernel.org/doc/Documentation/process/coding-style.rst The function declarations {send,recv}_image() from img-remote.h are removed because they do not have a corresponding implementation. The following functions are made static because they are not used outside img-remote.c: * {send,recv}_image_async() * {read,write}_remote_header() * socket_set_non_blocking() Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3058b3f - Browse repository at this point
Copy the full SHA 3058b3fView commit details -
remote: Use xmalloc/xzalloc/xfree
There is no need to print an error message, __xalloc() does that. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2d254c - Browse repository at this point
Copy the full SHA d2d254cView commit details -
remote: Ignore interupt signals
When an interrupt signal (even SIGWINCH when strace is used) is received while epoll_wait() sleeps, it will return a value of -1 and set errno to EINTR, which is not an error and should be ignored. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f63b26 - Browse repository at this point
Copy the full SHA 7f63b26View commit details -
util: Don't pass address/port as arguments
There is no need to pass the values for address and port as arguments when creating a TCP server. The external `opts` object, which provides opts.addr and opts.port, is accessible in all components that require these values. With this change, a value specified with the `--address` option will used by image-cache in the same way as with page-server. Example: criu image-cache --address 127.0.0.1 --port 1234 criu page-server --address 127.0.0.1 --port 1234 Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f428d30 - Browse repository at this point
Copy the full SHA f428d30View commit details -
remote: Rename 'proxy_to_cache_fd' to 'remote_sk'
The variable name 'remote_sk' is shorter than 'proxy_to_cache_fd' and it is more similar to 'page_server_sk' (used in criu/page-xfer.c). Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a37a02d - Browse repository at this point
Copy the full SHA a37a02dView commit details -
remote: Rename 'local_req_fd' to 'local_sk'
The name 'local_sk' is shorter than 'local_req_fd', and it is more similar to the name 'page_server_sk' used in criu/page-xfer.c Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c64f657 - Browse repository at this point
Copy the full SHA c64f657View commit details -
util: Fix addr casting for IPv4/IPv6 in autobind
When saddr.ss_family is AF_INET6 we should cast &saddr to (struct sockaddr_in6 *). Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 75dead1 - Browse repository at this point
Copy the full SHA 75dead1View commit details -
util: Introduce fd_set_nonblocking()
Combine the functionality of socket_set_non_blocking() and socket_set_blocking() into a new function, and move it in criu/util.c to enable reusability throughout the code base. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f665d8 - Browse repository at this point
Copy the full SHA 2f665d8View commit details -
remote: Use \0 as indicator for a "finish" msg
Combine the macro constants DUMP_FINISH and RESTORE_FINISH, into a single one, called FINISH. In addition, replace the key-word strings used by the above-mentioned constants, and NULL_SNAPSHOT_ID, with a \0 character that will be used to indicate a "finish" message. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 047b127 - Browse repository at this point
Copy the full SHA 047b127View commit details -
Sort and remove unused/unnecessary include statements in criu/img-*.c Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 861510f - Browse repository at this point
Copy the full SHA 861510fView commit details -
util: Remove deprecated print_data() routine
The print_data() function was part of the deprecated (and removed) 'show' action, and it was moved in util.c with the following commit: a501b48 The 'show' action has been deprecated since 1.6, let's finally drop it. The print_data() routine is kept for yet another (to be deprecated too) feature called 'criu exec'. The criu exec feature was removed with: 909590a Remove criu exec code It's now obsoleted by compel library. Maybe-TODO: Add compel tool exec action? Therefore, now we can drop print_data() as well. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 48ff3f1 - Browse repository at this point
Copy the full SHA 48ff3f1View commit details -
criu-ns: Convert to python3 style print() syntax
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 83cb0c0 - Browse repository at this point
Copy the full SHA 83cb0c0View commit details -
criu-ns: Print usage info when no args provided
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3846d16 - Browse repository at this point
Copy the full SHA 3846d16View commit details -
criu-ns: Convert c_char_p strings to bytes object
class ctypes.c_char_p Represents the C char * datatype when it points to a zero- terminated string. For a general character pointer that may also point to binary data, POINTER(c_char) must be used. The constructor accepts an integer address, or a bytes object. https://docs.python.org/3/library/ctypes.html#ctypes.c_char_p Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 50b1a49 - Browse repository at this point
Copy the full SHA 50b1a49View commit details -
There are a few places where spaces have been used instead of tabs for indentation. This patch converts the spaces to tabs for consistency with the rest of the code base. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 38a9b23 - Browse repository at this point
Copy the full SHA 38a9b23View commit details -
net: fix coverity RESOURCE_LEAK
criu-3.12/criu/net.c:2043: overwrite_var: Overwriting "img" in "img = open_image_at(-1, CR_FD_IP6TABLES, 0UL, pid)" leaks the storage that "img" points to. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 13d2868 - Browse repository at this point
Copy the full SHA 13d2868View commit details -
py: Manual fixlets of code formatting
Signed-off-by: Pavel Emelyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fe9ad62 - Browse repository at this point
Copy the full SHA fe9ad62View commit details -
files-reg: Drop clear_ghost_files() prototype
The function clear_ghost_files() has been removed in commit b11eeea "restore: auto-unlink for ghost files (v2)". Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a981ddf - Browse repository at this point
Copy the full SHA a981ddfView commit details -
cr-dump: Remove redundant if-statement
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cf7e7fc - Browse repository at this point
Copy the full SHA cf7e7fcView commit details -
arch/x86: push correct eip on the stack before lretq
Right now we use pushq, but it pushes sign-extended value, so if the parasite code is placed higher that 2Gb, we will see something like this: 0xf7efd5b0: pushq $0x23 0xf7efd5b2: pushq $0xfffffffff7efd5b9 => 0xf7efd5b7: lretq Actually we want to push 0xf7efd5b9 instead of 0xfffffffff7efd5b9. Fixes: checkpoint-restore#398 Cc: Dmitry Safonov <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]> Acked-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 024bb21 - Browse repository at this point
Copy the full SHA 024bb21View commit details -
compel/x86: Don't use pushq for a label
`pushq` sign-extends the value. Which is a bummer as the label's address may be higher that 2Gb, which means that the sign-bit will be set. As it long-jumps with ia32 selector, %r11 can be scratched. Use %r11 register as a temporary to push the 32-bit address. Complements: a9a7602 ("arch/x86: push correct eip on the stack before lretq") Cc: Cyrill Gorcunov <[email protected]> Reported-by: Andrei Vagin <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 266db50 - Browse repository at this point
Copy the full SHA 266db50View commit details -
scripts: Drop Fedora 28/rawhide fix
This change was introduced with c75cb2b and it is no longer necessary. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bdee0a7 - Browse repository at this point
Copy the full SHA bdee0a7View commit details -
Add new command line option: --cgroup-yard
Instead of creating cgroup yard in CRIU, now we can create it externally and pass it to CRIU. Useful if somebody doesn't want to grant CAP_SYS_ADMIN to CRIU. Signed-off-by: Michał Cłapiński <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f3caa7f - Browse repository at this point
Copy the full SHA f3caa7fView commit details -
test: implement test for new --cgroup-yard option
Signed-off-by: Michał Cłapiński <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10fb1cf - Browse repository at this point
Copy the full SHA 10fb1cfView commit details -
travis: Install missing diffutils dependency
The following tests fail in Fedora rawhide because /usr/bin/diff is missing. * zdtm/static/bridge(ns) * zdtm/static/cr_veth(uns) * zdtm/static/macvlan(ns) * zdtm/static/netns(uns) * zdtm/static/netns-nf(ns) * zdtm/static/sit(ns) Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cc1fcfa - Browse repository at this point
Copy the full SHA cc1fcfaView commit details -
arch/x86: fpu_state->fpu_state_ia32.xsave hast to be 64-byte aligned
Before the 5.2 kernel, only fpu_state->fpu_state_64.xsave has to be 64-byte aligned. But staring with the 5.2 kernel, the same is required for pu_state->fpu_state_ia32.xsave. The behavior was changed in: c2ff9e9a3d9d ("x86/fpu: Merge the two code paths in __fpu__restore_sig()") Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cf54e13 - Browse repository at this point
Copy the full SHA cf54e13View commit details -
Introduce flush_early_log_to_stderr destructor
Prior log initialisation CRIU preserves all (early) log messages in a buffer. In case of error the content of the content of this buffer needs to be printed out (flushed). Suggested-by: Dmitry Safonov <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 463227b - Browse repository at this point
Copy the full SHA 463227bView commit details -
Convert pr_msg() error messages to pr_err()
Print error messages to stderr (instead of stdout). Suggested-by: Andrei Vagin <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8d2a56a - Browse repository at this point
Copy the full SHA 8d2a56aView commit details -
test/cgroup_yard: always clean up a test cgroup yard
Right now it is cleaned up from a post-restore hook, but zdtm.py can be executed with the norst option: $ zdtm.py run -t zdtm/static/cgroup_yard --norst ... OSError: [Errno 17] File exists: 'external_yard' Cc: Michał Cłapiński <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e03d51 - Browse repository at this point
Copy the full SHA 3e03d51View commit details -
zdtm/cgroup_yard: create a test cgroup yard from the post-start hook
Right now, it is created from the pre-dump hook, but if the --snap option is set, the test fails: $ python test/zdtm.py run -t zdtm/static/cgroup_yard -f h --snap --iter 3 ... Running zdtm/static/cgroup_yard.hook(--pre-dump) Traceback (most recent call last): File zdtm/static/cgroup_yard.hook, line 14, in <module> os.mkdir(yard) OSError: [Errno 17] File exists: 'external_yard' Cc: Michał Cłapiński <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 78f70bd - Browse repository at this point
Copy the full SHA 78f70bdView commit details -
1) s/\s*$// 2) fix snprintf out of bound access Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bd80be8 - Browse repository at this point
Copy the full SHA bd80be8View commit details -
pipe: print pipe_id as unsigned to generate an external pipe name
Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7df16f9 - Browse repository at this point
Copy the full SHA 7df16f9View commit details -
unix: print inode numbers as unsigned int
Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1816886 - Browse repository at this point
Copy the full SHA 1816886View commit details -
1) Instead of tampering with the nr argument, do_full_int80() returns the value of the system call. It also avoids copying all registers back into the syscall_args32 argument after the syscall. 2) Additionally, the registers r12-r15 were added in the list of clobbers as kernels older than v4.4 do not preserve these. 3) Further, GCC uses a 128-byte red-zone as defined in the x86_64 ABI optimizing away the correct position of the %rsp register in leaf-functions. We now avoid tampering with the red-zone, fixing a SIGSEGV when running mmap_bug_test() in debug mode (DEBUG=1). Signed-off-by: Nicolas Viennot <[email protected]> Reviewed-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fdbaf4a - Browse repository at this point
Copy the full SHA fdbaf4aView commit details -
restorer/inotify: Don't overflow PIE stack
PATH_MAX == 4096; PATH_MAX*8 == 32k; RESTORE_STACK_SIZE == 32k. Fixes: a3cdf94 ("inotify: cleanup auxiliary events from queue") Cc: Pavel Tikhomirov <[email protected]> Cc: Andrei Vagin <[email protected]> Co-debugged-with: Andrei Vagin <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36e1da9 - Browse repository at this point
Copy the full SHA 36e1da9View commit details -
Two modes of pre-dump algorithm: 1) splicing memory by parasite --pre-dump-mode=splice (default) 2) using process_vm_readv syscall --pre-dump-mode=read Signed-off-by: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e515ef0 - Browse repository at this point
Copy the full SHA e515ef0View commit details -
Handling iov generation for non-PROT_READ regions
Skip iov-generation for regions not having PROT_READ, since process_vm_readv syscall can't process them during "read" pre-dump. Handle random order of "read" & "splice" pre-dumps. Signed-off-by: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1c673f3 - Browse repository at this point
Copy the full SHA 1c673f3View commit details -
Skip adding PROT_READ to non-PROT_READ mappings
"read" mode pre-dump may fail even after adding PROT_READ flag. Adding PROT_READ works when dumping statically. See added comment for details. Signed-off-by: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb504a8 - Browse repository at this point
Copy the full SHA bb504a8View commit details -
Adding cnt_sub for stats manipulation
adding cnt_sub function (complement of cnt_add). cnt_sub is utilized to decrement stats counter according to skipped page count during "read" mode pre-dump. Signed-off-by: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cce4019 - Browse repository at this point
Copy the full SHA cce4019View commit details -
read mode pre-dump implementation
Pre-dump using the process_vm_readv syscall. During frozen state, only iovecs will be generated and draining of memory happens after the task is unfrozen. Pre-dumping of shared memory remains unmodified. Signed-off-by: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a39e7a9 - Browse repository at this point
Copy the full SHA a39e7a9View commit details -
Refactor time accounting macros
refactoring time macros as per read mode pre-dump design. Signed-off-by: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0b56cdc - Browse repository at this point
Copy the full SHA 0b56cdcView commit details -
zdtm: handle --pre-dump-mode in the rpc mode
Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 55bcadb - Browse repository at this point
Copy the full SHA 55bcadbView commit details -
lib/c: fix a compile time error
lib/c/criu.c:343:30: error: implicit conversion from enumeration type 'enum criu_pre_dump_mode' to different enumeration type 'CriuPreDumpMode' (aka 'enum _CriuPreDumpMode') [-Werror,-Wenum-conversion opts->rpc->pre_dump_mode = mode; ~ ^~~~ Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4b9bcba - Browse repository at this point
Copy the full SHA 4b9bcbaView commit details -
criu: use atomic_add instead of atomic_sub
atomic_sub isn't defined for all platforms. Reported-by: Mr Jenkins Cc: Abhishek Dubey <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 31e47a5 - Browse repository at this point
Copy the full SHA 31e47a5View commit details -
image: avoid name conflicts in image files
Conflict register for file "sk-opts.proto": READ is already defined in file "rpc.proto". Please fix the conflict by adding package name on the proto file, or use different name for the duplication. Note: enum values appear as siblings of the enum type instead of children of it. checkpoint-restore#815 Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 141e697 - Browse repository at this point
Copy the full SHA 141e697View commit details -
Guard against empty file lock status
The lock status string may be empty. This can happen when the owner of the lock is invisible from our PID namespace. This unfortunate behavior is fixed in kernels v4.19 and up (see commit 1cf8e5de40) Signed-off-by: Nicolas Viennot <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 919f4e7 - Browse repository at this point
Copy the full SHA 919f4e7View commit details -
page-pipe: Resize up to PIPE_MAX_SIZE
When performing pre-dump we continuously increase the page-pipe size to fit the max amount memory pages in the pipe's buffer. However, we never actually set the pipe's buffer size to max. By doing so, we can reduce the number of pipe-s necessary for pre-dump and improve the performance as shown in the example below. For example, let's consider the following process: #include <stdio.h> #include <stdlib.h> #include <unistd.h> void main(void) { int i = 0; void *cache = calloc(1, 1024 * 1024 * 1024); while(1) { printf("%d\n", i++); sleep(1); } } stats-dump before this change: frozen_time: 123538 memdump_time: 95344 memwrite_time: 11980078 pages_scanned: 262721 pages_written: 262169 page_pipes: 513 page_pipe_bufs: 519 stats-dump after this change: frozen_time: 83287 memdump_time: 54587 memwrite_time: 12547466 pages_scanned: 262721 pages_written: 262169 page_pipes: 257 page_pipe_bufs: 263 Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 40b5731 - Browse repository at this point
Copy the full SHA 40b5731View commit details -
cgroup: fix cg_yard leak on error path in prepare_cgroup_sfd
Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 48ae837 - Browse repository at this point
Copy the full SHA 48ae837View commit details -
image-desc: Remove CR_FD_FILE_LOCKS_PID
The support for per-pid images with locks has been dropped with commit d040219 ("locks: Drop support for per-pid images with locks") and CR_FD_FILE_LOCKS_PID is not used. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 196551b - Browse repository at this point
Copy the full SHA 196551bView commit details -
service: Use space on stack for msg buffer
RPC messages are have fairly small size and using space on the stack might be a better option. This change follows the pattern used with do_pb_read_one() and pb_write_one(). Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 91a5cad - Browse repository at this point
Copy the full SHA 91a5cadView commit details -
Couple of fixes to build and run libcriu tests
libcriu tests are currently broken. This patch fixes couple of issues to allow the building and running libcriu tests. 1. lib/c/criu.h got updated to include version.h which is present at "criu/include", but the command to compile libcriu tests is not specifying "criu/include" in the path to be searched for header files. This resulted in compilation error. This can be fixed by adding "-I ../../../../../criu/criu/include" however it causes more problems as "criu/include/fcntl.h" would now hide system defined fcntl.h Solution is to use "-iquote ../../../../../criu/criu/include" which applies only to the quote form of include directive. 2. Secondly, libcriu.so major version got updated to 2 but libcriu/run.sh still assumes verion 1. Instead of just updating the version in libcriu/run.sh to 2, this patch updates the libcriu/Makefile to use "CRIU_SO_VERSION_MAJOR" so that future changes to major version of libcriu won't cause same problem again. Signed-off-by: Ashutosh Mehra <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee96348 - Browse repository at this point
Copy the full SHA ee96348View commit details -
Enable libcriu testing in travis jobs
Updated scripts/travis/travis-tests to run libcriu test. Signed-off-by: Ashutosh Mehra <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4c1350d - Browse repository at this point
Copy the full SHA 4c1350dView commit details -
Add
criu
to PATH env variable in libcriu testsPATH is pointing to incorrect location for `criu` executable causing libcriu tests to fail when running in travis. Also added statements to display log file contents on failure to help in debugging. Signed-off-by: Ashutosh Mehra <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 870eaa5 - Browse repository at this point
Copy the full SHA 870eaa5View commit details -
early-log: Print warnings only if the buffer is full
I don't see many issues with early-log, so we probably don't need the warning when it was used. Note that after commit 74731d9 ("zdtm: make grep_errors also grep warnings") also warnings are grepped by zdtm.py (and I believe that was an improvement) which prints some bothering lines: > =[log]=> dump/zdtm/static/inotify00/38/1/dump.log > ------------------------ grep Error ------------------------ > (00.000000) Will allow link remaps on FS > (00.000034) Warn (criu/log.c:203): The early log isn't empty > ------------------------ ERROR OVER ------------------------ Instead of decreasing loglevel of the message, improve it by reporting a real issue. Cc: Adrian Reber <[email protected]> Cc: Pavel Tikhomirov <[email protected]> Cc: Radostin Stoyanov <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 99049e2 - Browse repository at this point
Copy the full SHA 99049e2View commit details -
Action scripts should be invoked with normal signal behavior
Signal masks propagate through execve, so we need to clear them before invoking the action scripts as it may want to handle SIGCHLD, or SIGSEGV. Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 48c9672 - Browse repository at this point
Copy the full SHA 48c9672View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d6e92a - Browse repository at this point
Copy the full SHA 0d6e92aView commit details -
travis: start to use aarch64 hardware
With the newly introduced aarch64 at Travis it is possible for the CRIU test-cases to switch to aarch64. Travis uses unprivileged LXD containers on aarch64 which blocks many of the kernel interfaces CRIU needs. So for now this only tests building CRIU natively on aarch64 instead of using the Docker+QEMU combination. All tests based on Docker are not working on aarch64 is there currently seems to be a problem with Docker on aarch64. Maybe because of the nesting of Docker in LXD. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c28e3b8 - Browse repository at this point
Copy the full SHA c28e3b8View commit details -
test/static:conntracks: Support nftables
Update test to support both iptables and nft to create conntrack rules. Signed-off-by: Vitaly Ostrosablin <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2bb53e7 - Browse repository at this point
Copy the full SHA 2bb53e7View commit details -
Signed-off-by: Nidhi Gupta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a43ea01 - Browse repository at this point
Copy the full SHA a43ea01View commit details -
travis: Disallow failures on ia32
It seems pretty stable and hasn't add many false-positives during last months. While can reveal some issues for compatible C/R code. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 72d44f8 - Browse repository at this point
Copy the full SHA 72d44f8View commit details -
mount: remove useless check in populate_mnt_ns
The path: restore_root_task prepare_namespace_before_tasks mntns_maybe_create_roots is always called before the path below: retore_root_task fork_with_pid restore_task_with_children prepare_namespace prepare_mnt_ns populate_mnt_ns So (!!mnt_roots) == (root_ns_mask & CLONE_NEWNS) in populate_mnt_ns, but in prepare_mnt_ns we've already checked that it is true, so there is no need in these check - remove it. Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d125c2b - Browse repository at this point
Copy the full SHA d125c2bView commit details -
It's never used outside of namespaces.c Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 53b22e4 - Browse repository at this point
Copy the full SHA 53b22e4View commit details -
ns/restore/image: do not read namespace images for non-namespaced case
Images for mount and net namespaces are empty if ns does not belong to us, thus we don't need to collect on restore. By adding these checks we will eliminate suspicious messages in logs about lack of images: ./test/zdtm.py run -k always -f h -t zdtm/static/env00 env00/54/2/restore.log:(00.000332) No mountpoints-5.img image env00/54/2/restore.log:(00.000342) No netns-2.img image Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 743cb26 - Browse repository at this point
Copy the full SHA 743cb26View commit details -
mount: rework mount tree build step on restore
Build each mntns mount tree alone just after reading mounts for it from image. These additional step before merging everything to a single mount tree allows us to have pointers to each mntns root mount at hand, also it allows us to remove extra complication from mnt_build_tree. Teach collect_mnt_from_image return a tail pointer, so we can merge lists together later after building each tree. Add separate merge_mount_trees helper to create joint mount tree for all mntns'es and simplify mnt_build_ids_tree. I don't see any place where we use mntinfo_tree on restore, so save the real root of mntns mounts tree in it, instead of root_yard_mp, will need it in next patches for checking restore of these trees. v2: prepend children to the root_yard in merge_mount_trees so that the order in merged tree persists Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 74faa96 - Browse repository at this point
Copy the full SHA 74faa96View commit details -
mount: make mnt_resort_siblings nonrecursive and reuse friendly
Add mnt_subtree_next DFS-next search to remove recursion. v5: add these patch, remove recursion from sorting helpers v6: rip out butifull yet unused step-part of nfs-next algorithm Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8529a48 - Browse repository at this point
Copy the full SHA 8529a48View commit details -
Run java functional tests on travis
Signed-off-by: Nidhi Gupta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7cc9a72 - Browse repository at this point
Copy the full SHA 7cc9a72View commit details -
travis: fix copy paste error from previous commit
In my previous commit I copied a line with a return into the main script body. bash can only return from functions. This changes return to exit. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7cdca4c - Browse repository at this point
Copy the full SHA 7cdca4cView commit details -
travis: Do not run privileged containers in LXD
Travis uses unprivileged containers for aarch64 in LXD. Docker with '--privileged' fails in such situation. This changes the travis setup to only start docker with '--privileged' if running on x86_64. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e98fe21 - Browse repository at this point
Copy the full SHA e98fe21View commit details -
Makefile hack for travis aarch64/armv8l
For CRIU's compile only tests for armv7hf on Travis we are using 'setarch linux32' which returns armv8l on Travis aarch64. This adds a path in the Makefile to treat armv8l just as armv7hf during compile. This enables us to run armv7hf compile tests on Travis aarch64 hardware. Much faster. Maybe not entirely correct, but probably good enough for compile testing in an armv7hf container. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f7c5bc8 - Browse repository at this point
Copy the full SHA f7c5bc8View commit details -
travis: switch all arm related tests to real hardware
This switches all arm related tests (32bit and 64bit) to the aarch64 systems Travis provides. For arm32 we are running in a armv7hf container on aarch64 with 'setarch linux32'. The main changes are that docker on Travis aarch64 cannot use '--privileged' as Travis is using unprivileged LXD containers to setup the testing environment. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f1fb1b - Browse repository at this point
Copy the full SHA 6f1fb1bView commit details -
travis: switch pcp64le and s390x to real hardware
Now that Travis also supports ppc64le and s390x we can remove all qemu based docker emulation from our test setup. This now runs ppc64le and s390x tests on real hardware (LXD containers). Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 524263e - Browse repository at this point
Copy the full SHA 524263eView commit details -
travis: remove group from .travis.yml
Tests are successful even after removing 'group:' from .travis.yml. Apparently it is not necessary. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 025f8d9 - Browse repository at this point
Copy the full SHA 025f8d9View commit details -
lib/ptrace: Allow PTRACE_PEEKDATA with errno != 0
>From man ptrace: > On error, all requests return -1, and errno is set appropriately. > Since the value returned by a successful PTRACE_PEEK* request may be > -1, the caller must clear errno before the call, and then check > it afterward to determine whether or not an error occurred. FWIW: if ptrace_peek_area() is called with (errno != 0) it may false-fail if the data is (-1). Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 05b078f - Browse repository at this point
Copy the full SHA 05b078fView commit details -
lib/ptrace: Be more elaborate about failures
Also, don't use the magic -2 => return errno on failure. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c19c153 - Browse repository at this point
Copy the full SHA c19c153View commit details -
compel/infect: Warn if close() failed on memfd
As a preparation for __must_check on compel_syscall(), check it on close() too - maybe not as useful as with other syscalls, but why not. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 038f3eb - Browse repository at this point
Copy the full SHA 038f3ebView commit details -
compel: Mark compat argument of __NR() as used
And remove __maybe_unused work-around. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for eda9a11 - Browse repository at this point
Copy the full SHA eda9a11View commit details -
lib/infect: Check if compel succeed in executing munmap
Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0020f2a - Browse repository at this point
Copy the full SHA 0020f2aView commit details -
cr-dump: Try to cure remote on err-pathes
On daemon stop or threads dump failures it's still desired to remove parasite from the remote (if possible). Try best and keep hopeing. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0998ac6 - Browse repository at this point
Copy the full SHA 0998ac6View commit details -
cr-dump: Warn if unmapping local memfd failed
Probably, not the worst that could happen, but still unexpected. Preparing the ground to make compel_cure*() functions __must_check. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 341d781 - Browse repository at this point
Copy the full SHA 341d781View commit details -
cr-restore: Warn if restorer can't be unmapped
Too late to stop restore: it's already printed that restore was successful. Oh, well warn aloud about infection. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0a4d747 - Browse repository at this point
Copy the full SHA 0a4d747View commit details -
parasite-syscall: Log if can't cure on failed infection
Maybe expected, hopefully never happens - let's warn in any case. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 281c9f3 - Browse repository at this point
Copy the full SHA 281c9f3View commit details -
compel/infect: Detach but fail compel_resume_task()
Unknown state means that the task in the end may be not in wanted state. Return err code. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9e998ad - Browse repository at this point
Copy the full SHA 9e998adView commit details -
criu: Kill tasks even when the network is unlocked
Currently if anything fails after network has been unlocked tasks aren't killed. Which doesn't work anyway: any stage sets `ret` and nothing later gets called. Which means the tasks aren't resumed properly. Furthermore, functions like catch_tasks() and compel_stop_on_syscall() return failure on the first error. Let's do the cleanup even when the network is unlocked. If we want to keep the mess and ignore failures - a cli option should be introduced for that (and existing code should be reworked with decisions what is critical and what can be ignored). Move "Restore finished successfully" message accordingly where everything is evidently good. While at here, any late failure will result not only in cleanup but in criu returning error code. Which in result makes tests to fail in such case: > ======================= Run zdtm/static/inotify04 in ns ======================== > Start test > ./inotify04 --pidfile=inotify04.pid --outfile=inotify04.out --dirname=inotify04.test > Run criu dump > =[log]=> dump/zdtm/static/inotify04/84/1/dump.log > ------------------------ grep Error ------------------------ > (00.119763) fsnotify: openable (inode match) as zdtm/static/inotify04.test/inotify-testfile > (00.119766) fsnotify: Dumping /zdtm/static/inotify04.test/inotify-testfile as path for handle > (00.119769) fsnotify: id 0x00000b flags 0x000800 > (00.119787) 88 fdinfo 5: pos: 0 flags: 4000/0 > (00.119796) Warn (criu/fsnotify.c:336): fsnotify: The 0x00000c inotify events will be dropped > ------------------------ ERROR OVER ------------------------ > Run criu restore > =[log]=> dump/zdtm/static/inotify04/84/1/restore.log > ------------------------ grep Error ------------------------ > (00.391582) 123 was stopped > (00.391667) 106 was trapped > (00.391674) 106 (native) is going to execute the syscall 11, required is 11 > (00.391697) 106 was stopped > (00.391720) Error (compel/src/lib/infect.c:1439): Task 123 is in unexpected state: b7f > (00.391736) Error (compel/src/lib/infect.c:1447): Task stopped with 11: Segmentation fault > ------------------------ ERROR OVER ------------------------ > 5: Old maps lost: set([]) > 5: New maps appeared: set([u'10000-1a000 rwxp', u'1a000-24000 rw-p']) > ############### Test zdtm/static/inotify04 FAIL at maps compare ################ > Send the 9 signal to 106 > Wait for zdtm/static/inotify04(106) to die for 0.100000 > ======================= Test zdtm/static/inotify04 PASS ======================== Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 674bd13 - Browse repository at this point
Copy the full SHA 674bd13View commit details -
All those compel functions can fail by various reasons. It may be status of the system, interruption by user or anything else. It's really desired to handle as many PIE related errors as possible otherwise it's hard to analyze statuses of parasite/restorer and the C/R process. At least warning for logs should be produced or even C/R stopped. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bcbe0af - Browse repository at this point
Copy the full SHA bcbe0afView commit details -
Checkpoint only specified controllers
Before this change CRIU would checkpoint all controllers, even the ones not specified in --cgroup-dump-controller. That becomes a problem if there's a cgroup controller on the checkpointing machine that doesn't exist on the restoring machine even if CRIU is instructed not to dump that controller. After that change everything works as expected. Signed-off-by: Michał Cłapiński <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 715a105 - Browse repository at this point
Copy the full SHA 715a105View commit details -
travis: group lazy-pages options
The amount of lazy-pages options keeps growing, let's put the common ones into a variable. Signed-off-by: Mike Rapoport <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 078efae - Browse repository at this point
Copy the full SHA 078efaeView commit details -
travis: exclude uns tests for lazy-pages on newer kernels
Kernels 5.4 and higher will restrict availability of UFFD_EVENT_FORK only for users with SYS_CAP_PTRACE. This prevents running --lazy-pages tests with 'uns' flavor. Disable 'uns' for lazy pages testing in travis for newer kernels. Signed-off-by: Mike Rapoport <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f5c8c9e - Browse repository at this point
Copy the full SHA f5c8c9eView commit details -
Suggested-by: Andrei Vagin <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4c1ff11 - Browse repository at this point
Copy the full SHA 4c1ff11View commit details -
mount: Bind-mount root via userns_call
When restoring a runc container with enabled user namespace CRIU fails to mount the specified root directory because the path is under /run/runc which is inaccessible to unprivileged users. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1b31164 - Browse repository at this point
Copy the full SHA 1b31164View commit details -
restore: Create temp proc in /tmp
When restoring a container with user namespace, CRIU fails to create a temporary directory for proc. The is because the unprivileged user that has been just restored does not have permissions to access the working directory used by CRIU. Resolves checkpoint-restore#828 Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 91884a1 - Browse repository at this point
Copy the full SHA 91884a1View commit details -
man: Describe --root option requirements
These requirements have been described in https://github.com/opencontainers/runc/blob/b133feae/libcontainer/container_linux.go#L1265 Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f23010 - Browse repository at this point
Copy the full SHA 6f23010View commit details -
zdtm: Replace if->continue with if->elif->else
Replacing the if->continue pattern with if->elif->else reduces the number of lines while preserving the logic. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 49a0fb0 - Browse repository at this point
Copy the full SHA 49a0fb0View commit details -
zdtm: Set --root path to 0700 on restore
Update zdtm tests to verify that CRIU does not require the --root path to be accessible to the unprivileged user being restored when restoring user namespace. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7b970be - Browse repository at this point
Copy the full SHA 7b970beView commit details -
SRCARCH is always equal ARCH. There are no rules when to use one or another and architectures may forget to set one of them up. No need for a second variable meaning the same and confusing people. Remove it completely. Self-correction [after some debug]: SRCARCH was different in one place: zdtm Makefile by some unintentional mistake: > ifeq ($(ARCH),arm64) > ARCH ?= aarch64 > SRCARCH ?= aarch64 > endif That meant to be "ARCH := aarch64" because "?=" would never work inside that ifeq. Fix up this part of mess too. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e7baaf1 - Browse repository at this point
Copy the full SHA e7baaf1View commit details -
It's not used anywhere now. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 70a5b0c - Browse repository at this point
Copy the full SHA 70a5b0cView commit details -
build/nmk: Provide proper SUBARCH
It's always equal ARCH and not very useful (so nothing actually uses it). Time for a change: SUBARCH now is meaningful and gives a way to detect what kind of ARCH flavor build is dealing with. Also, for cross-compiling sake don't set SUBARCH if the user supplied it. (and don't call useless uname during cross compilation) Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for da58a10 - Browse repository at this point
Copy the full SHA da58a10View commit details -
Instead of doing additional `uname -m` - use provided $(SUBARCH) to detect what architecture flavour the build should produce the result for. Fixes two things: - zdtm make now correctly supplies $(USERCFLAGS) - subtly fixes cross compilation by providing a way to specify $(SUBARCH) Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f09aba - Browse repository at this point
Copy the full SHA 1f09abaView commit details -
build/zdtm: Support cross-build
Maybe not that useful, but only little change needed. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 37eb8bf - Browse repository at this point
Copy the full SHA 37eb8bfView commit details -
build/zdtm: Makefile hack for travis aarch64/armv8l
The very same hack to build aarch32 zdtm tests on armv8 Travis-CI as in the commit dfa0a1e ("Makefile hack for travis aarch64/armv8l") Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f577270 - Browse repository at this point
Copy the full SHA f577270View commit details -
build/zdtm: Use pkg-config to find includes/libs
Helps to cross-compile zdtm tests in case somebody needs it. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3e09b0b - Browse repository at this point
Copy the full SHA 3e09b0bView commit details -
travis: Add armv7-cross as cross-compile test
Fixes: checkpoint-restore#455 Based-on-patch-by: Andrei Vagin <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c3e1157 - Browse repository at this point
Copy the full SHA c3e1157View commit details -
Documentation: Add a hint about docker build
The original/old guide probably doesn't work anymore: - the patch isn't accessible; - criu now depends on more libraries not only protobuf Still, keep it as it might be helpful for someone. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 53018af - Browse repository at this point
Copy the full SHA 53018afView commit details -
zdtm/socket-tcp-fin-wait1: Use array index fro TEST_MSG
Fixes the following compile-error: > CC socket-tcp-fin-wait1.o > socket-tcp-fin-wait1.c:144:26: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] > if (write(fd, TEST_MSG + 2, sizeof(TEST_MSG) - 2) != sizeof(TEST_MSG) - 2) { > ~~~~~~~~~^~~ > socket-tcp-fin-wait1.c:144:26: note: use array indexing to silence this warning > if (write(fd, TEST_MSG + 2, sizeof(TEST_MSG) - 2) != sizeof(TEST_MSG) - 2) { > ^ > & [ ] > 1 error generated. Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 455e8f4 - Browse repository at this point
Copy the full SHA 455e8f4View commit details -
Add File-based Java Functional Tests
Signed-off-by: Nidhi Gupta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5d451ee - Browse repository at this point
Copy the full SHA 5d451eeView commit details -
travis: ignore fails of podman-test
until it will not be fixed. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4405944 - Browse repository at this point
Copy the full SHA 4405944View commit details -
kerndat: check whether the new mount API is supported of not
Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 41bcada - Browse repository at this point
Copy the full SHA 41bcadaView commit details -
util: introduce the mount_detached_fs helper
Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cb1f602 - Browse repository at this point
Copy the full SHA cb1f602View commit details -
mount: use new mount API to open the proc file system
It doesn't require to create a temporary directory and mount the proc file system in it. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 08a86c7 - Browse repository at this point
Copy the full SHA 08a86c7View commit details -
net: use new mount API to open the sysfs file system
It doesn't require to create a temporary directory and mount the proc file system in it. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2a4fffb - Browse repository at this point
Copy the full SHA 2a4fffbView commit details -
cgroup: use new mount API to open the cgroup file system
It doesn't require to create a temporary directory and mount the proc file system in it. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e209cd6 - Browse repository at this point
Copy the full SHA e209cd6View commit details -
readme: github pull-requests is the preferred way to contribute
We will continue accepting patches. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fd4d0e6 - Browse repository at this point
Copy the full SHA fd4d0e6View commit details -
restorer/inotify: reorder inotify cleanup after waiting helpers and z…
…ombies We've seen ppoll interrupted with signal in VZ7 CT migration tests, that is because in the beggining of CR_STATE_RESTORE_SIGCHLD zombies and helpers die, and that can trigger SIGCHILDs sent to their parents. Adding additional debug (printing "Task..." for zombies and helpers) in sigchld_handler I see: (15.644339) pie: 1: Task 10718 exited, status= 0 (15.644349) pie: 1: Cleaning inotify events from 29 (15.644359) pie: 1: Cleaning inotify events from 19 (15.644367) pie: 1: Cleaning inotify events from 10 And previousely we had: (05.718449) pie: 104: Cleaning inotify events from 5 (05.718835) pie: 330: Cleaning inotify events from 3 (05.719046) pie: 1: Cleaning inotify events from 23 (05.719164) pie: 80: Cleaning inotify events from 7 (05.719185) pie: 1: Error (criu/pie/restorer.c:1287): Failed to poll from inotify fd: -4 (05.719202) pie: 95: Cleaning inotify events from 6 (05.719269) pie: 1: Error (criu/pie/restorer.c:1890): Restorer fail 1 So reordering cleanup and wait should fix it. Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f728391 - Browse repository at this point
Copy the full SHA f728391View commit details -
mount: Order call_helper_process calls
When we do clone threads in a later stage of restore procedure it may race with helpers which do call clone_noasan by self. Thus we need to walk over each clone_noasan call and figure out if calling it without last_pid lock is safe. - open_mountpoint: called by fusectl_dump, dump_empty_fs, binfmt_misc_dump, tmpfs_dump -- they all are processing dump stage, thus safe - call_helper_process: try_remount_writable -- called from various places in reg-files.c, in particular open_reg_by_id called in parallel with other threads, needs a lock remount_readonly_mounts -- called from sigreturn_restore, so in parallel, needs a lock - call_in_child_process: prepare_net_namespaces -- called from prepare_namespace which runs before we start forking, no need for lock Thus call_helper_process should use lock_last_pid and unlock_last_pid helpers and wait for subprocess to finish. Same time put a warning text into clone_noasan comment so next time we need to use it we would recall the pitfalls. v2: - fix unitialized ret variable v3: - use exit_code instead of ret Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a1533cd - Browse repository at this point
Copy the full SHA a1533cdView commit details -
unix: sysctl -- Preserve max_dgram_qlen value
The /proc/sys/net/unix/max_dgram_qlen is a per-net variable and we already noticed that systemd inside a container may change its value (for example it sets it to 512 by now instead of kernel's default value 10), thus we need keep it inside image and restore then. Signed-off-by: Cyrill Gorcunov <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5515496 - Browse repository at this point
Copy the full SHA 5515496View commit details -
zdtm: sysctl net.unix.max_dgram_qlen value preservation test
Test checks that if the /proc/sys/net/unix/max_dgram_qlen value has been changed in process net namespace, then it is saved after c/r. Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1e39d9b - Browse repository at this point
Copy the full SHA 1e39d9bView commit details -
x86/cpu: cleanup and improve xfeatures_mask check
Make xfeatures_mask check explicit. We were relying on our guess about hardware "backward compatibility" and used ">" check here for a long time. But it looks better to explicitly check that all xfeature bits available on the source are also available on the destination. For xsave_size we need to have smaller size on destination than on source, because xsave operation on small allocated buffer may corrupt the nearby data. So split up comments about xfeatures_mask and xsave_size, as having single comment for quiet a different cases is less understandable. v2: improve comments, remove extra else-ifs, remove extra typecast Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 08766ef - Browse repository at this point
Copy the full SHA 08766efView commit details -
crit: fix python3 encoding issues
Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 51c1445 - Browse repository at this point
Copy the full SHA 51c1445View commit details -
scripts: alpine: Install py2 packages with pip
The py-future package has been renamed to py3-future [1] and py2 package for yaml has been dropped [2]. [1] https://git.alpinelinux.org/aports/commit/main?id=316d44abaed13964e97eb43c095cd1b64e3943ad [2] https://git.alpinelinux.org/aports/commit/main?id=e369c1fd7707a73f2c3e2b11b613198d9a4106de Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 65cd7a6 - Browse repository at this point
Copy the full SHA 65cd7a6View commit details -
sockets: Remove duplicate variable assignment
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 210166b - Browse repository at this point
Copy the full SHA 210166bView commit details -
socket: c/r support for SO_KEEPALIVE
TCP keepalive packets can be used to determine if a connection is still valid. When the SO_KEEPALIVE option is set, TCP packets are periodically sent to keep the connection alive. This patch implements checkpoint/restore support for SO_KEEPALIVE, TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT options. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5dc8827 - Browse repository at this point
Copy the full SHA 5dc8827View commit details -
zdtm: Add test for SO_KEEPALIVE
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c8e9637 - Browse repository at this point
Copy the full SHA c8e9637View commit details -
It seems like Ubuntu introduced a overlayfs change which breaks CRIU: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1857257 This disables overlayfs (unfortunately) in most tests by switching to devicemapper or vfs. Upstream kernels do not seem to have this problem. This also adds the 'docker-test' for xenial which still has a working overlayfs from CRIU's point of view. Also adjust Podman Ubuntu package location Podman Ubuntu packages are now available via OBS and no longer via PPA. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d5a1c54 - Browse repository at this point
Copy the full SHA d5a1c54View commit details -
style: Enforce kernel style -Wdeclaration-after-statement
Include warnings that the kernel uses during compilation: -Wdeclaration-after-statement: enforces having variables declared at the top of scopes Signed-off-by: Nicolas Viennot <[email protected]> [Generated a commit message from the pull request] Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee96f50 - Browse repository at this point
Copy the full SHA ee96f50View commit details -
style: Enforce kernel style -Wstrict-prototypes
Include warnings that the kernel uses during compilation: -Wstrict-prototypes: enforces full declaration of functions. Previously, when declaring extern void func(), one can call func(123) and have no compilation error. This is dangerous. The correct declaration is extern void func(void). Signed-off-by: Nicolas Viennot <[email protected]> [Generated a commit message from the pull request] Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 09c918c - Browse repository at this point
Copy the full SHA 09c918cView commit details -
After Centos-8 nft used instead of iptables. But we had never supported nft rules in CRIU, and after c/r all rules are flushed. Co-developed-by: Pavel Tikhomirov <[email protected]> Signed-off-by: Pavel Tikhomirov <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for faf310c - Browse repository at this point
Copy the full SHA faf310cView commit details -
zdtm: nft tables preservation test
Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]> [Added test_author to zdtm test] Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ec1690d - Browse repository at this point
Copy the full SHA ec1690dView commit details -
files: fix ghost file error path
Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6905c22 - Browse repository at this point
Copy the full SHA 6905c22View commit details -
python: Improve decoding of file flags
Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e6946e2 - Browse repository at this point
Copy the full SHA e6946e2View commit details -
files: Remove O_CLOEXEC from file flags
The kernel artificially adds the O_CLOEXEC flag when reading from the /proc/fdinfo/fd interface if FD_CLOEXEC is set on the file descriptor used to access the file. This commit removes the O_CLOEXEC flag in our file flags. To restore the proper FD_CLOEXEC value in each of the file descriptors, CRIU uses fcntl(F_GETFD) to retrieve the FD_CLOEXEC status, and restore it later with fcntl(F_SETFD). This is necessary because multiple file descriptors may point to the same open file.
Configuration menu - View commit details
-
Copy full SHA for 4470237 - Browse repository at this point
Copy the full SHA 4470237View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74f8c75 - Browse repository at this point
Copy the full SHA 74f8c75View commit details -
travis: switch alpine to python3
Now that Python 2 has officially reached its end of life also switch the Alpine based test to Python 3. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for de7690d - Browse repository at this point
Copy the full SHA de7690dView commit details -
Add Socket-based Java Functional Tests
Signed-off-by: Nidhi Gupta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0d75cd9 - Browse repository at this point
Copy the full SHA 0d75cd9View commit details -
Switch open-j9 alpine tests to python3
Signed-off-by: Nidhi Gupta <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 32f4f8b - Browse repository at this point
Copy the full SHA 32f4f8bView commit details -
ppc64le: remove register '1' from clobber list
Compiling 'criu-dev' on Fedora 31 gives two errors about wrong clobber lists: compel/include/uapi/compel/asm/sigframe.h:47:9: error: listing the stack pointer register ‘1’ in a clobber list is deprecated [-Werror=deprecated] criu/arch/ppc64/include/asm/restore.h:14:2: error: listing the stack pointer register ‘1’ in a clobber list is deprecated [-Werror=deprecated] There was also a bug report from Debian that CRIU does not build because of this. Each of these errors comes with the following note: note: the value of the stack pointer after an ‘asm’ statement must be the same as it was before the statement As far as I understand it this should not be a problem in this cases as the code never returns anyway. Running zdtm very seldom fails during 'zdtm/static/cgroup_ifpriomap' with a double free or corruption. This happens not very often and I cannot verify if it happens without this patch. As CRIU does not build without the patch. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 72925cc - Browse repository at this point
Copy the full SHA 72925ccView commit details -
image: core -- Reserve start_time field
To ensure consistency of runtime environment processes within a container need to see same start time values over suspend/resume cycles. We introduce new field to the core image structure to store start time of a dumped process. Later same value would be restored to a newly created task. In future the feature is likely to be pulled here, so we reserve field id in protobuf descriptor. Signed-off-by: Valeriy Vdovin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2121d21 - Browse repository at this point
Copy the full SHA 2121d21View commit details -
travis: reduce the number of podman tests
We are running each podman test loop 50 times. This takes more than 20 minutes in Travis. Reduce both test loops to only run 20 times. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7e7b647 - Browse repository at this point
Copy the full SHA 7e7b647View commit details -
kerndat: detect if system support clone3() with set_tid
Linux kernel 5.4 extends clone3() with set_tid to allow processes to specify the PID of a newly created process. This introduces detection of the clone3() syscall and if set_tid is supported. This first implementation is X86_64 only. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bde7bea - Browse repository at this point
Copy the full SHA bde7beaView commit details -
Add assembler wrapper for clone3()
To create a new process/thread with a certain PID based on clone3() a new assembler wrapper is necessary as there is not glibc wrapper (yet). Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e97bc57 - Browse repository at this point
Copy the full SHA e97bc57View commit details -
Use clone3() with set_tid to create processes
With the in Linux Kernel 5.4 introduced clone3() with set_tid it is no longer necessary to write to to /proc/../ns_last_pid to influence the next PID number. clone3() can directly select a PID for the newly created process/thread. After checking for the availability of clone3() with set_tid and adding the assembler wrapper for clone3() in previous patches, this extends criu/pie/restorer.c and criu/clone-noasan.c to use the newly added assembler clone3() wrapper to create processes with a certain PID. This is a RFC and WIP, but I wanted to share it and run it through CI for feedback. As the CI will probably not use a 5.4 based kernel it should just keep on working as before. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2082c03 - Browse repository at this point
Copy the full SHA 2082c03View commit details -
s390x: remove stack pointer from clobber list
Just like on all other supported architectures gcc complains about the stack pointer register being part of the clobber list: error: listing the stack pointer register ‘15’ in a clobber list is deprecated [-Werror=deprecated] This removes the stack pointer from the clobber list. 'zdtm.py run -a' still runs without any errors after this change. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c53ed92 - Browse repository at this point
Copy the full SHA c53ed92View commit details -
s390x: use clone3() if possible
This adds the parasite clone3() with set_tid wrapper for s390x. In contrast to the x86_64 implementation the thread start address and arguments are not put on the thread stack but passed via r4 and r5. As those registers are caller-saved they still contain the correct value (thread start address and arguments) after returning from the syscall. Tested on 5.5.0-rc6. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0f0564a - Browse repository at this point
Copy the full SHA 0f0564aView commit details -
arm: remove stack pointer from clobber list
Just like on all other supported architectures gcc complains about the stack pointer register being part of the clobber list. This removes the stack pointer from the clobber list. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b2d9412 - Browse repository at this point
Copy the full SHA b2d9412View commit details
Commits on Jan 26, 2020
-
ppc64le: use clone3() if possible
This adds the parasite clone3() with set_tid wrapper for ppc64le. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0d9209d - Browse repository at this point
Copy the full SHA 0d9209dView commit details
Commits on Jan 29, 2020
-
clone3: handle clone3() with CLONE_PARENT
clone3() explicitly blocks setting an exit_signal if CLONE_PARENT is specified. With clone() it also did not work, but there was no error message. The exit signal from the thread group leader is taken. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a369581 - Browse repository at this point
Copy the full SHA a369581View commit details
Commits on Jan 30, 2020
-
aarch64: use clone3() if possible
This adds the parasite clone3() with set_tid wrapper for aarch64. Tested on Fedora 31 with 5.5.0-rc6. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 784919b - Browse repository at this point
Copy the full SHA 784919bView commit details -
arm: use clone3() if it exists
This is the last architecture specific change to make CRIU use clone3() with set_tid if available. Just as on all other architectures this adds a clone3() based assembler wrapper to be used in the restorer code. Tested on Fedora 31 with the same 5.5.0-rc6 kernel as on the other architectures. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8d108a9 - Browse repository at this point
Copy the full SHA 8d108a9View commit details
Commits on Feb 4, 2020
-
travis: fix warning and errors from validation
This fixes the validation errors from Travis: Build config validation root: deprecated key sudo (The key `sudo` has no effect anymore.) root: missing os, using the default linux root: key matrix is an alias for jobs, using jobs Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f075c1d - Browse repository at this point
Copy the full SHA f075c1dView commit details -
compel: add -ffreestanding to force gcc not to use builtin memcpy, me…
…mset This patch fixes the problem with SSE (xmm) registers corruption on amd64 architecture. The problem was that gcc generates parasite blob that uses xmm registers, but we don't preserve this registers in CRIU when injecting parasite. Also, gcc, even with -nostdlib option uses builtin memcpy, memset functions that optimized for amd64 and involves SSE registers. It seems, that optimal solution is to use -ffreestanding gcc option to compile parasite. This option implies -fno-builtin and also it designed for OS kernels compilation/another code that suited to work on non-hosted environments and could prevent future sumilar bugs. To check that you amd64 CRIU build affected by this problem you could simply objdump -dS criu/pie/parasite.o | grep xmm Output should be empty. Reported-by: Diyu Zhou <zhoudiyupku at gmail.com> Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bdcf709 - Browse repository at this point
Copy the full SHA bdcf709View commit details -
doc/Makefile: don't hide xmlto stderr
In case asciidoc is installed and xmlto is not, make returns an error but there's no diagnostics shown, since "xmlto: command not found" goes to /dev/null. Remove the redirect. Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 049cd5b - Browse repository at this point
Copy the full SHA 049cd5bView commit details -
1. Add a/the articles where I see them missing 2. s/Forbid/disable/ 3. s/crit/crit(1)/ as we're referring to a man page 4. Simplify some descriptions Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9d219e8 - Browse repository at this point
Copy the full SHA 9d219e8View commit details -
Commit 0493724 added support for using asciidoctor (instead of asciidoc + xmlto) to generate man pages. For some reason, asciidoctor does not deal well with some complex formatting that we use for options such as --external, leading to literal ’ and ' appearing in the man page instead of italic formatting. For example: > --inherit-fd fd[’N']:’resource' (here both N and resource should be in italic). Asciidoctor documentation (asciidoctor --help syntax) tells: > == Text Formatting > > .Constrained (applied at word boundaries) > *strong importance* (aka bold) > _stress emphasis_ (aka italic) > `monospaced` (aka typewriter text) > "`double`" and '`single`' typographic quotes > +passthrough text+ (substitutions disabled) > `+literal text+` (monospaced with substitutions disabled) > > .Unconstrained (applied anywhere) > **C**reate+**R**ead+**U**pdate+**D**elete > fan__freakin__tastic > ``mono``culture so I had to carefully replace *bold* with **bold** and 'italic' with __italic__ to make it all work. Tested with both terminal and postscript output, with both asciidoctor and asciidoc+xmlto. TODO: figure out how to fix examples (literal multi-line text), since asciidoctor does not display it in monospaced font (this is only true for postscript/pdf output so low priority). Signed-off-by: Kir Kolyshkin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0011cbb - Browse repository at this point
Copy the full SHA 0011cbbView commit details -
criu: fix build failure against gcc-10
On gcc-10 (and gcc-9 -fno-common) build fails as: ``` ld: criu/arch/x86/crtools.o:criu/include/cr_options.h:159: multiple definition of `rpc_cfg_file'; criu/arch/x86/cpu.o:criu/include/cr_options.h:159: first defined here make[2]: *** [scripts/nmk/scripts/build.mk:164: criu/arch/x86/crtools.built-in.o] Error 1 ``` gcc-10 will change the default from -fcommon to fno-common: https://gcc.gnu.org/PR85678. The error also happens if CFLAGS=-fno-common passed explicitly. Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/707942 Signed-off-by: Sergei Trofimovich <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for af9157f - Browse repository at this point
Copy the full SHA af9157fView commit details
Commits on Feb 5, 2020
-
test/vdso: check the code path when here is no API to map vDSO
Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c172688 - Browse repository at this point
Copy the full SHA c172688View commit details -
vdso: use correct offsets to remap vdso and vvar mappings
In the current version, the offsets of remapping vvar and vdso regions are mixed up. If vdso is before vvar, vvar has to be mapped with the vdso_size offset. if vvar is before vdso, vdso has to be mapped with the vvar_size offset. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f32a4e4 - Browse repository at this point
Copy the full SHA f32a4e4View commit details
Commits on Feb 6, 2020
-
typo: fix missing space in error message
Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 83e0882 - Browse repository at this point
Copy the full SHA 83e0882View commit details -
See "man memfd_create" for more information of what memfd is. This adds support for memfd open files, that are not not memory mapped. * We add a new kind of file: MEMFD. * We add two image types MEMFD_FILE, and MEMFD_INODE. MEMFD_FILE contains usual file information (e.g., position). MEMFD_INODE contains the memfd name, and a shmid identifier referring to the content. * We reuse the shmem facilities for dumping memfd content as it would be easier to support incremental checkpoints in the future. Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c365f70 - Browse repository at this point
Copy the full SHA c365f70View commit details -
files: increase path buffer size in inherited_fd()
Prepare memfd to use inherited_fd(), needing long path names support. Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1386dbb - Browse repository at this point
Copy the full SHA 1386dbbView commit details -
memfd: add --inherit-fd support
Upon file restore, inherited_fd() is called to check for a user-defined inerit-fd override. Note that the MEMFD_INODE image is read at each invocation (memfd name is not cached). Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 883d3e4 - Browse repository at this point
Copy the full SHA 883d3e4View commit details -
memfd: add memory mapping support
* During checkpoint, we add a vma flags: VMA_AREA_MEMFD to denote memfd regions. * Even though memfd is backed by the shmem device, we use the file semantics of memfd (via /proc/map_files/<vma>) which we already have support for. Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8c006c2 - Browse repository at this point
Copy the full SHA 8c006c2View commit details -
See "man fcntl" for more information about seals. memfd are the only files that can be sealed, currently. For this reason, we dump the seal values in the MEMFD_INODE image. Restoring seals must be done carefully as the seal F_SEAL_FUTURE_WRITE prevents future write access. This means that any memory mapping with write access must be restored before restoring the seals. Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3eb95b5 - Browse repository at this point
Copy the full SHA 3eb95b5View commit details -
inhfd_test: add support for non-pair files
File pairs naturally block on read() until the write() happen (or the writer is closed). This is not the case for regular files, so we take extra precaution for these. Also cleaned-up an extra my_file.close() Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 557b191 - Browse repository at this point
Copy the full SHA 557b191View commit details -
Testing for all the memfd features, namely support for CR of: * the same fd shared by multiple processes * the same file shared by multiple processes * the memfd content * file flags and fd flags * mmaps, MAP_SHARED and MAP_PRIVATE * seals, excluding F_SEAL_FUTURE_WRITE because this feature only exists in recent kernels (5.1 and up) * inherited fd Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6cf5182 - Browse repository at this point
Copy the full SHA 6cf5182View commit details -
criu: Use strlcpy() instead of strncpy()
gcc8 in Fedora Rawhide has a new useful warning: > criu/img-remote.c: In function 'push_snapshot_id': > criu/img-remote.c:1099:2: error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] > 1099 | strncpy(rn.snapshot_id, snapshot_id, PATH_MAX); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From man 3 strncpy: > Warning: If there is no null byte among the first n bytes of src, > the string placed in dest will not be null-terminated. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9049d7b - Browse repository at this point
Copy the full SHA 9049d7bView commit details -
criu: Make use strlcpy() to copy into allocated strings
strncpy() with n == strlen(src) won't put NULL-terminator in dst. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6875c9a - Browse repository at this point
Copy the full SHA 6875c9aView commit details -
zdtm: Make test_{doc,author} weak variables
Allows to override them in every test, optionally. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7491326 - Browse repository at this point
Copy the full SHA 7491326View commit details -
vdso: Add vdso_is_present() helper
Use it in kerndat to check if the kernel provides vDSO. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a3501c0 - Browse repository at this point
Copy the full SHA a3501c0View commit details -
Apparently, C/R is broken when CONFIG_VDSO is not set. Probably, I've broken it while adding arm vdso support. Or maybe some commits after. Repair it by adding checks into vdso_init_dump(), vdso_init_restore(). Also, don't try handling vDSO in restorer if it wasn't present in parent. And prevent summing VDSO_BAD_SIZE to {vdso,vvar}_rt_size. Reported-by: Adrian Reber <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fa292e4 - Browse repository at this point
Copy the full SHA fa292e4View commit details -
It's always page-aligned (as any VMA). Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 540ab31 - Browse repository at this point
Copy the full SHA 540ab31View commit details -
zdtm: mntns_rw_ro_rw update error msg
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7150497 - Browse repository at this point
Copy the full SHA 7150497View commit details
Commits on Feb 10, 2020
-
Podman changed the output of 'podman ps'. For the test only running containers are interesting. Adding the filter '-f status=running' only returns running containers as previously. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 43a7b34 - Browse repository at this point
Copy the full SHA 43a7b34View commit details
Commits on Feb 16, 2020
-
test/zdtm/inhfd: update dump options one each iteration
This allows to run inhfd tests with many iterations of C/R. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b5e857b - Browse repository at this point
Copy the full SHA b5e857bView commit details -
202 Additional newline in a group of imports. I100 Import statements are in the wrong order. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a6083ea - Browse repository at this point
Copy the full SHA a6083eaView commit details
Commits on Feb 21, 2020
-
test/jenkins: remove empty line at the end of file
Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 285e689 - Browse repository at this point
Copy the full SHA 285e689View commit details
Commits on Feb 29, 2020
-
uffd: use userns_call() to execute ioctl(UFFDIO_API)
In the recent kernels the userfaultfd support for FORK events is limited to CAP_SYS_PTRACE. That causes the followong error when the ioctl(UFFDIO_API) is executed from non-privilieged userns: Error (criu/uffd.c:273): uffd: Failed to get uffd API: Operation not permitted Wrapping the call to ioctl(UFFDIO_API) in userns_call() resolves the issue. Fixes: checkpoint-restore#964 Signed-off-by: Mike Rapoport <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a5f6158 - Browse repository at this point
Copy the full SHA a5f6158View commit details -
criu(8): Add documentation for --enable-fs
This option was introduced with: checkpoint-restore@e2c3824 v2: (comment from Pavel Tikhomirov) --enable-fs does not fit with --external dev[]:, see try_resolve_ext_mount, external dev mounts only determined for FSTYPE__UNSUPPORTED. Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 832ab07 - Browse repository at this point
Copy the full SHA 832ab07View commit details -
criu(8): Convert tabs to spaces
Signed-off-by: Radostin Stoyanov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 30b07fc - Browse repository at this point
Copy the full SHA 30b07fcView commit details -
seize: prepare for cgroupv2 freezer
The cgroupv2 freezer does not return the same strings as v1. Instead of THAWED and FROZEN v2 returns 0 and 1 (strings). This prepares the seize code to use 0 and 1 everywhere and THAWED and FROZEN only for v1 specific code paths. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4c27b3d - Browse repository at this point
Copy the full SHA 4c27b3dView commit details -
seize: factor out opening and writing the freezer state
More preparations for cgroupv2 freezer. Factor our the freezer state opening and writing to have one location where to handle v1 and v2 differences. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aac4116 - Browse repository at this point
Copy the full SHA aac4116View commit details -
seize: support cgroup v2 freezer
This adds support to checkpoint processes using the cgroup v2 freezer. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6f19249 - Browse repository at this point
Copy the full SHA 6f19249View commit details -
cgroup2: add minimal cgroup2 support
The runc test cases are (sometimes) mounting a cgroup inside of the container. For these tests to succeed, let CRIU know that cgroup2 exists and how to restore such a mount. This does not fix any specific cgroup2 settings, it just enables CRIU to mount cgroup2 in the restored container. Signed-off-by: Adrian Reber <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 378337a - Browse repository at this point
Copy the full SHA 378337aView commit details
Commits on Mar 3, 2020
-
fs: use __open_proc instead of open("/proc/...", ... )
Processes can run in a mount namespace without /proc. Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0c4b856 - Browse repository at this point
Copy the full SHA 0c4b856View commit details -
memfd: don't corrupt a state of the dumped fd
Right now, criu uses a dumped fd to dump content of a memfd "file". Here are two reasons why we should not do this: * a state of a dumped fd doesn't have to be changed, but now criu calls lseek on it. This can be workarounded by using pread. * a dumped descriptor can be write-only. Reported-by: Mr Jenkins Cc: Nicolas Viennot <[email protected]> Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9be35de - Browse repository at this point
Copy the full SHA 9be35deView commit details -
zdtm/inhfd: force python to read new data from a file
python 2.7 doesn't call the read system call if it's read file to the end once. The next seek allows to workaround this problem. inhfd/memfd.py hangs due to this issue. Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e333749 - Browse repository at this point
Copy the full SHA e333749View commit details
Commits on Mar 5, 2020
-
fown: Don't fail on dumping files opened with O_PATH
O_PATH opened files are special: they have empty file operations in kernel space, so there not that much we can do with them, even setting position is not allowed. Same applies to a signal number for owner settings. Signed-off-by: Cyrill Gorcunov <[email protected]> Co-developed-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn (Virtuozzo) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52c5dd5 - Browse repository at this point
Copy the full SHA 52c5dd5View commit details -
zdtm: add a test for files opened with O_PATH
On these test without the patch ("fown: Don't fail on dumping files opened wit O_PATH") we trigger these errors: Error (criu/pie/parasite.c:340): fcntl(4, F_GETOWN_EX) -> -9 Error (criu/files.c:403): Can't get owner signum on 18: Bad file descriptor Error (criu/files-reg.c:1887): Can't restore file pos: Bad file descriptor Signed-off-by: Pavel Tikhomirov <[email protected]> Signed-off-by: Alexander Mikhalitsyn (Virtuozzo) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a90e88d - Browse repository at this point
Copy the full SHA a90e88dView commit details -
files: allow dumping opened symlinks
To really open symlink file and not the regular file below it, one needs to do open with O_PATH|O_NOFOLLOW flags. Looks like systemd started to open /etc/localtime symlink this way sometimes, and before that nobody actually used this and thus we never supported this in CRIU. Error (criu/files-ext.c:96): Can't dump file 11 of that type [120777] (unknown /etc/localtime) Looks like it is quiet easy to support, as c/r of symlink file is almost the same as c/r of regular one. We need to only make fstatat not following links in check_path_remap. Also we need to take into account support of ghost symlinks. Signed-off-by: Alexander Mikhalitsyn (Virtuozzo) <[email protected]> Co-developed-by: Pavel Tikhomirov <[email protected]> Signed-off-by: Pavel Tikhomirov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 657268d - Browse repository at this point
Copy the full SHA 657268dView commit details -
zdtm: add a test on open symlink migration
Signed-off-by: Pavel Tikhomirov <[email protected]> Co-Developed-by: Vitaly Ostrosablin <[email protected]> Signed-off-by: Vitaly Ostrosablin <[email protected]> Signed-off-by: Alexander Mikhalitsyn (Virtuozzo) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 27807fb - Browse repository at this point
Copy the full SHA 27807fbView commit details
Commits on Mar 9, 2020
-
zdtm/fifo_loop: don't try to write more than pipe size
... otherwise write() can block. Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 84ad718 - Browse repository at this point
Copy the full SHA 84ad718View commit details -
criu: Remove compel.h includes
The plan is to remove "compel.h". That file only includes other headers (which may be not needed). If we aim for one-include-for-compel, we could instead paste all subheaders into "compel.h". Rather, I think it's worth to migrate to more fine-grained compel headers than follow the strategy 'one header to rule them all'. Further, the header creates problems for cross-compilation: it's included in files, those are used by host-compel. Which rightfully confuses compiler/linker as host's definitions for fpu regs/other platform details get drained into host's compel. As a first step - stop including "compel.h" in criu. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8ca165e - Browse repository at this point
Copy the full SHA 8ca165eView commit details -
The file only includes other headers (which may be not needed). If we aim for one-include-for-compel, we could instead paste all subheaders into "compel.h". Rather, I think it's worth to migrate to more fine-grained compel headers than follow the strategy 'one header to rule them all'. Further, the header creates problems for cross-compilation: it's included in files, those are used by host-compel. Which rightfully confuses compiler/linker as host's definitions for fpu regs/other platform details get drained into host's compel. Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fb386c2 - Browse repository at this point
Copy the full SHA fb386c2View commit details -
travis: Add aarch64-cross test on amd64
Fixes: checkpoint-restore#924 Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e419f2e - Browse repository at this point
Copy the full SHA e419f2eView commit details -
travis: Use debian/buster as base for cross build tests
Jessie is called 'oldoldstable', migrate to Buster. Suggested-by: Adrian Reber <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 037aaf9 - Browse repository at this point
Copy the full SHA 037aaf9View commit details
Commits on Mar 14, 2020
-
crit-recode: skip (not try to parse) nftables raw image
We should ignore (not parse) images that has non-crtool format, that images has no magic number (RAW_IMAGE_MAGIC equals 0). nftables images has format compatible with `nft -f /proc/self/fd/0` input format. Reported-by: Mr Jenkins Signed-off-by: Alexander Mikhalitsyn (Virtuozzo) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 717de3e - Browse repository at this point
Copy the full SHA 717de3eView commit details
Commits on Mar 15, 2020
-
travis: add ppc64-cross test on amd64
Signed-off-by: Mike Rapoport <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e7c8ac1 - Browse repository at this point
Copy the full SHA e7c8ac1View commit details
Commits on Mar 21, 2020
-
Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e0fca8b - Browse repository at this point
Copy the full SHA e0fca8bView commit details
Commits on Mar 23, 2020
-
make: use cflags/ldflags for config.h detection mechanism
The config.h detection scripts should use the provided CFLAGS/LDFLAGS as it tries to link libnl, libnet, and others. Signed-off-by: Nicolas Viennot <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9433b7b - Browse repository at this point
Copy the full SHA 9433b7bView commit details -
mem: dump shared memory file descriptors
Any shared memroy mapping can be opened via /proc/self/maps_files/. Such file descriptors look like memfd file descriptors, so they can be dumped by the same way. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2334261 - Browse repository at this point
Copy the full SHA 2334261View commit details -
mem/vma: set VMA_FILE_{PRIVATE,SHARED} if a vma file is borrowed
Here is a fast path when two consequent vma-s share the same file. But one of these vma-s can map a file with MAP_SHARED, but another one can map it with MAP_PRIVATE and we need to take this into account.
Configuration menu - View commit details
-
Copy full SHA for 27c6039 - Browse repository at this point
Copy the full SHA 27c6039View commit details -
test/zdtmp: add a test to C/R shared memory file descriptors
Any shared memory region can be openned via /proc/self/map_files. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 941d31b - Browse repository at this point
Copy the full SHA 941d31bView commit details -
zdtm: Implemented get_current_dir_name wrapper that checks for 'x' pe…
…rmissions Any filesystem syscall, that needs to navigate to inode by it's absolute path performs successive lookup operations for each part of the path. Lookup operation includes access rights check. Usually but not always zdtm tests processes fall under 'other' access category. Also, usually directories don't have 'x' bit set for other. In case when bit 'x' is not set and user-ID and group-ID of a process relate it to 'other', test's will not succeed in performing these syscalls which are most of filesystem api, that has const char *path as part of it arguments (open, openat, mkdir, bind, etc). The observable behavior of that is that zdtm tests fail at file creation ops on one system and pass on the other. The above is not immediately clear to the developer by just looking at failed test's logs. Investigation of that is also not quick for a developer due to the complex structure of zdtm runtime where nested clones with NAMESPACE flags take place alongside with bind-mounts. As an additional note: 'get_current_dir_name' is documented as returning EACCESS in case when some part of the path lacks read/list permissions. But in fact it's not always so. Practice shows, that test processes can get false success on this operation only to fail on later call to something like mkdir/mknod/bind with a given path in arguments. 'get_cwd_check_perm' is a wrapper around 'get_current_dir_name'. It also checks for permissions on the given filepath and logs the error. This directs the developer towards the right investigation path or even eliminates the need for investigation completely. Signed-off-by: Valeriy Vdovin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 419ccc9 - Browse repository at this point
Copy the full SHA 419ccc9View commit details -
zdtm: Use safe helper function to initialize unix socket sockaddr str…
…ucture The helper function removes code duplication from tests that want to initialize unix socket address to an absolute file path, derived from current working directory of the test + relative filename of a resulting socket. Because the former code used cwd = get_current_dir_name() as part of absolute filename generation, the resulting filepath could later cause failure of bind systcall due to unchecked permissions and introduce confusing permission errors. Signed-off-by: Valeriy Vdovin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f883e92 - Browse repository at this point
Copy the full SHA f883e92View commit details
Commits on Mar 24, 2020
-
pipe: restore pipe size even if a pipe is empty
Without this patch, pipe size is restored only if a pipe has queued data. Reported-by: Mr Jenkins Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 49cc6ce - Browse repository at this point
Copy the full SHA 49cc6ceView commit details -
test/pipe03: check that pipe size is restored
Create two pipes with and without queued data. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b00267e - Browse repository at this point
Copy the full SHA b00267eView commit details -
test/fifo_loop: change sizes of all fifo-s to fit a test buffer
This test doesn't expect that the write operation will block. Signed-off-by: Andrei Vagin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2b99a2 - Browse repository at this point
Copy the full SHA d2b99a2View commit details -
vz7: sockets: Separate socket buffer size setting into a helper
It is known that for unix sockets we need to setup qlen first before restoring queue itself, otherwise there might be not enough place for data. Thus move the snippet into separate helper. Most likely we will merge it back again once it's been proved that for any kind of sockets it is safe to setup all options before queue data itself. https://jira.sw.ru/browse/PSBM-63762 Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ff6c7d9 - Browse repository at this point
Copy the full SHA ff6c7d9View commit details -
sk-unix -- Restore qlen before pushing queued data back
The size of qlen may be bigger than one provided by kernel as default, so pushing data may lead to Error (criu/sk-queue.c:500): Failed to send packet: Resource temporarily unavailable ie to -EAGAIN. Signed-off-by: Cyrill Gorcunov <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f42491e - Browse repository at this point
Copy the full SHA f42491eView commit details -
unix: image -- Move uflags into enum
This values are part of abi, so must be set in image file. Signed-off-by: Cyrill Gorcunov <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]> Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c6d3f25 - Browse repository at this point
Copy the full SHA c6d3f25View commit details -
unix: Collect bindmounted unix sockets
Mount points might be beindmount to some resources (say unix binded sockets) thus when times come to do real bind mount call we need to prepare appropriate resource first. On dump procedure we walk over all bind-mounts and check if the mountpoint is a unix socket saving the mnt_id into the image then. To distinguish such sockets from others we use UNIX_UFLAGS__BINDMOUNT flag. Note at moment we support only DGRAM closed sockets. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1b85265 - Browse repository at this point
Copy the full SHA 1b85265View commit details -
unix: Collect images before opening mountpoints
Because we need to gather unix sockets earlier than we start creating mount tree. Thus we will be able to handle bindmounted sockets. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9d83f94 - Browse repository at this point
Copy the full SHA 9d83f94View commit details -
unix: Collect bindmounted unix sockets into own list
So when we will be examinating mount points and sockets we won't waste time on non-bindmounted. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b2b2bfb - Browse repository at this point
Copy the full SHA b2b2bfbView commit details -
unix: Move shared data init into early stage
We will need to take mutex when bind() bindmounted sockets. Strictly speaking we won't support bindmounted and deleted sockets for now but better prepare this scaffolds early. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5dda301 - Browse repository at this point
Copy the full SHA 5dda301View commit details -
unix: Add support for bindmounted sockets
Some unix sockets might be bindmounted (say /dev/log bound to another place). So to handle it we need to change the logic we open such sockets especially because we create mount tree earlier than we start to restore files. Thus here what we do: - on dump mark such sockets with UNIX_UFLAGS__BINDMOUNT flag so we would distinguish them on restore; - collect unix sockets before creating mount tree; note that at this moment we able to simply gather this sockets into own @unix_mnt_sockets list and nothing more because setting up the peers and such happens later in that named post action procedures; - when we need to create a bindmount point we enter into unix engine and figure out if there a socket to bindmount over; if found we pre-allocate the socketpair, bind it and save inside fdstore engine; using socketpair is important because later we need both peers to restore queued data; - finally when we start restoring files we simply fetch the socket from the fdstore and use it directly. All this scheme is working simply because we support dgram standalone sockets only, adding support for streamed sockets requires a way more engine rework and hopefully we won't need it in near future. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b2ee9fa - Browse repository at this point
Copy the full SHA b2ee9faView commit details -
unix: test -- Add bind-mount-unix test case
To test a case where unix socket is bind mounted to somewhere so restore may fail if socket has not been created. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3ec1c5a - Browse repository at this point
Copy the full SHA 3ec1c5aView commit details -
unix: bindmount -- Move mounting code to be called before first mount
Otherwise the mount call may fail since bindmounted unix socket wont be created. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6c9ee70 - Browse repository at this point
Copy the full SHA 6c9ee70View commit details -
To elimitane compilation warnings with gcc-8. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 271a6cb - Browse repository at this point
Copy the full SHA 271a6cbView commit details -
unix: bindmount -- Show details about queuer
Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 803ffb0 - Browse repository at this point
Copy the full SHA 803ffb0View commit details -
unix: break_connected -- Add a log recod
For better debug Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6ee1ad6 - Browse repository at this point
Copy the full SHA 6ee1ad6View commit details -
unix: make_socket -- Add more detailed logs
Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 32e74c2 - Browse repository at this point
Copy the full SHA 32e74c2View commit details -
unix: make_socket -- Break connected pair if requested
No need to check for pair argument, it is rather confusing. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f93219 - Browse repository at this point
Copy the full SHA 7f93219View commit details -
unix: bind_unix_sk -- Add ability to skip waiters notification
Currently bind_unix_sk is used in two contexts: to bind freshly created socket pairs and to bind name for sockets which are to be queued into fdstore (binmounted sockets). For first case we should notify the waiting side immediately but in turn bindmount sockets are created early and there might be the case where peers are not yet even opened and notification may simply lost or even cause sigsegv since file list is yet empty. In turn we should defer it until we do a real bindmount socket opening right after we fetched it from the fdstore. https://jira.sw.ru/browse/PSBM-88274 Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f9a89f - Browse repository at this point
Copy the full SHA 2f9a89fView commit details -
unix: unlink_sk -- Don't unlink bindmounted sockets
The unlink procedure is rather a cleanup before we start creating new sockets, but bindmounted sockets are pre-created early so we should not touch them. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9581911 - Browse repository at this point
Copy the full SHA 9581911View commit details -
unix: unix_prepare_bindmount -- Allow to connect via relative name
Once socket is bounded we should allow to connect to us via relative name. https://jira.sw.ru/browse/PSBM-88274 Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 726f6b0 - Browse repository at this point
Copy the full SHA 726f6b0View commit details -
test: bind-mount-unix -- Implement real connect
Also full rework to make sure we can test the situation where client is not yet opened when we're restoring bindmount. Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 95c2c84 - Browse repository at this point
Copy the full SHA 95c2c84View commit details -
unix: Don't forget to close ns descriptor on error path
Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2aa32b3 - Browse repository at this point
Copy the full SHA 2aa32b3View commit details -
unix: Disable switching mount namespace
Previously we always created sockets in root mount namespace but in 019ebec we've tried to resolve this problem setting up proper mount namespace. This is not always possible though: the root task from which we trying to switch ns might already have a number of children with CLONE_FS|CLONE_FILES set and kernel doesn't allow to do that. Lets disable this ability until we find a proper solution. https://jira.sw.ru/browse/PSBM-89126 Signed-off-by: Cyrill Gorcunov <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bdc533e - Browse repository at this point
Copy the full SHA bdc533eView commit details