[CRIU] [PATCH net-next] unix: add ioctl to open a unix socket file with O_PATH
David Miller
davem at davemloft.net
Thu Feb 2 18:58:25 PST 2017
From: Andrei Vagin <avagin at openvz.org>
Date: Wed, 1 Feb 2017 11:00:45 -0800
> This ioctl opens a file to which a socket is bound and
> returns a file descriptor. The caller has to have CAP_NET_ADMIN
> in the socket network namespace.
>
> Currently it is impossible to get a path and a mount point
> for a socket file. socket_diag reports address, device ID and inode
> number for unix sockets. An address can contain a relative path or
> a file may be moved somewhere. And these properties say nothing about
> a mount namespace and a mount point of a socket file.
>
> With the introduced ioctl, we can get a path by reading
> /proc/self/fd/X and get mnt_id from /proc/self/fdinfo/X.
>
> In CRIU we are going to use this ioctl to dump and restore unix socket.
>
> Here is an example how it can be used:
...
> Signed-off-by: Andrei Vagin <avagin at openvz.org>
This looks fine to me, applied, thanks.
More information about the CRIU
mailing list