Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1205318imj; Sun, 17 Feb 2019 00:07:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IZJF7EAu4cRiAy5gWFzBjY65O10p/4ByT8n5fqMFkFDCgzLMa1euvwqdD4MAOAKIKBrh5Mh X-Received: by 2002:a63:eb56:: with SMTP id b22mr5846632pgk.287.1550390821527; Sun, 17 Feb 2019 00:07:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550390821; cv=none; d=google.com; s=arc-20160816; b=NxRMRLXz7L0Z/nzEdYgZ59655bF5dd4cCUibpEiwUYoXCw0uY6FlDr9vfl6JL9ptRM dm4KrOyAl+XgT9l/gSrFJKrslWo7Nv0lWbWjyaEJtANicxmYXKTKFsIb5HWGWHHzih5i cAmKxejRP3cvG/CCBHrvBsuavM4B4lmboxHK4e/KYcRSRqm4CiN0MO9KiECvsX/5hU44 A++L/jQMG59aGdthsMVktd3XLSZWnKQg6hKS1x4GDsY41uGdZ0WpTTAwqBNTTBqsM7Z8 /SBTYDhKsiBtQHSImllblu+VWjf3oWQaAKDICpXSk8OWW0nzYbSXAqSPZKlFYDJjp07y Vulg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xun0QRakxzB6X++gIEC2KGACgyfd/gsU1nrbRXarliY=; b=B+pdi3A5Z8H9BW4T6rDcxAZgsmzDt6m98i4x8COJm3o4Am2T6fQS8T09xs4XBDs7Ql 7MgR0/KXLEAOTYemvBd5die7Q6DfUG5FSD/ZM3RK9ETN/iKzWdD/FDV8c+lWsvu/5TQt kyhU2bQj+3bt2BhvnoKA3NssDb+K0SDBSoHR+PAyFmTL8c8GIAcSeGDdqU3y/1xPF3VC L+luZIKeaaTDOG8MOk8Nk6PExkjzErEYr7XhXiM4erhBprwrRunM8YcvQQmy2hti0wu/ 1ekW5Yfo04M96Mhsv4RyNQ3zvi9s3lOa9g/A9Iv66Oq1WATttMUC4dWI8dRP0VxbuQV/ VlzQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z29si7640627pfi.9.2019.02.17.00.06.45; Sun, 17 Feb 2019 00:07:01 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731411AbfBQAOo (ORCPT + 99 others); Sat, 16 Feb 2019 19:14:44 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:52714 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727895AbfBQAOn (ORCPT ); Sat, 16 Feb 2019 19:14:43 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.91 #2 (Red Hat Linux)) id 1gvA6T-0002YF-4R; Sun, 17 Feb 2019 00:14:41 +0000 Date: Sun, 17 Feb 2019 00:14:41 +0000 From: Al Viro To: David Howells Cc: keyrings@vger.kernel.org, trond.myklebust@hammerspace.com, sfrench@samba.org, linux-security-module@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, rgb@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 09/27] vfs: Allow mounting to other namespaces Message-ID: <20190217001440.GS2217@ZenIV.linux.org.uk> References: <155024683432.21651.14153938339749694146.stgit@warthog.procyon.org.uk> <155024692658.21651.7276705643207668882.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155024692658.21651.7276705643207668882.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 15, 2019 at 04:08:46PM +0000, David Howells wrote: > Currently sys_move_mount() and sys_mount(MS_MOVE) prevent the caller from > moving a mount into a namespace not their own. Relax this such that any > mount can be mounted onto any given mountpoint provided that the source > mount is either detached or the same namespace as the destination. > > This permits container namespaces to be built from the outside rather than > from the inside. I'm looking forward to your analysis of security implications, as well as the proof that attach_recursive_mnt() won't get confused by that...