Skip to content
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

Try packit 2 #6

Open
wants to merge 204 commits into
base: criu-dev
Choose a base branch
from
Open

Try packit 2 #6

wants to merge 204 commits into from

Commits on Nov 8, 2020

  1. crns.py: New attempt to have --unshare option

    So, here's the enhanced version of the first try.
    
    Changes are:
    
    1. The wrapper name is criu-ns instead of crns.py
    2. The CLI is absolutely the same as for criu, since the script
       re-execl-s criu binary. E.g.
    	   scripts/criu-ns dump -t 1234 ...
       just works
    3. Caller doesn't need to care about substituting CLI options,
       instead, the scripts analyzes the command line and
       a) replaces -t|--tree argument with virtual pid __if__ the
          target task lives in another pidns
       b) keeps the current cwd (and root) __if__ switches to another
          mntns. A limitation applies here -- cwd path should be the
          same in target ns, no "smart path mapping" is performed. So
          this script is for now only useful for mntns clones (which
          is our main goal at the moment).
    
    Signed-off-by: Pavel Emelyanov <[email protected]>
    Looks-good-to: Andrey Vagin <[email protected]>
    xemul authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    1609a34 View commit details
    Browse the repository at this point in the history
  2. 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]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    ca5c93d View commit details
    Browse the repository at this point in the history
  3. criu-ns: Convert to python3 style print() syntax

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    226efaa View commit details
    Browse the repository at this point in the history
  4. criu-ns: Print usage info when no args provided

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    3f71897 View commit details
    Browse the repository at this point in the history
  5. 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]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    bfb051a View commit details
    Browse the repository at this point in the history
  6. Add flog to CRIU

    Change made through this commit:
    - Include copy of flog as a seperate tree.
    - Modify the makefile to add and compile flog code.
    
    Signed-off-by: prakritigoyal19 <[email protected]>
    prakritigoyal19 authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    5329446 View commit details
    Browse the repository at this point in the history
  7. flog: Missing varargs init or cleanup (VARARGS)

    CID 302713 (#1 of 1): Missing varargs init or cleanup (VARARGS)
     va_end was not called for argptr.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    e180172 View commit details
    Browse the repository at this point in the history
  8. criu-ns: Use PID 1 on restore

    criu-ns performs double fork, which results in criu restore
    using PID=2. Thus, if a user is trying to restore a process
    with that PID, the restore will fail.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    265569a View commit details
    Browse the repository at this point in the history
  9. cr-restore: Wait child & reap zombies if PID=1

    When criu restore runs as PID=1 it has an additional responsibility to
    reap zombie processes.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    Signed-off-by: Andrei Vagin <[email protected]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    53dd29e View commit details
    Browse the repository at this point in the history
  10. compel: don't mmap parasite as RWX

    Some kernels have W^X mitigation, which means they won't execute memory
    blocks if that memory block is also writable or ever was writable. This
    patch enables CRIU to run on such kernels.
    
    1. Align .data section to a page.
    2. mmap a memory block for parasite as RX.
    3. mprotect everything after .text as RW.
    
    Signed-off-by: Michał Cłapiński <[email protected]>
    mclapinski authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    2ec05a0 View commit details
    Browse the repository at this point in the history
  11. lock: disable clang_analyzer for the LOCK_BUG_ON() macro

    The clang analyzer, scan-build, cannot correctly handle the
    LOCK_BUG_ON() macro. At multiple places there is the following warning:
    
      Error: CLANG_WARNING:
        criu/pie/restorer.c:1221:4: warning: Dereference of null pointer
    
      include/common/lock.h:14:35: note: expanded from macro 'LOCK_BUG_ON'
                   *(volatile unsigned long *)NULL = 0xdead0000 + __LINE__
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    
    This just disable the clang analyzer for the LOCK_BUG_ON() macro.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    b80dd7e View commit details
    Browse the repository at this point in the history
  12. infect: initialize struct to avoid CLANG_WARNING

    Using scan-build there is a warning about
    
     infect.c:231:17: warning: The left operand of '!=' is a garbage value
                     if (ss->state != 'Z') {
    
    which is a false positive as every process will have a 'Status' field,
    but initializing the structure makes the clang analyzer silent.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    e13a7ec View commit details
    Browse the repository at this point in the history
  13. lib/py: remove unused variable

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    6a9bff8 View commit details
    Browse the repository at this point in the history
  14. coredump: remove two unused variables

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    bbca79a View commit details
    Browse the repository at this point in the history
  15. bfd: remove unused line

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    407d3fe View commit details
    Browse the repository at this point in the history
  16. Use 'is None' instead of '== None'

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    eb74152 View commit details
    Browse the repository at this point in the history
  17. sk-unix: do not overwrite function parameter

    The function collect_one_unixsk() has a parameter 'i' and at the same
    time has a variable, in a loop, with the name 'i'.
    
    This is no real error or problem, because the function parameter 'i' is
    never used in the whole function.
    
    Just trying to reduce confusion and making a code checker happy.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    84ffb96 View commit details
    Browse the repository at this point in the history
  18. autofs: Potential leak of memory pointed to by 'token'

    Using strsep() moves the pointer of the original string and this
    introduces a copy of the malloc()ed memory to be able to free() it
    later.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    42e3e2e View commit details
    Browse the repository at this point in the history
  19. coverity: ignore CHECKED_RETURN

    Ignore coverity errors about CHECKED_RETURN.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    62ab67e View commit details
    Browse the repository at this point in the history
  20. vdso-compat: let coverity know that the function does not return

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    36f9700 View commit details
    Browse the repository at this point in the history
  21. cr-dump: Potential leak of memory pointed to by 'si'

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    53501e5 View commit details
    Browse the repository at this point in the history
  22. restore: Value stored to 'ret' is never read

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    73ed071 View commit details
    Browse the repository at this point in the history
  23. coverity: fix parameter_hidden: declaration hides parameter

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    fc20d28 View commit details
    Browse the repository at this point in the history
  24. dump: Potential leak of memory pointed to by 'si'

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    5527329 View commit details
    Browse the repository at this point in the history
  25. util: fix double_close false positive

    Coverity does not understand how close_fds() works.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    d95c268 View commit details
    Browse the repository at this point in the history
  26. cr-dump: get_service_fd() is passed to a parameter that cannot be neg…

    …ative
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    ef4ec32 View commit details
    Browse the repository at this point in the history
  27. sk-unix: ignore coverity chroot() warning

    criu/sk-unix.c:1173: chroot_call: Calling chroot: "chroot(".")".
    criu/sk-unix.c:1175: chroot: Calling function "close_safe" after chroot() but before calling chdir("/").
    
    criu/sk-unix.c:1251: chroot_call: Calling chroot: "chroot(".")".
    criu/sk-unix.c:1263: chroot: Calling function "print_on_level" after chroot() but before calling chdir("/").
    
    Coverity also says:
    
    175312, 175313 Insecure chroot
    
    If a call to chroot is not followed by a call to chdir("/") the chroot jail confinement can be violated.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    84df563 View commit details
    Browse the repository at this point in the history
  28. coverity: img_raw_fd() returns a negative number

    criu/pagemap.c:245: negative_return_fn: Function "img_raw_fd(pr->pi)" returns a negative number.
    criu/pagemap.c:245: assign: Assigning: "fd" = "img_raw_fd(pr->pi)".
    criu/pagemap.c:258: negative_returns: "fd" is passed to a parameter that cannot be negative.
    
    criu/ipc_ns.c:762: negative_return_fn: Function "img_raw_fd(img)" returns a negative number.
    criu/ipc_ns.c:762: assign: Assigning: "ifd" = "img_raw_fd(img)".
    criu/ipc_ns.c:768: negative_returns: "ifd" is passed to a parameter that cannot be negative.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    cec4325 View commit details
    Browse the repository at this point in the history
  29. namespaces: fix 'Declaring variable "path" without initializer'

    criu/namespaces.c:529: var_decl: Declaring variable "path" without initializer.
    criu/namespaces.c:602: uninit_use_in_call: Using uninitialized value "*path" as argument to "%s" when calling "print_on_level".
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    2d290ee View commit details
    Browse the repository at this point in the history
  30. CI: rename 'travis' to 'ci'

    CRIU is already using multiple CI systems and not just Travis. This
    renames all Travis related things to 'ci' to show it is actually
    independent of Travis.
    
    Just a simple rename.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    0e47308 View commit details
    Browse the repository at this point in the history
  31. CI: distribute CI jobs between CI systems

    Move podman, openj9, x86_64 tests from Travis to GitHub Actions.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    50878f4 View commit details
    Browse the repository at this point in the history
  32. ci: 'fix' lazy tests

    Most (all?) lazy tests are not being executed if "$KERN_MAJ" -ge "4" and
    "$KERN_MIN" -ge "18". Currently most CI systems are running on something
    with 5.4.x which means $KERN_MAJ is greater than 4 but $KERN_MIN is less
    than 18 and so we are not running any lazy tests.
    
    This commit removes the complete lazy test kernel version detection as
    kernels on the CI systems are new enough to always have all required
    features.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    8722bf0 View commit details
    Browse the repository at this point in the history
  33. ci: fix lazy-pages test selection

    The special characters in the test selection regexp should no be esaped
    for the regexp to work properly.
    
    Signed-off-by: Mike Rapoport <[email protected]>
    rppt authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    953e87c View commit details
    Browse the repository at this point in the history
  34. criu-ns: Remove unreachable statement

    Raising an exception breaks out of the normal
    flow of control of a code block. When an exception
    is not handled, the interpreter terminates execution
    of the program, or returns to its interactive main loop.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    68585de View commit details
    Browse the repository at this point in the history
  35. travis: rename centos test to centos7

    Because it is actually running on CentOS 7 and to easier distinguish it
    from the new CentOS 8 test.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    369e17b View commit details
    Browse the repository at this point in the history
  36. ci: switch centos7 to github actions

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    4074042 View commit details
    Browse the repository at this point in the history
  37. ci: add CentOS 8 based CI run

    Our CentOS based CI run is based on CentOS 7. CentOS 8 exists already
    for some time and CentOS 7 will probably go end of life at some point.
    
    This adds a CentOS 8 based CI run to be prepared for the time CentOS 7
    goes away.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 8, 2020
    Configuration menu
    Copy the full SHA
    ffac3d6 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2020

  1. uffd: fix 'double free detected in tcache 2'

    One of the previous static code analyzer fixes added a xfree() at the
    end of cr_lazy_pages(). It can, however, happen that during
    complete_forks() the memory location for events is moved by xrealloc()
    and the final xfree() will be done on the wrong address.
    
    Passing &events to handle_requests() enables the xfree() to free the
    correct and changed memory location.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    7e1f22b View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2020

  1. uffd: handle xrealloc() failure

    In the case, that xrealloc() fails do not overwrite the original pointer
    to be able to free the original pointer on exit.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    ab288c3 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2020

  1. vdso: Let zero-terminator in vdso_symbol_length

    When vdso symbol is copied, it should be zero-terminated.
    The logging code wants to print vdso names that differ
    between vdso from images and vdso that's provided by kernel:
    
    : pr_info("[%zu]`%s` offset differs: %lx != %lx (rt)\n",
    :		i, sym_name, sym_offset, rt_sym_offset);
    
    In unlikely event when vdso function name is longer than 32
    (not any currently), null-terminator is missing.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    403741f View commit details
    Browse the repository at this point in the history
  2. compel/log: Stop parsing at unknown format specifier

    Currently if the specifier can't be parsed - error message is printed
    and parsing of the format string continues. That's wrong as the argument
    for the specifier will be used for the next specifier. I.e:
      pr_info("[%zu]`%s`\n", 0UL, "")
    will crash PIE because %u is not known and the argument (0UL) will be
    used for dereferencing string for %s.
    
    Stop parsing printf position arguments at an unknown specifier.
    Make this string visible so that `grep Error` in zdtm.py will catch it:
    
    =[log]=> dump/zdtm/static/busyloop00/52/1/restore.log
    ------------------------ grep Error ------------------------
    b'(00.001847) pie: 52: vdso: ['
    b'Error: Unknown printf format %u'
    ------------------------ ERROR OVER ------------------------
    Send the 15 signal to  52
    Wait for zdtm/static/busyloop00(52) to die for 0.100000
    ======================= Test zdtm/static/busyloop00 PASS =======================
    
    Reported-by: @ashwani29
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    56d3eab View commit details
    Browse the repository at this point in the history
  3. compel/log: Provide %u specifier parsing

    %u is quite common and I remember there were workarounds to print
    (unsigned long) as long or whatever.
    Just support it from now - it's not hard and not much code.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    0ecec99 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2020

  1. tls: Add logging within send/recv callbacks

    Log messages showing the send/recv errno value would
    help us to debug issues such as checkpoint-restore#1280.
    
    Example:
        Error (criu/tls.c:321): tls: Pull callback recv failed: Connection reset by peer'
        Error (criu/tls.c:147): tls: Failed receiving data: Error in the pull function.'
        Error (criu/page-xfer.c:1225): page-xfer: Can't read pagemap from socket: I/O error"
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    42a86db View commit details
    Browse the repository at this point in the history
  2. ci: use graviton2 for arm64 tests on Travis

    Using travis-ci.com instead of travis-ci.org offers access to bare metal
    aarch64 based systems and thus enabling us to run the full CRIU CI test
    suite.
    
    Switch arm64 based tests to arm64-graviton2 for tests.
    
    This is the first non x86_64 architecture running tests and not just
    compile in Travis.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    3cf87ed View commit details
    Browse the repository at this point in the history
  3. CI: remove centos7 from Travis

    It is running on GitHub Actions
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    430e464 View commit details
    Browse the repository at this point in the history
  4. ci: remove special handling for mips

    For the schedule daily special definitions were needed for MIPS as it is
    not part of the release branch. Now that the release branch contains
    MIPS, it is no longer necessary to have separate files for MIPS.
    
    This also changes to make the scheduled runs actually daily and not
    hourly.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    a813f86 View commit details
    Browse the repository at this point in the history
  5. cr-restore: Properly inspect status in sigchld_process()

    Currently the code checks for SIGSTOP only if (!current).
    Let's provide better status checks for debug-ability.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    a667d57 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2020

  1. uffd: cleanup read error handling in handle_uffd_event

    We can't use errno in case read returned >=0 according to man.
    
    Found in scope of checkpoint-restore#1277
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Nov 25, 2020
    Configuration menu
    Copy the full SHA
    87d007b View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2020

  1. uffd: check for exited task when reading uffd_msg

    Sometimes there are uffd messages in a queue of a dying task and by the
    time these messages are processed in handle_request, the uffd is no
    longer valid and reading from it causes errors.
    
    Add processing of EBADF in handle_uffd_event() to gracefully handle such
    situation.
    
    Signed-off-by: Mike Rapoport <[email protected]>
    rppt authored and avagin committed Nov 28, 2020
    Configuration menu
    Copy the full SHA
    bc94f35 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2020

  1. zdtm: on fail with no error also print the tail of the log

    We see strange cases there page-server or lazy-pages are exiting with
    non-zero but print no errors, probably the tail of the log can help us
    to understand what happened.
    
    There are some other uses of grep_errors but let's only change cases
    where we explicitly through an exeption on bad ret. For others I'm not
    sure if we need extra output, e.g. for validly failing fault injections.
    
    To debug checkpoint-restore#1280
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    82f6518 View commit details
    Browse the repository at this point in the history
  2. vim: remove wrong 8-space tabs indent from python files

    Probably all vim users can setup their desired indent in their vimrc by
    themselfs.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    9cc1f05 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2020

  1. docs: fix simple typo, clietn -> client

    There is a small typo in test/zdtm/static/socket_aio.c, test/zdtm/static/socket_listen.c, test/zdtm/static/socket_listen4v6.c, test/zdtm/static/socket_listen6.c, test/zdtm/static/socket_udp-corked.c, test/zdtm/static/socket_udp.c, test/zdtm/static/socket_udplite.c.
    
    Should read `client` rather than `clietn`.
    
    Signed-off-by: Tim Gates <[email protected]>
    timgates42 authored and rppt committed Dec 1, 2020
    Configuration menu
    Copy the full SHA
    55a8b09 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2020

  1. compel/handle-elf: override unexpected precalculated addresses

    We've seen addresses in parasite.built-in.o precalculated by linker but
    in some unexpected manner:
    
    readelf -WS criu/pie/parasite.built-in.o
    Section Headers:
      [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
      [ 1] .text             PROGBITS        0000000000000000 000040 00400a 00  AX  0   0 16
      [87] .data             PROGBITS        0000000000000000 005000 000068 00  WA  0   0 4096
      [88] .rodata           PROGBITS        0000000000000080 005080 001016 00   A  0   0 32
    
    (Notes: All other sections does not have SHF_ALLOC or are of size 0, so I
    skip them. Need to add "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" to
    CFLAGS to reproduce.)
    
    Section 88 has address 0x80 in elf file but in our "consequent"
    addresses precalculation algorithm it should be at 0x5080:
    
      addr(.text) == 0x0
      addr(.data) == 0x400a + (0x1000 - 0x400a % 0x1000) + 0x68 == 0x5068
      addr(.rodata) == 0x5068 + (0x20 - 0x5068 % 0x20) == 0x5080
    
    Probably the linker advises us to move 4096 aligned section to the
    beginning to save some space, but it's just a guess.
    
    So probably we should be ready to "non-consequent" alignments
    precalculated and just override them.
    
    checkpoint-restore#1301
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and 0x7f454c46 committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    b27c7e9 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2020

  1. cr-restore: make CLONE_NEWPID flag in clone_flags more consistent

    I) Let's make CLONE_NEWPID in rsti(item)->clone_flags always only mean
    that we need to clone with CLONE_NEWPID to create this task. Only pidns
    reaper would have this flag because only they can be restored via clone
    with CLONE_NEWPID flag. If we have non pidns reaper root task but its
    pidns is different from criu this can be only restored into external
    pidns.
    
    II) Let's remove clone_flags variable from fork_with_pid as it does not
    actually needed now:
    
    clone_flags was introduced to be able to restore into external pidns
    
    rsti(item)->clone_flags is determined in prepare_pstree_kobj_ids and
    before (I) it means 1) parent has different namespace from item or 2)
    item is root task and criu has different namespace from it. We don't
    support nested pid namespaces so (1) is always false. And for (2) we
    have two cases a) pid == INIT_PID - when it is not possible to restore
    into external pidns b) pid != INIT_PID - when it is only possible to
    restore into external pidns.
    
    For (b) we previousely had CLONE_NEWPID flag in rsti(item)->clone_flags
    and to workaround it we've added this extra clone_flags variable, but I
    think it is not needed because we can simply remove CLONE_NEWPID from
    non-reaper processes initially.
    
    Also the code with removing CLONE_NEWPID from clone_flags and adding the
    same flag to rsti(item)->clone_flags is super strange because I don't
    see any other place where we later can use rsti(item)->clone_flags.
    
    III) Also don't print differen flags in "Forking task with ..." from
    which we actually use in clone.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    5db1657 View commit details
    Browse the repository at this point in the history
  2. namespaces: make root_ns_mask more consistent

    I) Make root_ns_mask always display namespaces of root task which are
    different from criu ones. All this play with temporary unsetting it
    makes this variable hard to understand (more over it is not in shared
    memory).
    
    II) Disable "INIT_PID + pidns is dumped" check for external pidns
    explicitly.
    
    III) On dump we should check that pidns of root task is external, not
    just any pidns is external (in case in future we would support nested
    pidns-es it would be wrong). That also allows us to use regular
    lookup_ns_by_id search.
    
    IV) On error when killing tasks we should kill only root task if it is
    an init of pidns. Previousely we had CLONE_NEWPID set in root_ns_mask
    for external pidns but root task was not init and we killed only root
    task on error cleanup.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    c72901d View commit details
    Browse the repository at this point in the history
  3. cr-restore: setup external pidns only for root task

    All other tasks will inherit, let's remove excess steps. While on it
    also add some info message about external pidns used.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    
    ---
    v2: add new external_pidns variable to sinchronize all uses of external
    pidns case
    Snorch authored and avagin committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    660e128 View commit details
    Browse the repository at this point in the history
  4. others/ns_ext: restore a process out of PID namespaces into the host …

    …PID namespace
    
    It is quiet a common case to move the process from one pidns to another
    existing pidns with criu (only restriction is pids should not
    intersect). Let's check it works.
    
    v2: - use pipe-s to synchronize processes
        - run the test in a pid namespace to avoid pid conflicts in the host
          pid namespace
        - grep errors in restore.log
        - add some more comments
    v3: use 1000 for ns_last_pid so that test works on systems with low
    pid_max; remove excess ';'s.
    
    Co-Developed-by: Andrei Vagin <[email protected]>
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    a9d0873 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2020

  1. x86/asm: fix compile error in bitops.h

    Build on Ubuntu 18.04 amd64 with command "make DEBUG=1" produces the following error:
    
    include/common/asm/bitops.h: Assembler messages:
    include/common/asm/bitops.h:71: Error: incorrect register `%edx' used with `q' suffix
    
    Signed-off-by: anatasluo <[email protected]>
    anatasluo authored and 0x7f454c46 committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    e0da8b8 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2020

  1. Configuration menu
    Copy the full SHA
    bde4e85 View commit details
    Browse the repository at this point in the history
  2. .gitignore: Remove qemu-user-static

    Not a thing since commit fe66807 ("travis: switch pcp64le and s390x
    to real hardware").
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    e403226 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2020

  1. CONTRIBUTING.md: add component prefix to the subject example

    If one will do "git log --oneline", it is quite easy to see that we
    don't begin subject lines with a capital letter. We start subjects with
    component prefixes where components (mostly) are lowercase. So let's fix
    it in contribution guide not to mislead newcomers.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and rppt committed Dec 19, 2020
    Configuration menu
    Copy the full SHA
    ac9843b View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2020

  1. ci: add Circle CI definition

    Circle CI provides bare metal test systems which are a very good
    environment for the CRIU test cases. This adds two CI runs on Circle CI.
    
    On Circle CI it is necessary to tell clang to use '-Wl,-z,now', because
    gcc has it hard-coded in Ubuntu and clang does not.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    52bbac5 View commit details
    Browse the repository at this point in the history
  2. ci: give an overview of the current CI environment

    As CRIU is using multiple different CI systems this adds a printout to
    each CI run about the CI environment for easier debugging of possible
    errors.
    
    Also use V=1 to build CRIU and the tests to easily see which compiler
    and which options are used.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    944bd0b View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2020

  1. ci: move alpine based tests to github actions

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Dec 26, 2020
    Configuration menu
    Copy the full SHA
    cf8c88d View commit details
    Browse the repository at this point in the history
  2. namespaces: don't set rst on error in switch_ns_by_fd

    This is just a small cleanup, no behaviour change.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Dec 26, 2020
    Configuration menu
    Copy the full SHA
    72fc2e8 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2020

  1. ci: Alpine's busybox based free does not understand -h

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    5351b6e View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2020

  1. test/zdtm_ct: Run zdtm.py in the host time namespace

    Before the 5.11 kernel, there is a known issue.
    
    start_time in /proc/pid/stat is printed in the host time namespace,
    but /proc/uptime is shown in a current namespace, but criu compares them
    to detect when a new task has reused one of old pids.
    
    Fixes: checkpoint-restore#1266
    
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Dec 29, 2020
    Configuration menu
    Copy the full SHA
    cb9c85f View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2021

  1. zdtm: look up iptables in /sbin and /usr/sbin

    On Ubuntu 20.04, iptables is in /usr/sbin/.
    
    Reported-by: Mr Jenkins
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Jan 1, 2021
    Configuration menu
    Copy the full SHA
    43023fe View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2021

  1. github: auto-close stale issues and pull requests

    This is a copy of stale.yml from the Podman repository to automatically
    close tickets after 365 days. After 30 days tickets and issues are
    marked as stale and after 365 tickets and issues are finally closed.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    b4be97d View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2021

  1. dump/ppc64,arm,mips: sanitize the ERESTART_RESTARTBLOCK -> EINTR tran…

    …sition
    
    1. The -ERESTART_RESTARTBLOCK case in get_task_regs() depends on kernel
       internals too much, and for no reason. We shouldn't rely on fact that
       a) we are going to do sigreturn() and b) restore_sigcontext() always
       sets restart_block->fn = do_no_restart_syscall which returns -EINTR.
    
       Just change this code to enforce -EINTR after restore, this is what
       we actually want until we teach criu to handle ERESTART_RESTARTBLOCK.
    
    2. Add pr_warn() to make the potential bug-reports more understandable,
       a sane application should handle -EINTR correctly but this is not
       always the case.
    
    Fixes: checkpoint-restore#1325
    Report-by: Mr Travis
    Inspired-by: dd71cca ("dump/x86: sanitize the ERESTART_RESTARTBLOCK -> EINTR transition")
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    f5a408c View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2021

  1. compel/test: Resolve missing includes

    Resolves checkpoint-restore#1333
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and 0x7f454c46 committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    61db62a View commit details
    Browse the repository at this point in the history
  2. compel/test: Add main makefile

    These changes enable running all compel tests with a single
    command from the root path of the repository:
    
    	# sudo make -C compel/test
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and 0x7f454c46 committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    988b402 View commit details
    Browse the repository at this point in the history
  3. ci: Enable compel testing

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and 0x7f454c46 committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    1b3274a View commit details
    Browse the repository at this point in the history
  4. compel: Fix missing loff_t in Alpine

    musl defines 'loff_t' in fcntl.h as 'off_t'.
    This patch resolves the following error when running the compel tests
    on Alpine Linux:
    
    gcc -O2 -g -Wall -Werror -c -Wstrict-prototypes -fno-stack-protector -nostdlib -fomit-frame-pointer -ffreestanding -fpie -I ../../../compel/include/uapi -o parasite.o parasite.c
    In file included from ../../../compel/include/uapi/compel/plugins/std/syscall.h:8,
                     from ../../../compel/include/uapi/compel/plugins/std.h:5,
                     from parasite.c:3:
    ../../../compel/include/uapi/compel/plugins/std/syscall-64.h:19:66: error: unknown type name 'loff_t'; did you mean 'off_t'?
       19 | extern long sys_pread (unsigned int fd, char *buf, size_t count, loff_t pos) ;
          |                                                                  ^~~~~~
          |                                                                  off_t
    ../../../compel/include/uapi/compel/plugins/std/syscall-64.h:96:46: error: unknown type name 'loff_t'; did you mean 'off_t'?
       96 | extern long sys_fallocate (int fd, int mode, loff_t offset, loff_t len) ;
          |                                              ^~~~~~
          |                                              off_t
    ../../../compel/include/uapi/compel/plugins/std/syscall-64.h:96:61: error: unknown type name 'loff_t'; did you mean 'off_t'?
       96 | extern long sys_fallocate (int fd, int mode, loff_t offset, loff_t len) ;
          |                                                             ^~~~~~
          |                                                             off_t
    make[1]: *** [Makefile:32: parasite.o] Error 1
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and 0x7f454c46 committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    cf0337c View commit details
    Browse the repository at this point in the history
  5. compel/test: Fix warn_unused_result

    gcc -O2 -g -Wall -Werror -I ../../../compel/include/uapi -o spy spy.c ../../../compel/libcompel.a
    spy.c: In function ‘check_pipe_ends’:
    spy.c:107:2: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
      107 |  write(wfd, "1", 2);
          |  ^~~~~~~~~~~~~~~~~~
    spy.c:108:2: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]
      108 |  read(rfd, aux, sizeof(aux));
          |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and 0x7f454c46 committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    0e7321c View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2021

  1. servicefd: don't move service fds in case they remain in the same place

    Improve the check to skip moving service fds in clone_service_fd because
    we don't need to move anything if old service fds resulting offset is
    the same as new service fds resulting offset. It saves us from excess
    calls to dup/fcntl(F_DUPFD).
    
    Currently we check that base is the same and shared fdt ids are the
    same, but there also can be situations where different bases with
    different shared fdt ids still give the same offset sum (running zdtm in
    Virtuozzo CT we've seen such a case where service_fd_base=512,
    new_base=128, service_fd_id=24, id=0, SERVICE_FD_MAX=16).
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    4178bea View commit details
    Browse the repository at this point in the history
  2. util: move open_proc_self_fd to service_fd

    We need this to avoid conflicts with file descriptors which has to be
    restored. Currently open_proc PROC_SELF is not used during restoring
    file descriptors, but we are going to use it for memfd restore.
    
    Note: in get_proc_fd let's not close service fd if we detect service fd
    is not ours, it will be replaced in open_pid_proc anyway, and e.g. in
    protected sfd context we can't close or open sfd, but can replace it
    without any problems.
    
    While on it also add FIXME because the check in get_proc_fd is error
    prone in some rare cases (nested pidns is not supported yet).
    
    We need to populate this new SELF service fd in populate_pid_proc, so
    that it is later available in protected context. Also don't close
    /proc/self service fd in prep_unix_sk_cwd as it can be called from
    protected context and there is no much point of closing it anyway.
    
    Close proc self servicefd in close_old_fds, because first we don't wan't
    to reuse it from some ancestor, second there can be some junk fd as we
    are yet only in the beginning of close_old_fds. This junk fd can come
    from service fds of other tasks from parent's shared fdtable, and this
    fd would not allow us to do opendir_proc(PROC_SELF).
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    3f047f1 View commit details
    Browse the repository at this point in the history
  3. memfd: use PROC_SELF instead of getpid in __open_proc

    This looks better for me, should be no functional change.
    
    Another implication of this is nested pid namespaces, when we will
    support them "__open_proc(getpid()...)" will try to open file of the
    process which has the same pid but in NS_ROOT pidns, which is bad.
    
    See also aa2d920 ("files: use PROC_SELF when a process accesses its
    /proc/PID") for a similar change.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Jan 20, 2021
    Configuration menu
    Copy the full SHA
    56853fb View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2021

  1. restore: warning: Value stored to 'ret' is never read

     criu/cr-restore.c:3230:3: note: Value stored to 'ret' is never read
                     ret = false;
                     ^     ~~~~~
      3228|   	if (n == -1) {
      3229|   		pr_perror("Failed to get number of supplementary groups");
      3230|-> 		ret = false;
      3231|   	}
      3232|   	if (n != n_groups)
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    8112e76 View commit details
    Browse the repository at this point in the history
  2. coverity: get_service_fd() is passed to a parameter that cannot be ne…

    …gative
    
    criu/fdstore.c:110: negative_return_fn: Function "get_service_fd(FDSTORE_SK_OFF)" returns a negative number.
    criu/fdstore.c:110: assign: Assigning: "sk" = "get_service_fd(FDSTORE_SK_OFF)".
    criu/fdstore.c:114: negative_returns: "sk" is passed to a parameter that cannot be negative.
    
    criu/namespaces.c:1366: negative_return_fn: Function "get_service_fd(USERNSD_SK)" returns a negative number.
    criu/namespaces.c:1366: assign: Assigning: "sk" = "get_service_fd(USERNSD_SK)".
    criu/namespaces.c:1389: negative_returns: "sk" is passed to a parameter that cannot be negative.
    
    Signed-off-by: Adrian Reber <[email protected]>
    Signed-off-by: Andrei Vagin <[email protected]>
    adrianreber authored and avagin committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    3dc47b2 View commit details
    Browse the repository at this point in the history
  3. dump: at exit do not call timing_stop if stats are not initialized

    Stats often call 'get_timing' function which has a BUG() assertion to
    catch cases when stats failed to initialize correctly.
    If stats haven't initialized yet assertion will also be triggered.
    We dont want the trigger to happen in a case when criu fails at early
    steps before initializing stats, but this can happen in the following
    case:
      - at cr_dump_tasks criu can catch error before the call to init_stats.
      - it then decides to gracefully quit with error and
        calls cr_dump_finish.
      - cr_dump_finish will call timing_stop -> get_timing
        and BUG() gets triggered
    
    But because criu is already quitting gracefully, BUG() is not needed.
    In this code path we can call timing_stop under proper condition.
    
    [avagin: rebase on top of criu-dev and a few minor changes]
    
    Signed-off-by: Andrei Vagin <[email protected]>
    valeriyvdovin authored and avagin committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    41b4867 View commit details
    Browse the repository at this point in the history
  4. mount: adjust log level for get_clean_mnt

    In case get_clean_mnt fails open_mountpoint is still able to resolve mounts
    by helper process or print error in the worst case. Using pr_warn instead of
    pr_perror.
    
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    504c032 View commit details
    Browse the repository at this point in the history
  5. mount: adjust log level for mnt_is_dir

    mnt_is_dir is used when looking up for suitable mount point. In some cases
    that function may fail several times. Error level seems to strict for this
    cases.
    Added error message to lookup_mnt_sdev in case all mnt_is_dir failed.
    As for open_handle and alloc_openable which are calling mnt_is_dir, they are
    used in check_open_handle, which will call error afterwards.
    
    Adjusted log level for __open_mountpoint result in open_handle since it is
    allowed to fail several times. open_handle caller get_mark_path expect
    possible failure and will print error in case.
    
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    d3b1d6e View commit details
    Browse the repository at this point in the history
  6. fsnotify: rework redundant code

    open_handle and first part of alloc_openable do the same work. Both these
    function are called from check_open_handle. Rework check_open_handle to call
    only alloc_openable.
    
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    2cf09cc View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2021

  1. Configuration menu
    Copy the full SHA
    11b3a1a View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2021

  1. ci: move vagrant test to cirrus ci

    With Travis dramatically reducing the minutes available for CI, CRIU
    needs a new place to run tests. This moves the Vagrant based Fedora 32
    no VDSO test cases to Cirrus CI. Cirrus CI seems to be one of the very
    few free CI services allowing access to /dev/kvm.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    9807413 View commit details
    Browse the repository at this point in the history
  2. zdtm: cleanup thread-bomb test error handling and printing

    1) Let's do test_init earlier so that max_nr test_msg is now visible in
    thread-bomb.out.
    
    2) Also lets check errors from malloc and pthread_...  functions, print
    messages about their errors and do proper deallocation at least.
    
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    af1103f View commit details
    Browse the repository at this point in the history
  3. ci: run aarch64 compile tests on Drone

    Besides Travis CI Drone CI seems to be only service providing ARM based
    builds. This switches the aarch64 and arm32 builds to drone.io.
    
    Because Drone CI is running in a Docker container we cannot use 'setarch
    linux32' as it requires the blocked syscall 'personality(2)'.
    
    But Drone CI provides an 'arch: arm' which gives the same architecture
    as 'setarch linux32' on Travis aarch64: armv8l
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    7766f12 View commit details
    Browse the repository at this point in the history
  4. ci: also use clang for compel-host-bin

    Running in an environment with clang and without gcc even installed
    does not work as compel-host-bin uses HOSTCC which defaults to gcc.
    
    If CLANG=1 is set this also sets HOSTCC to clang to actually build
    compel-host-bin with clang and not with gcc.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    76f9ccc View commit details
    Browse the repository at this point in the history
  5. namespaces: handle errors of snprintf

    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    90f043d View commit details
    Browse the repository at this point in the history
  6. util: zero the events pointer to avoid its double free

    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    7d63cea View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    098d4cc View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2021

  1. ci: fix syntax error in stale.yml

    The commas need to be inside of the quotes. Not on the outside.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 30, 2021
    Configuration menu
    Copy the full SHA
    d4b0f0f View commit details
    Browse the repository at this point in the history
  2. ci: upgrade vagrant and Fedora version

    The updates to the latest Vagrant version and from Fedora 32 to 33.
    
    Also using --no-tty instead of > /dev/null for vagrant up.
    
    Also run 'dnf upgrade -y' in out vagrant VM to get the latest kernel.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Jan 30, 2021
    Configuration menu
    Copy the full SHA
    9ec1f1a View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. ci: skip bpf tests on vagrant

    See: checkpoint-restore#1354
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    8c89fbd View commit details
    Browse the repository at this point in the history
  2. ci: factor out Fedora Rawhide CI setup

    To run Fedora Rawhide based aarch64 containers on Drone CI our current
    Dockerfile setup does not work.
    
    This moves the package installation out of the Dockerfile into
    scripts/ci/prepare-for-fedora-rawhide.sh to be usable in the Dockerfile
    environment and in the Drone CI environment.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    442dc65 View commit details
    Browse the repository at this point in the history
  3. ci: move Fedora Rawhide based tests away from Travis

    This moves Fedora Rawhide based tests away from Travis. To Github
    Actions for x86_64 and to Drone for aarch64.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    41efd59 View commit details
    Browse the repository at this point in the history
  4. Tell podman to use vfs as storage-driver

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    b62707b View commit details
    Browse the repository at this point in the history
  5. vdso: fix segmentation fault caused by char pointer array

    When I compile criu with "make DEBUG=1" and run it to restore my
    program, it produces a segmentation fault.
    
    In aarch64, with compile flag "-O0", when criu executes the code in pie,
    it is unable to visit the content of ARCH_VDSO_SYMBOLS. So I put these
    variables into the stack.
    
    Signed-off-by: anatasluo <[email protected]>
    anatasluo authored and avagin committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    2cb1156 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2021

  1. ci: move asan and image streamer test to github

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    5792612 View commit details
    Browse the repository at this point in the history
  2. README.md: remove trailing whitespaces

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    10cb852 View commit details
    Browse the repository at this point in the history
  3. README.md: remove unused badges; add a few new badges

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    4c3f324 View commit details
    Browse the repository at this point in the history
  4. ci: move compat tests to Github Actions

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    81c3c97 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2021

  1. dump: dump has to fail if there is locks and --file-locks isn't set

    If criu finds a file lock and the --file-locks option isn't set, it
    stops dumping processes, resumes them and exits with an error.
    
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    7a64074 View commit details
    Browse the repository at this point in the history
  2. test/zdtm: check that locks are not dumped if --file-locks isn't set

    If criu finds a file lock and the --file-locks option isn't set, it
    stops dumping processes, resumes them and exits with an error.
    
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    3fb8cd3 View commit details
    Browse the repository at this point in the history
  3. ci: move coverage run to github

    This also connects the coverage run to codecov.io.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    042560a View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2021

  1. files: Don't forget on stripping deleted postfix on linked files

    Otherwise we gonna accumulated "(deleted)" postfix generated by
    kernel on every c/r iteration eventually overflowing PATH_MAX
    which will make container undumpable.
    
    Signed-off-by: Cyrill Gorcunov <[email protected]>
    azhadchenko authored and avagin committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    9546f39 View commit details
    Browse the repository at this point in the history
  2. files-reg: rework strip_deleted

    Moved strip_deleted to util and reworked it so other parts of criu can use
    it without the need of files-reg.h
    
    Reviewed-by: Alexander Mikhalitsyn <[email protected]>
    Reviewed-by: Pavel Tikhomirov <[email protected]>
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    8d92d46 View commit details
    Browse the repository at this point in the history
  3. sk-unix: make criu respect existing files while restoring ghost unix …

    …socket fd
    
    If there are any file in place of ghost unix socket, criu will delete it at
    restore while trying to recreate ghost one.
    
    Reviewed-by: Alexander Mikhalitsyn <[email protected]>
    Reviewed-by: Pavel Tikhomirov <[email protected]>
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    a4c000e View commit details
    Browse the repository at this point in the history
  4. sk-unix: rework unix_resolve_name

    Use SIOCUNIXFILE ioctl approach to get socket fd opened with O_PATH. Utilise it
    for detecting deletion and resolving relative name. Preserve old method as
    fallback if this new IOCTL fails.
    
    Also remove overmount_sock crfail in zdtm. With the unix_resolve_name
    reworked to use SIOCUNIXFILE criu can now pass this test.
    
    Reviewed-by: Alexander Mikhalitsyn <[email protected]>
    Reviewed-by: Pavel Tikhomirov <[email protected]>
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    82f2033 View commit details
    Browse the repository at this point in the history
  5. zdtm: add fifo upon unix socket test case

    Create unix socket and unlink it. Make fifo in this place.
    
    Reviewed-by: Alexander Mikhalitsyn <[email protected]>
    Reviewed-by: Pavel Tikhomirov <[email protected]>
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    903b903 View commit details
    Browse the repository at this point in the history
  6. zdtm: add second fifo_upon_unix test

    This differs from the previous one by
    1. using relative path instead of absolute
    2. chdir() after setup
    
    Reviewed-by: Alexander Mikhalitsyn <[email protected]>
    Reviewed-by: Pavel Tikhomirov <[email protected]>
    Signed-off-by: Andrey Zhadchenko <[email protected]>
    azhadchenko authored and avagin committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    1b5dbe5 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2021

  1. seccomp: initialize seccomp_mode in all cases

    In parse_pid_status(), it is assumed that the seccomp field can be
    missing from /proc/pid/status. When the field is missing, it is not
    properly initialized, leading to bad behavior.
    
    We initialize seccomp_mode to SECCOMP_MODE_DISABLED by default,
    similarly to what is done in compel/src/lib/infect.c:parse_pid_status.
    
    Signed-off-by: Nicolas Viennot <[email protected]>
    nviennot authored and avagin committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    42c2112 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2021

  1. ci: use runc instead of crun for podman tests

    The latest podman pulls in crun instead of runc. Unfortunately crun is
    not built against libcriu and does not support checkpoint/restore.
    
    Switch back to runc.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    a277c84 View commit details
    Browse the repository at this point in the history
  2. file-lock: Add space in error message

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    2692215 View commit details
    Browse the repository at this point in the history
  3. javaTests: Add --file-locks option

    Resolves checkpoint-restore#1370
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    89aa874 View commit details
    Browse the repository at this point in the history
  4. test: Reduce verbosity of mvn output

    The -q option will only show errors
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    7a8f426 View commit details
    Browse the repository at this point in the history
  5. zdtm: Add javaTests output to .gitignore

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    6110236 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2021

  1. test: fix test compilation on rawhide

    The latest glibc has redefined SIGSTKSZ as 'sysconf (_SC_SIGSTKSZ)' and
    this breaks a static char[] definition.
    
    Hardcoding TESTSIGSTKSZ to 16384 in the test. This fixes:
    
     sigaltstack.c:17:13: error: variably modified 'stack_thread' at file scope
       17 | static char stack_thread[SIGSTKSZ + TEST_MSG_BUFFER_SIZE] __stack_aligned__;
          |             ^~~~~~~~~~~~
    sigaltstack.c:18:13: error: variably modified 'stack_main' at file scope
       18 | static char stack_main[SIGSTKSZ + TEST_MSG_BUFFER_SIZE] __stack_aligned__;
          |             ^~~~~~~~~~
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    42171ca View commit details
    Browse the repository at this point in the history
  2. bug: add __builtin_unreachable in BUG_ON_HANDLER

    This will surpress false gcc warnings like this:
    criu/stats.c:85:10: error: array subscript 4 is above array bounds
    of 'struct timing[2]' [-Werror=array-bounds]
       85 |   return &rstats->timings[t];
          |          ^~~~~~~~~~~~~~~~~~~
    criu/stats.c:25:16: note: while referencing 'timings'
       25 |  struct timing timings[RESTORE_TIME_NS_STATS];
          |                ^~~~~~~
    cc1: all warnings being treated as errors
    
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    950a88c View commit details
    Browse the repository at this point in the history
  3. sk-unix: check whether a socket name is NULL before printing it

    criu/include/log.h:72:2: error: '%s' directive argument is null [-Werror=format-overflow=]
       72 |  print_on_level(LOG_DEBUG,     \
          |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       73 |          LOG_PREFIX fmt, ##__VA_ARGS__)
          |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    criu/sk-unix.c:133:2: note: in expansion of macro 'pr_debug'
      133 |  pr_debug("\t%s: ino %u peer_ino %u family %4d type %4d state %2d name %s\n",
          |  ^~~~~~~~
      CC       criu/stats.o
    
    Fixes: checkpoint-restore#1373
    Signed-off-by: Andrei Vagin <[email protected]>
    avagin committed Feb 24, 2021
    Configuration menu
    Copy the full SHA
    3397ac0 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2021

  1. plugin: check for plugin path truncation

    New compilators print warnings if snprintf return value is not checked
    for truncation. Let's make them happy.
    
    Fixes: checkpoint-restore#1372
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    ab395e4 View commit details
    Browse the repository at this point in the history
  2. ci: fix Fedora rawhide CI failures

    It seems the Fedora rawhide /tmp is no longer 1777 but 755.
    
    Change it back to 1777 to make our CI runs successful again.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 1, 2021
    Configuration menu
    Copy the full SHA
    168668e View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2021

  1. Configuration menu
    Copy the full SHA
    e0d4aef View commit details
    Browse the repository at this point in the history
  2. ci/compat: Check if tests are 32-bit ELFs

    To be sure that we don't lose COMPAT_TEST=y on the way to make.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    f8cf071 View commit details
    Browse the repository at this point in the history
  3. x86: Use PTRACE_GET_THREAD_AREA instead of sys_get_thread_area()

    To minimize things done in parasite, PTRACE_GET_THREAD_AREA can be
    used to get remote tls. That also removes an additional compat stack
    (de)allocation in the parasite (also asm-coded syscall).
    
    In order to use PTRACE_GET_THREAD_AREA, the dumpee should be stopped.
    So, let's move this from criu to compel to non-seized state and put tls
    into thread info on x86.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    84be304 View commit details
    Browse the repository at this point in the history
  4. namespaces: properly handle errors of snprintf

    If snprintf was truncated we should probably know about it instead of
    continuing to increase off, as snprintf returns number of characters
    which would have been written and not the number which was actually
    written.
    
    Normally we check snprintf only for overflow not for error, some modern
    compilers print warnings if truncation was not checked.
    
    Probably it was the case why we implemented [1], the truncation happened
    and on the next iteration of for loop we've hit negative size for
    snprintf and got -1.
    
    Fixes: 90f043d ("namespaces: handle errors of snprintf") [1]
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    e4e58a8 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2021

  1. x86/compel/fault-inject: Add a fault-injection for corrupting extende…

    …d regset
    
    With pseudo-random garbage, the seed is printed with pr_err().
    get_task_regs() is called during seizing the task and also for each
    thread.
    At this moment only for x86.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    2fdc094 View commit details
    Browse the repository at this point in the history
  2. zdtm/fpu00: Simplify ifdeffery

    ..to introduce a new one! ;-D
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    6e1cd5b View commit details
    Browse the repository at this point in the history
  3. zdtm/fpu03: Add a test to check fpu C/R in a thread

    CRIU dumps main thread and sub-threads differently, so there needed
    a test to check if fpu is preserved across C/R in sub-threads.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    8394062 View commit details
    Browse the repository at this point in the history
  4. compel: Store extended registers set in the thread context

    Extended registers set for task is restored with rt_sigreturn() through
    prepared sigframe. For threads it's currently lost.
    Preserve it inside thread context to restore on thread curing.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    e9b1e0b View commit details
    Browse the repository at this point in the history
  5. compel: Provide compel_set_task_ext_regs()

    Arch-dependend way to restore extended registers set.
    Use it straight-away to restore per-thread registers.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    e07e5ee View commit details
    Browse the repository at this point in the history
  6. fault-injection: Run fpu corruption tests

    For the thread leader and for subthreads too.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    24f57c6 View commit details
    Browse the repository at this point in the history
  7. s390: Purge stale comment

    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    fc1fefd View commit details
    Browse the repository at this point in the history
  8. Revert "compel: add -ffreestanding to force gcc not to use builtin me…

    …mcpy, memset"
    
    This reverts commit c98af78.
    
    Now FPU/SSE/MMX/etc can be used inside parasite.
    Let's have compiler optimizations back.
    
    Cc: Alexander Mikhalitsyn <[email protected]>
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    6569412 View commit details
    Browse the repository at this point in the history
  9. zdtm/fpu03: Add .desc file to omit running on !x86

    I managed to forget .desc file and ppc on Jenkins now fails with:
    
    > === Run 177/394 =======--------- zdtm/static/fpu03
    > timens isn't supported on 5.8.18-100.fc31.ppc64le
    > ========================== Run zdtm/static/fpu03 in h ==========================
    > Start test
    > ./fpu03 --pidfile=fpu03.pid --outfile=fpu03.out
    > make: *** [Makefile:430: fpu03.pid] Error 1
    >  Test zdtm/static/fpu03 FAIL at ['make', '--no-print-directory', '-C', 'zdtm/static', 'fpu03.pid']
    > Test output: ================================
    > 08:56:48.325:    56: SKIP: fpu03.c:116: Unsupported arch
    > 08:56:48.325:    55: ERR: test.c:316: Test exited unexpectedly with code 0
    >
    >  <<< ================================
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    447b3cf View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2021

  1. test: move vt test to minor 65 on s390x

    Our Jenkins s390x vt test fails with
    
    ./vt --pidfile=vt.pid --outfile=vt.out --filename=vt.test
    make: *** [Makefile:432: vt.pid] Error 1
     Test zdtm/static/vt FAIL at ['make', '--no-print-directory', '-C', 'zdtm/static', 'vt.pid']
    Test output: ================================
    08:08:15.556:    54: ERR: vt.c:38: Open virtual terminal vt.test failed (errno = 6 (No such device or address))
    08:08:15.556:    53: ERR: test.c:316: Test exited unexpectedly with code 1
    
    Because the host has no ttyS0 as used previously. This changes the test
    to use 'ttysclp0'. That seems to exist on multiple s390x we checked.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    1c1949a View commit details
    Browse the repository at this point in the history
  2. pstree: check for pid collision before switching to new sid/gid

    Without this check we can hit the BUG in lookup_create_item just a few
    steps later (if one thread in images has same pid with new sid/gid). And
    also this check saves us from different sorts of unexpected errors on
    restore (if one non-thread task in images has same pid/sid/gid already).
    
    Fixes: checkpoint-restore#1332
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    77968d4 View commit details
    Browse the repository at this point in the history
  3. ci: move Travis CI Docker tests to GitHub Actions

    Travis CI is no longer providing CI minutes for open source projects.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    b51fb87 View commit details
    Browse the repository at this point in the history
  4. docker-test: use containerd v1.5.0-beta.0

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    19be9ce View commit details
    Browse the repository at this point in the history
  5. docker-test: set log file path

    By default docker writes logs in a run-time directory unique for each
    container. To be able to read this file, we can specify the path in
    CRIU's configuration file for runc.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    fddf3a7 View commit details
    Browse the repository at this point in the history
  6. lib/cli.py: Open out file as a binary

    python3 fails to encode image with the following:
    
    > [dima@Mindolluin criu]$ ./crit/crit encode -i tmp -o tmp.1
    > Traceback (most recent call last):
    >   File "/home/dima/src/criu/./crit/crit", line 6, in <module>
    >     cli.main()
    >   File "/home/dima/src/criu/crit/pycriu/cli.py", line 410, in main
    >     opts["func"](opts)
    >   File "/home/dima/src/criu/crit/pycriu/cli.py", line 50, in encode
    >     pycriu.images.dump(img, outf(opts))
    >   File "/home/dima/src/criu/crit/pycriu/images/images.py", line 617, in dump
    >     f.write(struct.pack('i', magic.by_name['IMG_COMMON']))
    > TypeError: write() argument must be str, not bytes
    
    Opening the output file as binary seems to help.
    
    Signed-off-by: Dmitry Safonov <[email protected]>
    0x7f454c46 authored and avagin committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    ca2d273 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2021

  1. ci: remove '-Wl,-z,now' workaround

    This removes extending LDFLAGS with '-Wl,-z,now'. This was added as
    workaround but never really worked. It is correctly fixed with
    pull request checkpoint-restore#1379
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    cdfca86 View commit details
    Browse the repository at this point in the history
  2. lib: fix recode errors seen in Jenkins

    Although we are running crit-recode.py also in all CI runs we never seen
    following error except in Jenkins:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.8/base64.py", line 510, in _input_type_check
        m = memoryview(s)
    TypeError: memoryview: a bytes-like object is required, not 'str'
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "./test/crit-recode.py", line 25, in recode_and_check
        r_img = pycriu.images.dumps(pb)
      File "/var/lib/jenkins/workspace/Q/test/pycriu/images/images.py", line 635, in dumps
        dump(img, f)
      File "/var/lib/jenkins/workspace/Q/test/pycriu/images/images.py", line 626, in dump
        handler.dump(img['entries'], f)
      File "/var/lib/jenkins/workspace/Q/test/pycriu/images/images.py", line 289, in dump
        f.write(base64.decodebytes(item['extra']))
      File "/usr/lib/python3.8/base64.py", line 545, in decodebytes
        _input_type_check(s)
      File "/usr/lib/python3.8/base64.py", line 513, in _input_type_check
        raise TypeError(msg) from err
    TypeError: expected bytes-like object, not str
    
    This commit fixes this by encoding the string to bytes.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    8017b6a View commit details
    Browse the repository at this point in the history
  3. ci: run recode tests on more input files

    We were running crit-recode in CI only on the output of
    zdtm/static/env00.
    
    This adds zdtm/transition/fork and zdtm/static/ghost_holes00
    to run through crit-recode as the image files from those test
    triggered errors in Jenkins we did not see in CI.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    9f2a696 View commit details
    Browse the repository at this point in the history
  4. ci: remove ccache setup

    ccache was set up in Travis to speed up compilation by re-using the
    .ccache directory from previous CI runs. As we are no longer using
    Travis we can remove all CI related ccache setup.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    b7d2c2a View commit details
    Browse the repository at this point in the history
  5. ci: run zdtm/transition/pid_reuse with pre-dumps in ci tests

    This test should be run with at least 1 pre-dump to trigger the problem as mentioned in commit 4d9bf60.
    
    Signed-off-by: Zeyad Yasser <[email protected]>
    ZeyadYasser authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    628ff18 View commit details
    Browse the repository at this point in the history
  6. criu-ns: Convert indentation to spaces

    Spaces are the preferred indentation method.
    https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    42df849 View commit details
    Browse the repository at this point in the history
  7. criu-ns: Remove space before/after bracket

    Avoid extraneous whitespace.
    https://python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    a6659c3 View commit details
    Browse the repository at this point in the history
  8. criu-ns: Extract mount new /proc into a function

    By extracting this code into a function the main code becomes
    smaller and more obvious.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    c7d7608 View commit details
    Browse the repository at this point in the history
  9. criu-ns: Extract wait for process into a function

    Reduce duplication of code.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    097834d View commit details
    Browse the repository at this point in the history
  10. criu-ns: Use documentation strings

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    b790ce2 View commit details
    Browse the repository at this point in the history
  11. criu-ns: Remove unused _umount

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    ab9418d View commit details
    Browse the repository at this point in the history
  12. criu-ns: Extract set namespace functions

    This change extracts some of the duplicated code from
    set_pidns() and set_mntns() functions.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    44a1d32 View commit details
    Browse the repository at this point in the history
  13. criu-ns: Close namespace fd before raise

    It is a good practice to close open file descriptors.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    b31d3ad View commit details
    Browse the repository at this point in the history
  14. criu-ns: Pass arguments to run_criu()

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    6055d0b View commit details
    Browse the repository at this point in the history
  15. criu-ns: Handle restore-detached option

    The criu-ns script creates a new PID namespace where criu is the "init"
    process. When using the --restore-detached option with criu-ns, users
    expect criu-ns to exit without killing the restored process tree.
    
    Thus, criu-ns should not pass the --restore-detached to criu to prevent
    it from terminating, and it should exit instead of waiting for criu's
    exit status.
    
    Resolves checkpoint-restore#1278
    
    Suggested-by: Andrei Vagin <[email protected]>
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    719c5b0 View commit details
    Browse the repository at this point in the history
  16. criu-ns: Add unsupported msg for restore-sibling

    Currently criu-ns does not support the --restore-sibling option.
    
    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    66f5ab4 View commit details
    Browse the repository at this point in the history
  17. criu-ns: Merge comparisons with 'in'

    Signed-off-by: Radostin Stoyanov <[email protected]>
    rst0git authored and avagin committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    d49ace9 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2021

  1. lib: fromstring() and tostring() are deprecated

    fromstring() and tostring() are deprecated since Python 3.2 and have
    been removed in 3.9. Both functions were just aliases and this patch
    changes images.py to directly call fromybytes() and tobytes().
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    02b0e85 View commit details
    Browse the repository at this point in the history
  2. lib: correctly handle padding of dump images

    With the switch to Python3 and binary output it is not possible to use
    code like: 'f.write('\0' * (rounded - size))'. Switching to binary
    helps.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 16, 2021
    Configuration menu
    Copy the full SHA
    c8beca6 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2021

  1. pstree: don't change sid/gid-s if current sid/gid is the same

    Previously we only skipped replacing sid for shell job if root_item was
    session leader, but there is other case where root_item sid is the same
    as current_sid we can safely skip replacing for this case. Same applies
    to gid-s.
    
    Now after we have pid collision check we not only "can" but should skip
    pid collision checks for the latter case. It is quite obvious that
    there are tasks in tree with sid==current_sid if current_sid==old_sid.
    
    Fixes: checkpoint-restore#1400
    Fixes: 77968d4 ("pstree: check for pid collision before switching to
    new sid/gid")
    Signed-off-by: Pavel Tikhomirov <[email protected]>
    Snorch authored and avagin committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    d334ba3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b0d752 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2021

  1. ci: move CentOS 8 based test to Cirrus

    The kernel on GitHub Actions has a bug
    
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1919472
    
    which breaks our CI. It works on Cirrus. Let's move it there.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 22, 2021
    Configuration menu
    Copy the full SHA
    ca03208 View commit details
    Browse the repository at this point in the history
  2. lib: fix crit-recode fix for Python 2

    The recent fix to make Jenkins run crit-recode again broke
    Python 2 support (because Python 2 based CI was not running).
    
    This should fix the Python 2 based test run.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 22, 2021
    Configuration menu
    Copy the full SHA
    49b9cff View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2021

  1. cr-service: fix CRIU_REQ_TYPE__FEATURE_CHECK RPC request

    Closes: checkpoint-restore#1408
    
    CRIU_REQ_TYPE__FEATURE_CHECK was failing, this was caused by two
    things in handle_feature_check():
    	1. setup_opts_from_req() was used and it could be NULL
    	   (kerndat_init() is enough for feature checking)
    	2. resp.success was always set to false
    
    Signed-off-by: Zeyad Yasser <[email protected]>
    ZeyadYasser authored and avagin committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    4806058 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2021

  1. criu: Throw error when parent path is provided but invalid

    In image dump directory, there are 2 parent symlink error cases:
    - Parent symlink does not exist
    - Parent symlink exists but points to invalid target
    
    At the moment, 2 cases are handled exactly the same (do full dump). However, while
    the first case happen when parent path is not provided, the second one is likely
    user's mistake when provides invalid parent path.
    
    So we throw an error in the latter case instead of performing the full dump.
    
    Signed-off-by: Bui Quang Minh <[email protected]>
    minhbq-99 authored and avagin committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    9edf531 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2021

  1. criu: Replace faccessat with fstatat when using AT_SYMLINK_NOFOLLOW flag

    Currently, alpine musl libc library returns Invalid argument error (EINVAL)
    when calling faccessat with AT_SYMLINK_NOFOLLOW flag.
    
    Fix this by using fstatat instead.
    
    Signed-off-by: Bui Quang Minh <[email protected]>
    minhbq-99 authored and avagin committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    840dc0b View commit details
    Browse the repository at this point in the history
  2. lib: correctly handle stdin/stdout (Python 3)

    This changes stdin to be opened as binary if the input is not a tty.
    
    This changes stdout to be opened as binary if encoding or if the output
    is not a tty.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    f9616e9 View commit details
    Browse the repository at this point in the history
  3. lib: print nice error if crit gets wrong input

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    35a4761 View commit details
    Browse the repository at this point in the history
  4. lib: also handle extra pipe data correctly

    CI sometimes errors out encoding/decoding extra pipe data.
    
    This should fix extra pipe data for Python 3 and still keep it working
    on Python 2.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    e65a56a View commit details
    Browse the repository at this point in the history
  5. test: fix crit test and extend it

    This fixes the others/crit test to work again and extends it to make
    sure all possible input and output options are correctly handled by
    crit.
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    7accc44 View commit details
    Browse the repository at this point in the history
  6. ci: enable crit tests in CI

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    38a9cbe View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2021

  1. images: re-license as Expat license (so-called MIT)

    This changes the license of all files in the images/ directory from
    GPLv2 to the Expat license (so-called MIT).
    
    According to git the files have been authored by:
    
       Abhishek Dubey
       Adrian Reber
       Alexander Mikhalitsyn
       Alice Frosi
       Andrei Vagin (Andrew Vagin, Andrey Vagin)
       Cyrill Gorcunov
       Dengguangxing
       Dmitry Safonov
       Guoyun Sun
       Kirill Tkhai
       Kir Kolyshkin
       Laurent Dufour
       Michael Holzheu
       Michał Cłapiński
       Mike Rapoport
       Nicolas Viennot
       Nikita Spiridonov
       Pavel Emelianov (Pavel Emelyanov)
       Pavel Tikhomirov
       Radostin Stoyanov
       [email protected]
       Sebastian Pipping
       Stanislav Kinsburskiy
       Tycho Andersen
       Valeriy Vdovin
    
    The Expat license (so-called MIT) can be found here:
    https://opensource.org/licenses/MIT
    
    According to that link the correct SPDX short identifier is 'MIT'.
    
    https://spdx.org/licenses/MIT.html
    
    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber authored and avagin committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    b98bbda View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2021

  1. Makefile: add show-version command

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    9d7353a View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. Try packit 3

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    850e63f View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. fmf definitions

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    b3a8763 View commit details
    Browse the repository at this point in the history
  2. tests not copr_build

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    4550c27 View commit details
    Browse the repository at this point in the history
  3. ci.fmf

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    f96459c View commit details
    Browse the repository at this point in the history
  4. arch64 and x86_64

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    fbed4e7 View commit details
    Browse the repository at this point in the history
  5. install dependencies

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    06df979 View commit details
    Browse the repository at this point in the history
  6. cd_to_top

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    be84ef4 View commit details
    Browse the repository at this point in the history
  7. protobuf link

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    955920e View commit details
    Browse the repository at this point in the history
  8. fix ln

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    a779996 View commit details
    Browse the repository at this point in the history
  9. setenforce 0

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    f268371 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. prepare

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    318521e View commit details
    Browse the repository at this point in the history
  2. change prepare

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    1359f85 View commit details
    Browse the repository at this point in the history
  3. remove aarch64 from tests

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    9e17c91 View commit details
    Browse the repository at this point in the history
  4. remove prepare section

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    5244068 View commit details
    Browse the repository at this point in the history
  5. more setenforce 0

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    8984683 View commit details
    Browse the repository at this point in the history
  6. install libselinux-devel

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    3508268 View commit details
    Browse the repository at this point in the history
  7. fix missing ;

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    d9b744f View commit details
    Browse the repository at this point in the history
  8. disable sssd

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    9f7ec7a View commit details
    Browse the repository at this point in the history
  9. enable selinux again and keep-going

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    8430725 View commit details
    Browse the repository at this point in the history
  10. echo 1 > /proc/sys/vm/unprivileged_userfaultfd

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    a87162e View commit details
    Browse the repository at this point in the history
  11. test: remove ../criu from all directory paths

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 15, 2021
    Configuration menu
    Copy the full SHA
    19cd059 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2021

  1. one more change

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    597adf9 View commit details
    Browse the repository at this point in the history
  2. try this

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    c325430 View commit details
    Browse the repository at this point in the history
  3. allow userfaultfd in userns

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    19235aa View commit details
    Browse the repository at this point in the history
  4. remove '

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    1888573 View commit details
    Browse the repository at this point in the history
  5. add some ;

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    624844e View commit details
    Browse the repository at this point in the history
  6. Skip tun_ns on F33

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    b2a2a01 View commit details
    Browse the repository at this point in the history
  7. Install libbsd-devel on Fedora

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    1183274 View commit details
    Browse the repository at this point in the history
  8. ci: skip error injection on 5.12

    Signed-off-by: Adrian Reber <[email protected]>
    adrianreber committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    fe31d83 View commit details
    Browse the repository at this point in the history