From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 4926EC433E0 for ; Fri, 15 Jan 2021 17:52:13 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ACA8F221FA for ; Fri, 15 Jan 2021 17:52:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACA8F221FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=containers-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 56ACC87397; Fri, 15 Jan 2021 17:52:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xMeOKkmcHcOg; Fri, 15 Jan 2021 17:52:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id B09C88737C; Fri, 15 Jan 2021 17:52:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A189CC088B; Fri, 15 Jan 2021 17:52:11 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 550C3C013A for ; Fri, 15 Jan 2021 17:52:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3EEC686D29 for ; Fri, 15 Jan 2021 17:52:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x9p8ZGhatRiQ for ; Fri, 15 Jan 2021 17:52:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6FDCF86D21 for ; Fri, 15 Jan 2021 17:52:09 +0000 (UTC) Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 10FHpKnV022119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Jan 2021 12:51:21 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3494715C399F; Fri, 15 Jan 2021 12:51:20 -0500 (EST) Date: Fri, 15 Jan 2021 12:51:20 -0500 From: "Theodore Ts'o" To: Christoph Hellwig Subject: Re: [PATCH v5 00/42] idmapped mounts Message-ID: References: <20210112220124.837960-1-christian.brauner@ubuntu.com> <20210114171241.GA1164240@magnolia> <20210114204334.GK331610@dread.disaster.area> <20210115162423.GB2179337@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210115162423.GB2179337@infradead.org> Cc: Lennart Poettering , "Darrick J. Wong" , Dave Chinner , Mimi Zohar , James Bottomley , Andreas Dilger , containers@lists.linux-foundation.org, Tycho Andersen , Paul Moore , Jonathan Corbet , smbarber@chromium.org, linux-ext4@vger.kernel.org, Mrunal Patel , Kees Cook , Arnd Bergmann , selinux@vger.kernel.org, Josh Triplett , linux-fsdevel@vger.kernel.org, Aleksa Sarai , Alexander Viro , Andy Lutomirski , OGAWA Hirofumi , Geoffrey Thomas , David Howells , John Johansen , Seth Forshee , Dmitry Kasatkin , Stephen Smalley , linux-xfs@vger.kernel.org, linux-security-module@vger.kernel.org, "Eric W. Biederman" , linux-api@vger.kernel.org, Casey Schaufler , Alban Crequy , linux-integrity@vger.kernel.org, Linus Torvalds , Todd Kjos X-BeenThere: containers@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux Containers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: containers-bounces@lists.linux-foundation.org Sender: "Containers" On Fri, Jan 15, 2021 at 04:24:23PM +0000, Christoph Hellwig wrote: > > That is what the capabilities are designed for and we already check > for them. So perhaps I'm confused, but my understanding is that in the containers world, capabilities are a lot more complicated. There is: 1) The initial namespace capability set 2) The container's user-namespace capability set 3) The namespace in which the file system is mounted --- which is "usually, but not necessarily the initial namespace" and presumably could potentially not necessarily be the current container's user name space, is namespaces can be hierarchically arranged. Is that correct? If so, how does this patch set change things (if any), and and how does this interact with quota administration operations? On a related note, ext4 specifies a "reserved user" or "reserved group" which can access the reserved blocks. If we have a file system which is mounted in a namespace running a container which is running RHEL or SLES, and in that container, we have a file system mounted (so it was not mounted in the initial namespace), with id-mapping --- and then there is a further sub-container created with its own user sub-namespace further mapping uids/gids --- will the right thing happen? For that matter, how *is* the "right thing" defined? Sorry if this is a potentially stupid question, but I find user namespaces and id and capability mapping to be hopefully confusing for my tiny brain. :-) - Ted _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/containers