Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Cyrill Gorcunov | 4c45bd130b0 | AUTO Version bump to 0.0.0.5 | |||
Stanislav Kinsburskiy | 598d57e61d9 | vz7: compel: new catch and "release at" helpers addedThese helpers are compel_run_at split result. IOW, it's an asynchronious way of calling some binary code in remote process and cathing it after it's done. Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Stanislav Kinsburskiy | dee4b04d462 | vz7: compel: wrap rt_sigframe with parenthesesIt can be passed as link to real object. Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Cyrill Gorcunov | cf411470b71 | AUTO Version bump to 0.0.0.4 | |||
Stanislav Kinsburskiy | 14eed594776 | vz7: compel: compel_emergency_sigframe() helper introducedThis helper constructs sigframe, which can be used to resume process from the point where it was stopped. Result has to be copied to the process manually and then used with rt_sigreturn. Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Cyrill Gorcunov | 0d4758a9fcf | AUTO Version bump to 0.0.0.3 | |||
Cyrill Gorcunov | 4430d9bff7b | Add Makefile.versionThe package and repo is used to create libcompel library and ship it as RPM packet. https://jira.sw.ru/browse/PSBM-56266 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | PSBM-56266 | ||
Stanislav Kinsburskiy | ac069ede4aa | vz7: compel: return ptrace area helpers back to uapiThese helpers are valuable and can be used outside. Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Cyrill Gorcunov | 5fc543cdd9c | vz7: Drop obsolete commentSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Cyrill Gorcunov | 0d46d913cb4 | vz7: Sync with xemul/criu-devSync with vanilla e3c92d2748c5f0a1a0f6ad4e844d21a3fbbd0adf Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Cyrill Gorcunov | 6473c351319 | vz7: Drop obsolete commentSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | |||
Cyrill Gorcunov | 5c98b2c452b | AUTO Version bump to 0.0.0.2 | |||
Cyrill Gorcunov | 9b824494378 | Add Makefile.versionThe package and repo is used to create libcompel library and ship it as RPM packet. https://jira.sw.ru/browse/PSBM-56266 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | PSBM-56266 | ||
Andrei Vagin | 61c8c1f88b9 | soccr: add a testThis test construct both ends of tcp connections and check that it works in both directions. travis-ci: success for soccr: add a test Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Kirill Tkhai | f4615e2146d | ns: Fix error return value in __get_ns_id()Function has unsigned int return value, and error is coded by 0, not -1. travis-ci: success for ns: Fix error return value in __get_ns_id() Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Dmitry Safonov | 1d9ffe2ecf3 | zdtm/fanotify00: fix fanotify_{init, mark} callsO_* flags should be in event_f_flags parameter, according to fanotify_init(2). On x86_32 fanotify_mark() has second mask argument (as mask is 64-bit, the higher parts of mask shouldn't be used): > COMPAT_SYSCALL_DEFINE6(fanotify_mark, > int, fanotify_fd, unsigned int, flags, > __u32, mask0, __u32, mask1, int, dfd, > const char __user *, pathname) > { > return sys_fanotify_mark(fan... | |||
Dmitry Safonov | 7b20d7cf59b | x86/restorer/compat: let stack32 be per-threadAs threads restore in parallel, stack32 may be reused concurrently leading to reusing others thread's data. So, let it lay on stack. It would still worth making 32-bit stack per-task reusing it in threads but at this moment introducing such complexity looks like premature optimization. It does not affect 64-bit C/R. Fixes: file_aio, sigaltstack, clone_fs, socket_aio, different_creds, futex tr... | |||
Dmitry Safonov | b016ec3f3b7 | zdtm/test: add infop to waitid()The man page says, it's not optional argument: The application shall ensure that the infop argument points to a siginfo_t structure. Fixes: Test output: ================================ 17:40:26.128: 5: FAIL: helper_zombie_child.c:33: waitid (errno = 14 (Bad address)) 17:40:26.128: 4: FAIL: helper_zombie_child.c:78: read (errno = 2 (No such file or directory)) 17:40:26.129: 3: ... | |||
Dmitry Safonov | 8a9e69ec32c | compel/x86: clang-3.4 isn't a friend to numbers in macroIt's a workaround to clang-3.4, which doesn't handle numbers in asm macros rightly: https://llvm.org/bugs/show_bug.cgi?id=21500 Which resulted in: CC compel/arch/x86/plugins/std/parasite-head.o <instantiation>:3:2: error: too few operands for instruction pushq ^ compel/arch/x86/plugins/std/parasite-head.S:26:2: note: while in macro instantiation PARASITE_ENTRY ^ Fixes: https://tra... | |||
Dmitry Safonov | 0825d34a4c1 | compel/x86: hang in 32-bit mode on sw-break for compat tasksOtherwise we'll try to set 32-bit register set to 64-bit task, which is not possible with ptrace - it uses register set size, according to processes mode. So we should set 32-bit regset only to tasks those are in 32-bit mode already. Please, see inline comment in the patch for more info. travis-ci: success for 32-bit tests fixes Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry S... | |||
Dmitry Safonov | e57c9e4bbf0 | x86/compat: don't set has_compat_sigreturn if !CONFIG_COMPATWe can be on v4.9 or newer kernel, but have no 32-bit multilib toolchain, which will result in !CONFIG_COMPAT but kdat_compat_sigreturn_test() will return true as we have new arch_prctls in kernel needed for compatible C/R. Fail compat test in this case. travis-ci: success for 32-bit tests fixes Reported-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.... | |||
Dmitry Safonov | d5e1ed1b0b2 | compel/x86/compat: pack ucontext_ia32As I've united k_rtsigset_t between native and compat ucontext's, it's 8-bytes aligned now. We don't care about align of this as we fill it always with memcpy()/memset(0). So after those changes, ucontext_ia32 has received new padding between uc_mcontext and uc_sigmask (4 bytes to align to 8-byte sized sigmask). Because of this, mask of blocked signals was restored with shift (wrongly). Fixes: ... | |||
Vitaly Ostrosablin | d7cff6c9c32 | test: add variable delta for poll.c testFor ZDTM purposes, poll.c uses delta of 5 seconds, which is fine, since tests don't take a very long time to pass. However, in vzt-cpt, we start a batch with multitude of tests and starting them all could take over an hour. Hence, the test is bound to fail. An easy solution would be to introduce an environment variable, which would allow to specify the delta - ZDTM_DELTA. If it's unset (which i... | |||
Mike Rapoport | c78d0cfffbb | lazy-pages: prepare for non-#PF events handlingRename handle_user_fault to handle_uffd_event and split actual page fault handling to a helper function travis-ci: success for lazy-pages: add non-#PF events handling Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Mike Rapoport | 0cc0a9e759c | util: epoll_run: allow interrupting event pollingIf an event handler returns a positive value, the event polling and handling loop is interrupted after all the pending events indicated by epoll_wait are processed. travis-ci: success for lazy-pages: add non-#PF events handling Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Mike Rapoport | 8d94617d45a | util: epoll_run: fix event processing loopThe number of pending events returned by epoll_wait is overridden by the first call to an event handler. Using an additional local variable resolves this issue. travis-ci: success for lazy-pages: add non-#PF events handling Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Mike Rapoport | 9a473dabda7 | zdtm.py: postpone waiting for lazy-pages daemonCurrently we are waiting for lazy-pages daemon to finish as a part of .restore method, which may cause filling test process memory before the test process resumed it's execution after call to test_waitsig(). In such case, no page faults occur, but rather all the memory is copied in handle_remaining_pages method in uffd.c. Let's move wait(<lazy-pages-pid>,..) after call to test.stop(). travis-c... | |||
Andrei Vagin | 3158776af64 | zdtm: handle COMPAT_TEST from Makefile.incIn this case it will work for any make commangs. For example: make COMPAT_TEST=y -C test/zdtm/lib travis-ci: success for zdtm: handle COMPAT_TEST from Makefile.inc Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Kir Kolyshkin | 299145d8262 | criu/Makefile: fix criu/arch/* rebuildProblem: if we do touch criu/arch/x86/cpu.c nothing is being rebuilt. For detailed analisys, see the previous commit ("criu/Makefile: fix rebuilding criu/pie/pie.lib.a"). Note there are other targets in criu/Makefile where one might want to add .FORCE to, but it's not needed as they all depend on another target which itself is marked as .PHONY. travis-ci: success for Makefiles: fix deps c... | |||
Kir Kolyshkin | 22df445e2f3 | criu/Makefile: fix rebuilding criu/pie/pie.lib.aAs reported by Andrei Vagin: touch criu/pie/parasite-vdso.c does not lead to rebuild pie.lib.a and its dependencies. This happened because the real dependencies of criu/pie/pie.lib.a are listed in criu/pie/Makefile.library, which is never included or called with sub-make, because the criu/Makefile says: criu/pie/pie.lib.a: $(ARCH-LIB) $(Q) $(MAKE) $(call build-as,Makefile.library,criu/p... | |||
Kir Kolyshkin | 03930ad27d8 | Makefile.install: rm unused vars/target1. LOGROTATEDIR is not used since commit f4e9a1d ("make: don't install service and logrotate configs"). 2. SYSTEMDUNITDIR is not used since commit 10d5e9a ("criu: scripts: remove criu service files"). 3. install-tree target was *never* used, makes no sense to keep it. While at it, also - sort the variables in "export" statement to match the order of appearance in Makefile; - don't expo... | |||
Kir Kolyshkin | bcb6924bef1 | Makefile.install: cure LIBDIR guessing logicCommit 6a51c7e ("make: Allow to install in custom dirs") replaced all := assignments with ?=, effectively disabling the LIBDIR guessing logic (as once a variable is assigned, further ?= make no sense). That commit description says that setting PREFIX from make command line didn't work. I can't find the original bug report but according to GNU make documentation (see [1], [2]) as well as to my ... | |||
Andrei Vagin | 2ef8497b276 | files: don't leak a file descriptorCID 173737 (#1 of 2): Resource leak (RESOURCE_LEAK) 9. leaked_handle: Handle variable rmntns_root going out of scope leaks the handle. travis-ci: success for files: don't leak a file descriptor Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Pavel Emelyanov | 13e65f27cba | page-server: Allow blocking on socketWhen splicing page server data from UNIX socket we may get error (EAGAIN) from splice if no data is available on the socket yet. This is because the SPLICE_F_NONBLOCK flag is checked by af_unix.c in the kernel to decide whether or not to do blocking read. This is not symmetrical with TCP sockets, which only check for the socket's O_NONBLOCK flag for the same decicion. Dropping the SPLICE_F_NO... | |||
Andrei Vagin | 804a80886d5 | Revert "page-server: Allow blocking on pipe"This reverts commit 00e25daaf2bddf8ff998b7ef0e0ef70b988cd660. Actually we can't block on pipe, because the page-server has only one thread. It splices data from socket to pipe and then reads data from this pipe. We are tring to calculete a chunk size to not block on pipe, but this chunk size isn't accurate if spliced data are not allign to a page size. https://github.com/xemul/criu/issues/265... | |||
Andrei Vagin | d458233d29d | zdtm: use a unix socket instead of a pipe to synchronizer processesA unix socket can be bound to itself, so we need only one socket instead of a pair of pipe. If we use a socket, we can peek a message and if it isn't for us we don't need to send it back. Currently a process reads message from pipe, if it isn't for him, it sends it back and sleeps for a random timeout. In a worst case each waiter will read and send a message back, before the right one will ge... | |||
Andrei Vagin | d7adb7ca726 | travis: build tests in docker containerstravis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Andrei Vagin | 651965efc79 | zdtm: call test_init() before doing anythingtest_init() has to be executed first, because it prepares a container. travis-ci: success for series starting with [1/3] zdtm: call test_init() before doing anything Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Pavel Emelyanov | ef67ae1814d | tcp: Move TCP-repair checking code into cr-check.ctravis-ci: success for series starting with [1/2] tcp: Move window checking code into cr-check.c Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Pavel Emelyanov | 1f6dd9c7956 | tcp: Move window checking code into cr-check.ctravis-ci: success for series starting with [1/2] tcp: Move window checking code into cr-check.c Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Pavel Emelyanov | 7d38db56a67 | zdtm: Fix race in locks08 testThe sub-process should wait for the parent task signal before checking the locks status Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Cyrill Gorcunov | 02a1a791fb5 | rst-malloc: Update deprecated MAP_ANON flagtravis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Cyrill Gorcunov | 8fcb62d2767 | restore: Fetch mmap_minimal_address runtimeWe assume that mmap_minimal_address with non-default setting is not widespread but it's not true. Instead lets fetch this setting runtime. travis-ci: success for Fetch mmap_minimal_address and drop MAP_ANON Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Gleb Valin | 97f7fcafe16 | zdtm: Add test for SOCK_PACKET socketsThis one covers the following cases: * socket is bound to an interface * socket isn't bound to an interface https://github.com/xemul/criu/issues/73 travis-ci: success for series starting with [1/2] socket: Add support for SOCK_PACKET sockets Signed-off-by: Gleb Valin <the7winds@yandex.ru> Signed-off-by: Eugene Batalov <eabatalov89@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Gleb Valin | b49e207f375 | socket: Add support for SOCK_PACKET socketsIf socket type is SOCK_PACKET it restores binding with proper address structure. https://github.com/xemul/criu/issues/73 travis-ci: success for series starting with [1/2] socket: Add support for SOCK_PACKET sockets Signed-off-by: Gleb Valin <the7winds@yandex.ru> Signed-off-by: Eugene Batalov <eabatalov89@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Cyrill Gorcunov | 5782ff8de12 | .gitignore: Add compel and common asm symlinkstravis-ci: success for .gitignore: Add compel and common asm symlinks Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> | |||
Vitaly Ostrosablin | 67aeb547d2e | test: fix shell script tests (conntracks & route_rules)Test seem to assume that zdtm lib directory is on PATH, but if it's not - calling for parseargs.sh would fail (if cwd is static). Therefore, this patch changes this to ../lib/parseargs.sh which should be fine both for zdtm and vzt-cpt. travis-ci: success for test: fix shell script tests (conntracks & route_rules) Signed-off-by: Vitaly Ostrosablin <vostrosablin@virtuozzo.com> Reviewed-by: Cyril... | |||
Adrian Reber | 3169639d5da | zdtm: fix '"makedev" is defined by <sys/sysmacros.h>'Compiling zdtm on the latest Fedora rawhide gives errors like this: ns.c: In function ‘prepare_mntns’: ns.c:122:13: error: In the GNU C Library, "makedev" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "makedev", include <sys/sysmacros.h> directly. If you did not intend to use a system... | |||
Begunkov Pavel | 2c9bc9f8e43 | zdtm: Add OFD file locks testThere are 3 tests that cover the following cases: 1. single OFD lock 2. overlapped OFD locks 3. inhertited OFD locks Tests logic is similar to logic of tests for other lock types. OFD lock specific header-only library was added to avoid code duplication in the tests. travis-ci: success for series starting with [1/2] locks: Add ofd locks c/r Signed-off-by: Begunkov Pavel <asml.silence@gmail.... | |||
Begunkov Pavel | 43e71b3ca80 | locks: Add ofd locks c/rOFD locks logic reuses existing locks c/r functionality. https://github.com/xemul/criu/issues/42 travis-ci: success for series starting with [1/2] locks: Add ofd locks c/r Signed-off-by: Begunkov Pavel <asml.silence@gmail.com> Signed-off-by: Eugene Batalov <eabatalov89@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> |