Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3880850ybv; Sun, 16 Feb 2020 08:03:35 -0800 (PST) X-Google-Smtp-Source: APXvYqynHXGeCV+UlyDWPcQCr8vyFIajzCUC8RKKw8KwYR5eajFUcXyFjo73hW2f9hvg/ARlywk5 X-Received: by 2002:a05:6808:618:: with SMTP id y24mr7334561oih.86.1581869015420; Sun, 16 Feb 2020 08:03:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581869015; cv=none; d=google.com; s=arc-20160816; b=WTuLPREkwOr4P2qcvqvmgQR+8JJ0fI8rzFMHQVUqZu6dSDIct1gTEx7YoQkRH7gfyb DQ8wXlh6k7Sh/MQSKoPzPD2sAazrLitPHhnIFYaWXVGR7KkE6b2Cf+hpn3FzO2GZ6eit UmByZVQ28PyOgHaX1z15c7lfl3HkmgbLI0TQ8nndhZLXwTsSZgPLEmwiHjyQoCFXMZTe oLKTZS7Jz5buAWwtLlRcS+ZPkrdJdKDaYQw0rjC/nhXobRFRGVQ8SrR8aBZVL6sw4PZK PX1zy3fl72yHdM+1Vdf1uKjFRkaMNKew1bCuwgeL1AUZcNYLFa2YaDeVApNuVGgLSb+d cV/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=OZoBIIefL2bz4N0NlZynTAJmV85oAX+MwiG+50YvOSY=; b=e1JN+aH910ZrO+Q849xwcv+BImAy20gTsnPPvUhRU4OM+2iFl2OZxTPfItUm7cNyzR yT6Bh39/9q2xzZkQzjalESl/fDpsgUPBycASie+KSDujSH50yN3BXDKq0s5/mH5IxNb/ Wed9ptGNyqnch84uRCE8GOpsBlU47VTC2ZR797TOOxNfmLuBEHiMhb9z9IrGAU+pUZO9 T0+Rw80qy3VKrggovHk+dv9+OkIOaYAoALKboOkE9clUpIFnxiGUJu1bQGkad+VKPGwI BkPB7+qmldK/H0enlDRSZ8OT099W/i2lGi1ErCnuh+HX7nrvRcVpW0uHwVv4lkL7lOUn i8ww== 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 d2si5947307oth.267.2020.02.16.08.03.23; Sun, 16 Feb 2020 08:03:35 -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 S1728416AbgBPQDQ (ORCPT + 99 others); Sun, 16 Feb 2020 11:03:16 -0500 Received: from albireo.enyo.de ([37.24.231.21]:41926 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbgBPQDP (ORCPT ); Sun, 16 Feb 2020 11:03:15 -0500 X-Greylist: delayed 325 seconds by postgrey-1.27 at vger.kernel.org; Sun, 16 Feb 2020 11:03:14 EST Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1j3MID-0006zV-7T; Sun, 16 Feb 2020 15:57:13 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1j3MGr-0001RD-Ge; Sun, 16 Feb 2020 16:55:49 +0100 From: Florian Weimer To: Christian Brauner Cc: =?iso-8859-1?Q?St=E9phane?= Graber , "Eric W. Biederman" , Aleksa Sarai , Jann Horn , smbarber@chromium.org, Seth Forshee , Alexander Viro , Alexey Dobriyan , Serge Hallyn , James Morris , Kees Cook , Jonathan Corbet , Phil Estes , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, containers@lists.linux-foundation.org, linux-security-module@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v2 00/28] user_namespace: introduce fsid mappings References: <20200214183554.1133805-1-christian.brauner@ubuntu.com> Date: Sun, 16 Feb 2020 16:55:49 +0100 In-Reply-To: <20200214183554.1133805-1-christian.brauner@ubuntu.com> (Christian Brauner's message of "Fri, 14 Feb 2020 19:35:26 +0100") Message-ID: <87pneesf0a.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Christian Brauner: > With fsid mappings we can solve this by writing an id mapping of 0 > 100000 100000 and an fsid mapping of 0 300000 100000. On filesystem > access the kernel will now lookup the mapping for 300000 in the fsid > mapping tables of the user namespace. And since such a mapping exists, > the corresponding files will have correct ownership. I'm worried that this is a bit of a management nightmare because the data about the mapping does not live within the file system (it's externally determined, static, but crucial to the interpretation of file system content). I expect that many organizations have centralized allocation of user IDs, but centralized allocation of the static mapping does not appear feasible. Have you considered a more complex design, where untranslated nested user IDs are store in a file attribute (or something like that)? This way, any existing user ID infrastructure can be carried over largely unchanged.