Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D64DC43381 for ; Sun, 17 Feb 2019 00:14:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49A41217F5 for ; Sun, 17 Feb 2019 00:14:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729486AbfBQAOn (ORCPT ); Sat, 16 Feb 2019 19:14:43 -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-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@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...