Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1993871ybb; Thu, 2 Apr 2020 11:04:47 -0700 (PDT) X-Google-Smtp-Source: APiQypJTYUVFUDWfp8ydb9nacdnSJHLK9i+METONrLqshgMdUBwHLB2dzE/dyZz8zibAS+QCJila X-Received: by 2002:aca:b382:: with SMTP id c124mr216474oif.64.1585850687010; Thu, 02 Apr 2020 11:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585850687; cv=none; d=google.com; s=arc-20160816; b=dv0kqtcoHemSl4uSiaNYzKXgRTjX2XS3JgTjWaj5tofinQaIwlfA09JD4Dzoi9QNH5 DuKlX4GCeIkCBWZpvQ8LoEnR8YX/pMwaf/X+3rqQuBm4WboGB7ATEzo2FRv7ZcKbazJv wJv8KeWD0TTRLZsw7DTvo4SmoHYJZ8RutuydeH6zWwTSb1U3tTJ0ihOZicYl+E/z+p3f UBxjwOuezMfLLAEdufTnplT8IbIwViHYOJTEhm5v7JnQVsWMpuCzhuNcqW+4BCmjwSwK gO777MyZz0WQOnojYCi1ijVVqP00OmtEpKNLdpUyvEWEhxb2ce5phstl4gpRqlsirizV dX7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7eKiRWzJZWfIsQ2c7TF11ooahN/891sNdNo/iJOFma4=; b=o8Owc5DeIjjOi0CxQQbHNvHslbfKCH2VjQhF3740RpgLpjooIK//PQMKcVRkYlzKK7 A49bIEfCveZp6aUs5N9UJC6u34aaWLnzfERptfbM8ccelpjDR9YjKLtMZkaO6IzsZoGK bMH4SyJdiscAp/1qG4Yrjd1GUP1O9XDx1Pbf/DOruQe9DHe4pwWwJT8oVh1rXV29ILIe w5+LJnNgDoZUR/YaTsrFvSWGYmcXLEvC4foc9VmIU7JN9gyoGBmr1xA2zmpOoCA/ynkg 7F1b2TMhHIGUwocynzVqby4uuXGFka+YGDhB5bCq1ar1or2d6uvTfiYgGQ8U9BadDTkp RveA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si2626974otk.28.2020.04.02.11.04.28; Thu, 02 Apr 2020 11:04:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388516AbgDBQd0 (ORCPT + 99 others); Thu, 2 Apr 2020 12:33:26 -0400 Received: from raptor.unsafe.ru ([5.9.43.93]:43112 "EHLO raptor.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732412AbgDBQd0 (ORCPT ); Thu, 2 Apr 2020 12:33:26 -0400 Received: from comp-core-i7-2640m-0182e6 (ip-89-102-33-211.net.upcbroadband.cz [89.102.33.211]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by raptor.unsafe.ru (Postfix) with ESMTPSA id 19CEB2052E; Thu, 2 Apr 2020 16:32:51 +0000 (UTC) Date: Thu, 2 Apr 2020 18:32:46 +0200 From: Alexey Gladkov To: "Eric W. Biederman" Cc: LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module , Akinobu Mita , Alexander Viro , Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Daniel Micay , Djalal Harouni , "Dmitry V . Levin" , Greg Kroah-Hartman , Ingo Molnar , "J . Bruce Fields" , Jeff Layton , Jonathan Corbet , Kees Cook , Linus Torvalds , Oleg Nesterov Subject: Re: [PATCH v10 2/9] proc: allow to mount many instances of proc in one pid namespace Message-ID: <20200402163246.7kfzujkku65belrw@comp-core-i7-2640m-0182e6> References: <20200327172331.418878-1-gladkov.alexey@gmail.com> <20200327172331.418878-3-gladkov.alexey@gmail.com> <87eet5lx97.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eet5lx97.fsf@x220.int.ebiederm.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (raptor.unsafe.ru [5.9.43.93]); Thu, 02 Apr 2020 16:33:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 02, 2020 at 10:31:48AM -0500, Eric W. Biederman wrote: > > > diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h > > index 40a7982b7285..5920a4ecd71b 100644 > > --- a/include/linux/proc_fs.h > > +++ b/include/linux/proc_fs.h > > @@ -27,6 +27,17 @@ struct proc_ops { > > unsigned long (*proc_get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); > > }; > > > > +struct proc_fs_info { > > + struct pid_namespace *pid_ns; > > + struct dentry *proc_self; /* For /proc/self */ > > + struct dentry *proc_thread_self; /* For /proc/thread-self */ > > +}; > > Minor nit. > > I have not seen a patch where you remove proc_self and proc_thread_self > from struct pid_namepace. > > Ideally it would have been in this patch. But as it won't break > anyone's bisection can you please have a follow up patch that removes > those fields? Yep. I miss that. I will make v11 to address this and other nits. -- Rgrds, legion