Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934865AbdCaBEd (ORCPT ); Thu, 30 Mar 2017 21:04:33 -0400 Received: from mail-eopbgr20109.outbound.protection.outlook.com ([40.107.2.109]:46991 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934584AbdCaBEb (ORCPT ); Thu, 30 Mar 2017 21:04:31 -0400 Authentication-Results: linux-foundation.org; dkim=none (message not signed) header.d=none;linux-foundation.org; dmarc=none action=none header.from=virtuozzo.com; Date: Thu, 30 Mar 2017 18:04:10 -0700 From: Andrei Vagin To: Andrew Morton CC: Kirill Tkhai , , , , , , , , , , , , , , Subject: Re: [PATCH RESEND 2/2] pidns: Expose task pid_ns_for_children to userspace Message-ID: <20170331010409.GA22895@outlook.office365.com> References: <149086931397.4388.9604947335273204415.stgit@localhost.localdomain> <149086967937.4388.471494976517194744.stgit@localhost.localdomain> <20170330150520.1bdf20e599ff464bda0776b9@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Disposition: inline In-Reply-To: <20170330150520.1bdf20e599ff464bda0776b9@linux-foundation.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-Originating-IP: [162.246.95.100] X-ClientProxiedBy: MWHPR20CA0009.namprd20.prod.outlook.com (10.171.151.147) To HE1PR0801MB1980.eurprd08.prod.outlook.com (10.168.94.150) X-MS-Office365-Filtering-Correlation-Id: efd799ef-ddb0-48dd-6dcd-08d477d1dffe X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:HE1PR0801MB1980; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1980;3:onrpf/bNQgFfI6j/cuJXtiZd8gX/lsZUuwWdBzbkurlfpYTe6puvevOBYLhXwp0NhGzaua5ty3LEPMq87Jmd/0VuPDVNNETFnCPZx4DFFLVZPvWhFUEYvwEleYv6cMleV6Eiee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7Y3xYZhysgfZrcruXsk0t0jY2nSaWck72RaTgkam+j1zHDPvG1n/kY427ClSmy+0TI/RqPLhIdnpNX63CyQO08c43PIguRYgpKX1juW6L7Etko1deMm9LNpl3p5ywzj6gRBG/NQtgxN7WAfQVBcnuChqecFh/mVWIY3MktgbVgAZhf0c5SxMLFT9ZF8LcLVTn7OzQlBrbj/Pr3crtjKXAHdHB8cUjvm1GSfCKKMasafedbTYEVHx+gTENbPAcOdCI8PAFGSwjhXUFTkL81NHhcd5mrJqUEj+d/DltBo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(84791874153150); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006081)(93001081)(10201501046)(6041248)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123564025)(6072148);SRVR:HE1PR0801MB1980;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB1980; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB1980;4:aldD6bCArrfBEfqgb6HUk8vWH8u3wN3D+1TTiaOOe+lQIYNatqbGV1GHbaScpZNwRPlghIc+JS4/JR9zbru9RDOm6ADr/FUen+lznWl500T+XC8csi16/W66Ydb0CQXTcmBVK2U/BvXqp4/mQLHoEL7WpJ660o/QCRTb5zM17owOnyYCWEpgttD0/ctOJB1xonItTUbKd7REZGuKht92pSmwBp3pEuROA7Vyr3BgA0DVqQxln8HhvzryAuQqB8Wo6y/V6agCmL+xbKrkRo/JfN1w/SNAt1tr5r3HeVL7cyevY8OzG5g5cHuqeg6zVjNubRfSOd2IvMhk7wUteIQbKTN03ml0L8yal17qTKPSHuHiSspjmqXVzmjW2H7cyNROS5OHvVyHg8aQhgTfUPSf5MrppGPxvURBwj0NCYSDfStOrJkDVZ8l6DSGZk2TmoEuPdwvRofCQuK8nlmr/+cPfxQM18GOsgRWgy60p0cBdEensR4GFS4fs+XNPd8wzNcnI4UcjPewXxSLGvpKPauYvBsv54JAx5ovLn+/4nWDk/4514xkziiULPPotDhu7x2P6ngqEpnnghm5DTJ/shaHd6wRioNqnIhEI0mM1cSqYdGKZ18MnO6TP+wse9dg+FVSHWY5qOvnChdOjaooBJdHQvyIyfftfADmeMkYx0lzidWeQUG2K3vOemCrZCOtVuTLs6ELQ58t496iiy1gm0ac2NYVjjMoVNBg4f9tWGyw0+imU9EquywIp6YfD7weLmr9 X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39450400003)(39400400002)(39830400002)(39410400002)(24454002)(54356999)(6916009)(38730400002)(33656002)(9686003)(50986999)(55016002)(110136004)(54906002)(53936002)(25786009)(76176999)(4326008)(86362001)(5660300001)(47776003)(6306002)(2950100002)(66066001)(7416002)(81166006)(6666003)(8676002)(7736002)(305945005)(4001350100001)(50466002)(3846002)(6116002)(1076002)(2906002)(229853002)(53416004)(83506001)(6506006)(189998001)(6246003)(42186005)(23686003)(18370500001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0801MB1980;H:outlook.office365.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?koi8-r?Q?1;HE1PR0801MB1980;23:ZMvTYOUVdeWKnEiSzVO+dDc/moGn8DJJh1TLE7AOX?= =?koi8-r?Q?Gfdy49GkFDOo+EhmGWXMRgmiZ6WcjsKxRHV++sE1oF9OxkfqqI8UJ8GgrU/3WI?= =?koi8-r?Q?DMqDNaJxK/3oKgXWeL/VQgI1tzdnAGEIx7H15oMvTxKAFzfnl+6Urackhg+zcI?= =?koi8-r?Q?BM5hWLi8rDUbkDpRGlpC5Pwy2/RehIWTpZaoCVEbiAiqNlCBo5TddxnipcIPdR?= =?koi8-r?Q?hynUZOFUXU4Hv1JD+kNHgax1NaQ0klEyHs71wphVL6SuCTCciRNh4GRk9MfSvq?= =?koi8-r?Q?Cbek4JCbNQYft/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xIT6d0qRbnUgra8Oi0ENrcqgxyCer7883IEuXN82mV5FItHnbHI/XDBpYECTNDLi2VwgPvNtfCQ1sQ==;20:LXwy8E2GDFjI42kBEykIOS7262nBUXEclugPwFcDoYUHxZ2KIFTjcqk+nZfr9QnJnj6DDGjjWCIJX8jDjD1cmyQIr14MmOD/RsxmyoLRG7eZshWv/EnqUTL8jaLDWKb7VRXM4wEWfJ6Jn6TJbuHyhCHCnHJ83MLANyXfetSbZmU= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 01:04:22.3128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1980 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1350 Lines: 36 On Thu, Mar 30, 2017 at 03:05:20PM -0700, Andrew Morton wrote: > On Thu, 30 Mar 2017 13:27:59 +0300 Kirill Tkhai wrote: > > > pid_ns_for_children set by a task is known only to the task itself, > > and it's impossible to identify it from outside. > > > > It's a big problem for checkpoint/restore software like CRIU, > > because it can't correctly handle tasks, that do setns(CLONE_NEWPID) > > in proccess of their work. > > > > This patch solves the problem, and it exposes pid_ns_for_children > > to ns directory in standard way with the name "pid_for_children": > > > > ~# ls /proc/5531/ns -l | grep pid > > lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid -> pid:[4026531836] > > lrwxrwxrwx 1 root root 0 Jan 14 16:38 pid_for_children -> pid:[4026532286] > > > > --- a/fs/proc/namespaces.c > > +++ b/fs/proc/namespaces.c > > @@ -23,6 +23,7 @@ static const struct proc_ns_operations *ns_entries[] = { > > #endif > > #ifdef CONFIG_PID_NS > > &pidns_operations, > > + &pidns_for_children_operations, > > #endif > > This interface should be documented somewhere under Documentation/. > But I can't immediately find where the /proc/pid/ns/ pseudo-files are > documented... I know that they are documented in man7/namespaces.7 https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/man7/namespaces.7#n187 > >