[Devel] [PATCH vz7 0/2] Port SIOCGSKNS support for sockets and tun

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Mar 28 11:05:01 MSK 2018


Everything looks good to me, except that AFAICS second patch is not yet 
in MS, and hash f2780d6d7475 leads nowhere, correct me if I'm wrong.

Reviewed-by: Pavel Tikhoirov <ptikhomirov at virtuozzo.com>

On 03/22/2018 07:34 PM, Kirill Tkhai wrote:
> This patchset ports get-socket-and-tun-net-namespace-fd functionality
> from mainline kernel to vz7.
> 
> Note, that in case of sockets and tun we don't have proc vfsmnt
> like we have for NS_GET_USERNS and NS_GET_PARENT. The workaround
> is to use current's pid_ns->proc_mnt. It has to work even in case
> of nested pid ns, since the namespaces inodes numbers are uniqul
> in the system.
> 
> ---
> 
> Kirill Tkhai (2):
>        ms/net: add an ioctl to get a socket network namespace
>        tun: Add ioctl() SIOCGSKNS cmd to allow obtaining net ns of tun device
> 
> 
>   drivers/net/tun.c            |   11 ++++++++++-
>   fs/proc/namespaces.c         |    2 +-
>   include/linux/proc_ns.h      |    8 ++++++++
>   include/uapi/linux/sockios.h |    1 +
>   net/socket.c                 |   32 ++++++++++++++++++++++++++++++++
>   5 files changed, 52 insertions(+), 2 deletions(-)
> 
> --
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> 

-- 
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.


More information about the Devel mailing list