- 03 Nov, 2016 20 commits
-
-
Tycho Andersen authored
Note that this test doesn't run in uns mode, even though we have support for that. Without a full container engine, I couldn't think of a nice way to pass a macvlan device into the zdtm "container" when in UNS mode. v2: use the nsid_manip feature flag travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
This header was only introduced in 2015, so we need to build without it. travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
While this is in principle similar to how veths are handled, we have to do things in two different ways depending on whether or not there is a user namespace involved, because there is no way to ask the kernel to attach a macvlan NIC to a device in a net ns that we don't have CAP_NET_ADMIN in. So we do it in two ways: a. If we are in a user namespace, we create the device in usernsd and use IFLA_NET_NS_FD to set the netns which it should be created in (saving us a "move into this netns" step). b. If we aren't in a user namespace, we could still be in a net namespace, so we use IFLA_LINK_NETNSID to set namespace that the i/o device will be in. Then we open a netlink socket from criu's netns and use IFLA_NET_NS_FD to tell the kernel to create the macvlan device in the target's namespace. v2: * s/CLONE_NEWNET/CLONE_NEWUSER * Don't bother to dump IFLA_LINK and IFLA_LINK_NETNSID. Although we need to provide these on restore, there's no kernel interface that persists these. To populate IFLA_LINK, we require users pass --macvlan-pair, and we create a NETNSID relation as needed and pass that in for macvlan links (although this infrastructure could be used elsewhere for links that need it in the future, since is in the hoisted populate_newlink_req()). * use new external command instead of creating a --macvlan-pair option v3: add a feature check for linux/net_namespace.h, since not every arch in travis has this (new-ish) header v4: * include sys/types.h instead of linux/if.h to get IFF_UP flag * remove old doc addition about --macvlan-pair option v5: define IFLA_LINK_NETNSID and RTM_NEWNSID if they don't exist v6: define IFLA_MACVLAN_FLAGS and bump the size of IFLA_MACVLAN_MAX when necessary v7: * remove unused struct macvlan_pair * split feature test for linux/net_namespace.h into separate patch * move IFLA_INFO_MAX testing in dump_one_netdev to the right patch * add documents for netwlink_extras fields * split changeflags into separate patch * use existing netnsid if we get EEXIST * move macvlan code to a helper function * use netnsid to restore in userns case, and not pid v8: * define RTM_GETNSID since we use that too now :) * don't bother with IFLA_MACVLAN_MAX; we only understand things up to IFLA_MACVLAN_FLAGS, so let's just use that as our max instead. The problem with using macros here, is that IFLA_MACLAN_MAX is defined as a macro with an enum expansion in it, so we get bitten by the enum not being available at preprocessing time, and implicit zero coercion when testing against its value for stuff. Yeesh. v10: * add some comments about when we set up NET_NS_FD and why we use IFLA_LINK and IFLA_NET_NS_ID * use the socket opened in restore_links() instead of opening one in restore_one_macvlan() * split the new argument to restore_one_link into its own patch travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We'll use this socket to restore macvlan interfaces. travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We'll use this struct in the next patch to set some top level IFLA_ members that we need for restoring macvlan devices. travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We'll use this in the next patch to set some macvlan flags. travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We'll use this in the next patch to find the ifindex for a macvlan bridge in the host's net ns. travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
For macvlan we need to restore in different ways depending on whether we're inside or outside a user namespace. We want to share the code that does the building of the base request, so let's split it out into a populate() function. travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We'll use this later in the series to get specific information that macvlan links need. v2: pass the IFLA_LINKINFO instead of the whole attribute buffer, since that's al all we expect the info functions to need, and all we allow them to populate on restore travis-ci: success for series starting with [v10,01/11] net: pass the struct nlattrs to dump() functions Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
0e869bf82f30ff6bce3d7cdc66779d8b642c82af introduces this bug, which chops off the last character of the external veth name, and then subsequent move_veth_to_bridge() calls fail: (01.012478) Error (criu/net.c:1758): Can't get index of veth69A67O: No such device travis-ci: success for veth: fix off by one error Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> CC: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The latter option should hide, the official API is the --external. This patch tests the option, thus completing the deprecation. The legacy -x|--ext-unix-sk test is still in zdtm/static/socket-ext. travis-ci: success for unix: Test the --external instead of --ext-unix-sk Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Make it possible to distinguish 'no val' from 'empty val'. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
This fixes 'make criu/<any>.o' build. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
As it should be built anyway - it will not increase build time significally. Cc: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 02 Nov, 2016 20 commits
-
-
Tycho Andersen authored
We're using the old cgns prefix length in allocating dirnew, so let's not update it before that. travis-ci: success for cgroup: update cgns prefix *after* using it Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The pid is set on ctl and in the next patch I'll use one more field. travis-ci: success for Don't get task regs twice Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com>
-
Pavel Emelyanov authored
It doesn't matter much how late we check this, but in the new place we already have parasite_ctl I will need in the next patch. travis-ci: success for Don't get task regs twice Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com>
-
Kir Kolyshkin authored
1. Move HOSTCC/HOSTLD to nmk (note there are rules in nmk that make use of these variables already) 2. Make CC/LD derive from HOSTCC/HOSTLD Note that one can still change anything from the command line. travis-ci: success for build system: make CC/LD derive from HOSTCC/HOSTLD Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
clang-3.8 fails to compile inline asm having ldarx with 4 args. Quoting [1]: ''' Recent versions of the PowerPC architecture added a hint bit to the larx instructions to differentiate between an atomic operation and a lock operation: > 0 Other programs might attempt to modify the word in storage addressed by EA > even if the subsequent Store Conditional succeeds. > > 1 Other programs will not attempt to modify the word in storage addressed by > EA until the program that has acquired the lock performs a subsequent > store releasing the lock. ''' I also found some more info about this in [2]. Anyway, we could either construct some preprocessor logic to omit this argument for clang, or just drop it. This patch does the latter. [1] https://patchwork.ozlabs.org/patch/45008/ [2] https://sourceware.org/ml/libc-alpha/2015-03/msg00085.html travis-ci: success for PPC+clang compile fixes Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
Apparently, clang 3.8 ppc doesn't know the register name 'sp'. > criu/cr-restore.c:3179:2: error: unknown register name 'sp' in asm > JUMP_TO_RESTORER_BLOB(new_sp, restore_task_exec_start, > task_args); > ^ > /criu/criu/arch/ppc64/include/asm/restore.h:24:5: note: expanded from > macro 'JUMP_TO_RESTORER_BLOB' > : "sp", "1", "2", "3", "12", "memory") > ^ > 1 error generated. According to docs, stack pointer is r1. travis-ci: success for PPC+clang compile fixes Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
For gcc, having "inline" is enough to suppress the "unused function" warning. For clang, we have to do better than that. See also: commit 4241078 ("zdtm: compile fix for clang") and commit 3ea2fd78 ("crtools.c: fix compilation by clang"). travis-ci: success for PPC+clang compile fixes Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Right now struct mount_info only keeps the ext_mount_map for ->val field. Since we're planning to switch onto --external engine we won't have this struct and thus only char *is OK. travis-ci: success for mnt: Deprecate --ext-mount-map for --external Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The same as for --ext-mount-map auto, but with manual key:val setting in .desc file. travis-ci: success for mnt: Deprecate --ext-mount-map for --external Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
Setting GCOV environment variable is used for doing profiling (gcov). Unfortunately, it is checked in two different ways: 1. In top Makefile and scripts/travis, it is checked against "1". 2. In other places, it's checked to be set to a non-empty value. So, giving various values to GCOV will lead to different results. Let's unify the approaches used. Apparently, among all the code the easiest (and not too strict) way is to check for non-empty value (this also leads to the smallest possible patch size). Note that in Python, evaluating an empty string in a binary context (such as after an "if" statement) equals to False. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kir Kolyshkin authored
With this patch, Travis will build/test CRIU using clang, for real. I swear I fixed it before, but the fix was apparently lost. travis-ci: success for series starting with [1/3] compel: mv noexecstack from CFLAGS to LDFLAGS Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
travis-ci: success for headers: Finalize include/common/ Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
travis-ci: success for headers: Finalize include/common/ Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
travis-ci: success for headers: Finalize include/common/ Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
travis-ci: success for common: bitsperlong -- Specify complete path Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Subprojects usually have own "asm" directory, so to eliminate collision specify complete path. travis-ci: success for common: Use complete path in inclusion Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
travis-ci: success for Common headers Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
travis-ci: success for Common headers Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Since in criu we can't choose proper arch inside include statements (well, it will simply require more ifdefs), I generate include/common/asm symlink to point proper architecture. travis-ci: success for Common headers Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
travis-ci: success for Common headers Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-