Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2739975rwb; Thu, 29 Sep 2022 14:29:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NN/n0DYskmVTLOfsyXrkwbfhXyNcUN96+mnC7EIFJKv9uXqlmEUT8mFcYOux3oDyIoI39 X-Received: by 2002:a17:907:2c75:b0:77c:2b6a:6b63 with SMTP id ib21-20020a1709072c7500b0077c2b6a6b63mr4412819ejc.702.1664486964534; Thu, 29 Sep 2022 14:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664486964; cv=none; d=google.com; s=arc-20160816; b=QffmO9E/a1jxLxrHexRvyLNbr5D6eiuNKjK6zmVR0MZt/0W1jjacbVwEkm1BDZEYlg 5I5MScOkV9jVqcMfVFLL934Ff5biZLbxeSTNGnsNcsqn4mzBmgBRcLo5mvrQ8afcY8nK pWjQO3t1WcZix8R01RFWlvQULRKGbHd0hIUtajCqNApHTY21c4kfwMZThZq48svTkauY cLIbEJzZXu9M0HXNuiike0fhpaXYY/K9QbpSleS8RFcDfHdYWRbbfSIhU3fMGXfwOnBF yY3x53X4Z6UsCd+lgZARAj07GuX3QiKJqu+CmEqDpZ//tzOI4bXyQy5UASfnVnki+8uA 0vDg== 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 :dkim-signature; bh=82CVBJMMg98pUNlHUvfZc77iRO0SkRHuyncOXZOobb0=; b=UxIJ+vNtCoqTD9uSuyUHspkiKxB0GFdXu42j2LZuM92pogHTPNg1WshyNPjXLEWtBV mnntmrfOpMsQ2+aHp15kz82Y9CN11NTNEwJ96AbAizYaOsSnSN/ygO7q/BzXOX4laMQW BwKzIPzEzs8TkhSQaw2iFZgxN5Fosj/AP3DStezlPX2e+2MrlTy1yNRPbVjzP32fCaIe 6ifyyQ6xoA//vMJiUHhZY72+Heqz747cFQ8m71LOai5IodoXeeWroZAR4/4BeUOc3wXy ngiYr0H0kM0HSqDRaju47bhsANwJOcmow1R06MBmgknFGtDxiZAxqSsXC7En7lZ3p77+ K/qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=gNmVA9qq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ww2-20020a170907084200b007317d093e6csi290275ejb.808.2022.09.29.14.28.56; Thu, 29 Sep 2022 14:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=gNmVA9qq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbiI2VVJ (ORCPT + 99 others); Thu, 29 Sep 2022 17:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbiI2VVI (ORCPT ); Thu, 29 Sep 2022 17:21:08 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18D50792DA; Thu, 29 Sep 2022 14:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=82CVBJMMg98pUNlHUvfZc77iRO0SkRHuyncOXZOobb0=; b=gNmVA9qql9f+jgH9jCCrya+yQ9 iPMje2hMZ1ZSzQr8S2Ien0bIoiMdJCUAi7nOfsPyYCZ83wCWoCBXlR7gZFEHLM15XWGdWHtkcp1ZH ZzQ7iAMDAqU8MyYl23SGseHPoZl/lSnOycCO4PneM5k9ZDWwuYlX3Uo/7dhpX7F1K28PhZHOaRpPh C6i4et6apdoYHo/rbilXZz5lVFtuwRHVKbjLCZY+EKJxWaNT4qK+gRG8bvw2rc096AFjclk4brjxW JkOuxbko4XUznNtchVGgJ9Sx0JJuU9vLLEjjfnxU5ykSWez+ZEdM1nw2KRRqjfsaT6IosmeE7Qcew zv+qkzLg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1oe0xs-00562S-0g; Thu, 29 Sep 2022 21:21:04 +0000 Date: Thu, 29 Sep 2022 22:21:04 +0100 From: Al Viro To: Linus Torvalds Cc: David Laight , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "Eric W. Biederman" , "Serge E. Hallyn" Subject: Re: [PATCH 3/4] proc: Point /proc/net at /proc/thread-self/net instead of /proc/self/net Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 29, 2022 at 02:13:57PM -0700, Linus Torvalds wrote: > On Thu, Sep 29, 2022 at 12:34 PM Al Viro wrote: > > > > Apparmor takes mount+dentry and turns that into pathname. Then acts > > upon the resulting string. *AFTER* the original had been resolved. > > Ok. So it would have to act like a bind mount. > > Which is probably not too bad. > > In fact, maybe it would be ok for this to act like a hardlink and just > fill in the inode - not safe for a filesystem in general due to the > whole rename loop issue, but for /proc it might be fine? _Which_ hardlink? Linus, where in dentry tree would you want it to be seen? Because apparmor profile wants /proc/net/dev to land at /proc//net/dev and will fail with anything else. Do you really want multiple dentries with the same name in the same parent, refering to different directory inodes with different contents? And that's different inodes with different contents - David's complaint is precisely about seeing the same thing for all threads and apparmor issue is with *NOT* seeing each of those things at the same location.