Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp634368ybi; Fri, 26 Jul 2019 16:27:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUC0Q2AYiINk33GZnqVvgX7udJLCCHhEScmE3A2/zsj7t7K+UdewhoF5mpy8vLnmR4xQh9 X-Received: by 2002:a17:902:4401:: with SMTP id k1mr75109019pld.193.1564183678656; Fri, 26 Jul 2019 16:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564183678; cv=none; d=google.com; s=arc-20160816; b=YwkU3crSMuSs1Z78kfKzKTtgyTJlXcU5fkNzV0ekRoZKcmdapWRDwLQyGTuw90HoVp RktnjYBUqrnrizi3OoWUsZ3mZ/DFEg7gCNieNUQ8rGkC3oHtOzKenorGI0xoTLfXJ14G Yf3205b2HzvnzkBOAmzOac1yBMKYKn+HF31x3YtVaIFK3OwoUZjYhoHCBYeTvikmqZ94 9o3kL6uHKe0zJzoj9qdr82/cDf5i8RC+43IomzC5B61jEDSKZh7VVboChgfh75RmbwYv Ilz6jqB+X92Ixd07yanvNX5gSvClzbf98QgarZ9VpzPO9fQUlaBFEZ+/BkiujJQuBWnL zEBg== 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=+pw6uJYkSq0g8RSVCUCNnOufXCvdpbn7nstiOPi6f2s=; b=XluKsehgiodSwEXH6I4votwMrNLZ9dk+rmTIhnaUg5f/R/UnadUOO3fCQsNumtNXpP u7rXDtmbGLt13tSUPrC7VxybcPqONkVTOuSqRofPia7cTJ2DoOzogrch1V+BpffUOGdW YnXknN9/E5IRAHu94UqmGVIgKddi1d1f8nVLNqUy1fUlsFJqWp8qQysdbDIgvgJWfB/t kuWs/RY05zCUt5mjd11EtCpIOS/11phcIqN1awZTYhVz7jkWxPz11Tw4EEC2yhReLIOC +wQfoLRke18lC/J5DXGVTbbytsVDEmStqmIpgN0mX3AVS1btJe7wwPwQbLsD12YCgLYe 2LCA== 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 az7si18705775pjb.51.2019.07.26.16.27.43; Fri, 26 Jul 2019 16:27:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728347AbfGZXWX (ORCPT + 99 others); Fri, 26 Jul 2019 19:22:23 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47670 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbfGZXWX (ORCPT ); Fri, 26 Jul 2019 19:22:23 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hr9XY-0000zv-Hh; Fri, 26 Jul 2019 23:22:20 +0000 Date: Sat, 27 Jul 2019 00:22:20 +0100 From: Al Viro To: Linus Torvalds Cc: Christian Brauner , Linux List Kernel Mailing , David Howells , Miklos Szeredi , "Eric W. Biederman" , linux-fsdevel , Linux API Subject: Re: Regression in 5.3 for some FS_USERNS_MOUNT (aka user-namespace-mountable) filesystems Message-ID: <20190726232220.GM1131@ZenIV.linux.org.uk> References: <20190726115956.ifj5j4apn3tmwk64@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 03:47:02PM -0700, Linus Torvalds wrote: > Of course, then later on, commit 20284ab7427f ("switch mount_capable() > to fs_context") drops that argument entirely, and hardcodes the > decision to look at fc->global. > > But that fc->global decision wasn't there originally, and is incorrect > since it breaks existing users. > > What gets much more confusing about this is that the two different > users then moved around. The sget_userns() case got moved to > legacy_get_tree(), and then joined together in vfs_get_tree(), and > then split and moved out to do_new_mount() and vfs_fsconfig_locked(). > > And that "joined together into vfs_get_tree()" must be wrong, because > the two cases used two different namespace rules. The sget_userns() > case *did* have that "global" flag check, while the sget_fc() did not. > > Messy. Al? Digging through that mess... It's my fuckup, and we obviously need to restore the old behaviour, but I really hope to manage that with checks _not_ in superblock allocator ;-/