criu/images
Andrey Vagin 019ebec03e unix: restore sockets on correct mount points
Currently we restore all sockets in the root mount namespace, because we
were not able to get any information about a mount point where a socket
is bound. It is obviously incorrect in some cases.

In 4.10 kernel, we added the SIOCUNIXFILE ioctl for unix sockets.  This
ioctl opens a file to which a socket is bound and returns a file
descriptor.

This new ioctl allows us to get mnt_id by reading fdinfo, and mnt_id
is enough to find a proper mount point and a mount namespace.

The logic of this patch is straight forward. On dump, we save mnt_id for
sockets, on restore we find a mount namespace by mnt_id and restore this
socket in its mount namespace.

Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-05-12 11:45:30 +03:00
..
google/protobuf build: Move @protobuf dir into @images 2016-02-15 15:32:27 +03:00
autofs.proto images: add syntax specifier to autofs.proto 2016-10-10 12:49:28 +03:00
binfmt-misc.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
cgroup.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
core-aarch64.proto core-aarch64: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-arm.proto core-arm: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-ppc64.proto core-ppc64: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-s390.proto s390: Add runtime-instrumentation support 2017-10-17 08:40:44 +03:00
core-x86.proto criu: arch, x86 -- Rename registers mode 2017-03-14 23:58:07 +03:00
core.proto s390:proto: Add s390 to protocol buffer files 2017-08-09 18:51:41 +03:00
cpuinfo.proto s390:proto: Add s390 to protocol buffer files 2017-08-09 18:51:41 +03:00
creds.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
eventfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
eventpoll.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ext-file.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fdinfo.proto files: Move CTL_TTY_OFF fixup to generic file engine 2018-03-02 10:10:41 +03:00
fh.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fifo.proto fifo: Generate unique ID for satellite regfile entry 2017-10-17 11:41:50 +03:00
file-lock.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fown.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fs.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fsnotify.proto fsnotify: don't save mnt_id if a mount namepsace isn't dumped 2017-05-19 09:33:02 +03:00
ghost-file.proto ghost: Add chunked ghost files 2017-07-18 09:34:44 +03:00
inventory.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-desc.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-msg.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-sem.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-shm.proto ipc: Keep shmem segments contents into pagemap/page images 2017-04-11 09:01:10 +03:00
ipc-var.proto ipc/sysctl: c/r kernel.{msg_next_id,sem_next_id,shm_next_id} 2016-09-06 18:58:26 +03:00
macvlan.proto images: add syntax declaration to macvlan.proto 2016-11-03 18:15:02 +03:00
Makefile net: Dump regular sit device 2017-10-17 10:48:46 +03:00
mm.proto mem: add dump state of THP_DISABLED prctl 2017-09-16 12:30:22 +03:00
mnt.proto mount: save ext_real_root for external mounts 2017-04-02 18:12:10 +03:00
netdev.proto net: dump and restore connected to a bridge links 2018-02-15 21:45:08 +03:00
ns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
opts.proto crit: Beautify unix names recode 2017-04-11 09:01:11 +03:00
packet-sock.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
pagemap.proto crit: translate pagemap flags into strings 2017-09-16 09:16:33 +03:00
pipe-data.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
pipe.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
pstree.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
regfile.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
remap-file-path.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
rlimit.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
rpc.proto service: allow to execute page-server as a child process 2017-11-23 20:23:23 +03:00
sa.proto restore/x86: call int80 for compat sigaction restore 2017-03-14 23:58:06 +03:00
seccomp.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
siginfo.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
signalfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
sit.proto net: Dump regular sit device 2017-10-17 10:48:46 +03:00
sk-inet.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
sk-netlink.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
sk-opts.proto sk-inet: restore a value of SO_REUSEPORT 2017-11-23 20:23:14 +03:00
sk-packet.proto SCM: Dump and restore SCM_RIGHTs 2017-10-17 11:41:51 +03:00
sk-unix.proto unix: restore sockets on correct mount points 2018-05-12 11:45:30 +03:00
stats.proto stats: add counters for pipes and page_pipe_bufs 2017-11-23 20:23:14 +03:00
sysctl.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
tcp-stream.proto tcp: dump and restore window parameters 2016-08-08 15:20:47 +03:00
time.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
timer.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
timerfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
tty.proto tty: Generate unique ID for satellite regfile entry 2017-10-17 11:41:50 +03:00
tun.proto net: Dump tun device net id in img 2018-05-12 11:38:46 +03:00
userns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
utsns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
vma.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00