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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 602DCC7619A for ; Wed, 5 Apr 2023 13:11:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C31716B0071; Wed, 5 Apr 2023 09:11:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE1686B0072; Wed, 5 Apr 2023 09:11:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA8D86B0074; Wed, 5 Apr 2023 09:11:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 971366B0071 for ; Wed, 5 Apr 2023 09:11:32 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 5364E1C69EE for ; Wed, 5 Apr 2023 13:11:32 +0000 (UTC) X-FDA: 80647374024.13.276F84A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf04.hostedemail.com (Postfix) with ESMTP id 7ACE14001D for ; Wed, 5 Apr 2023 13:11:29 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ikevyq1C; spf=pass (imf04.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680700289; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FWwTtPIcfJTU7jQldRnWh7atYsik6ZmL9u9bMMQZfNk=; b=gPdstOiqcb67I8zMspO7yJqwSk58xgQvewE6o/P8VR4MQ1kMZ5cJirEMLZ8vmd//q0avKh dd5aSHMea77+OboN5qCAlXcMoqP0BZKWU7TMjMzWv1jSp7/97QYtfj59eR4p0x6SEO2LbO sNIGAFVaZhVJ0KjJEPAfhd0Bf+OxKYA= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ikevyq1C; spf=pass (imf04.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680700289; a=rsa-sha256; cv=none; b=QoYjRlanLS4hOpd5ibuvDQa0B69qjhC03CXvLIop4ROkNAVOmuropo5vGrShwBcnrQPDGT WT/1qf3GjWCFT/obEu/likr1+Xm5N9uoZNyzvjDuwbpzWxctnwNpCy9DOzVDPJs2SZZk76 q52azYwKlx4/KEvUl7SPyOhugjneGrM= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7E71A628E1; Wed, 5 Apr 2023 13:11:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3028CC433D2; Wed, 5 Apr 2023 13:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680700287; bh=7FfDTxJvbOVviT3J6yLlgvJZC9NZNe/AGg0tWqZF8Hg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ikevyq1CULjkmoZ+S55Qk/+H1NM+SIqJrHMFbTE33+yGbBgwK83QWtb0mSI2fZTYY CUEc5qynWg57PYlBw5c+0WEZI6k+yj3BGwSdhal0v0fKoLQJvx5gj+R7jHNaFyj1Ic ug6qD2ztCBn62WD01iRFgz5ANMhkpv3JZrF85ozzJylO9IAZtVa5RcOc0tcvdj/M6v W1hrRbXtEOsfH6IGwvRVoBVm3F9nrs9nwclhuincajjRt+PGRrd+WveqD71bHoSHbd X/AI3VjRAa95yux7Adi7j1iFRZozmMYil2GvW7E6LdAr4Ckj+V5vFdTUfsS7n6+qh9 lMTOQYcRzyxMg== Date: Wed, 5 Apr 2023 15:11:22 +0200 From: Christian Brauner To: Carlos Maiolino Cc: hughd@google.com, jack@suse.cz, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, djwong@kernel.org Subject: Re: [PATCH 0/6] shmem: Add user and group quota support for tmpfs Message-ID: <20230405-hebamme-anonym-d41aa62ffea6@brauner> References: <20230403084759.884681-1-cem@kernel.org> <20230405-klarkommen-zellkern-03af0950b80f@brauner> <20230405104427.rndb5skuubfhucpv@andromeda> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230405104427.rndb5skuubfhucpv@andromeda> X-Rspamd-Queue-Id: 7ACE14001D X-Stat-Signature: woit8d3cfrkotm7uf3k1koo9w451ffed X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1680700289-434074 X-HE-Meta: U2FsdGVkX1+svW6dwIq/u6CGQzghjEfJuleqNz7FXk8hR/4T9JbFxd7GO2VluinIJfDr0Za7wIZsG2ffo83KVXB78LIVxdrKrrqy22eTZoa/iVpnasKoZkFarqxVwA7WowQEHmk9gV9uOS2IWLSYBtdQ2yX90I7gYYkpBql8ozE79qszsGK98WYJ3dCEH3EgXYVa8T+sDIwPCHEVUGe6OtMWfSnQm1nseleN3SGk0wCSugDy5tAErOJzv+qDfoMXmoHx24ICmLLx8H3ciN0dvOmWO+4JxPdI0bzU0Pputmmhg+reuquEPJVwPm9Yd/vBJ9CW8KVTPZXXj1BT4HewDr4LDW6U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ux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 05, 2023 at 12:44:27PM +0200, Carlos Maiolino wrote: > Hi Christian. > > On Wed, Apr 05, 2023 at 10:52:44AM +0200, Christian Brauner wrote: > > On Mon, Apr 03, 2023 at 10:47:53AM +0200, cem@kernel.org wrote: > > > From: Carlos Maiolino > > > > > > Hi folks. this work has been done originally by Lukas, but he left the company, > > > so I'm taking over his work from where he left it of. This series is virtually > > > done, and he had updated it with comments from the last version, but, I'm > > > > I've commented on the last version: > > > > https://lore.kernel.org/linux-fsdevel/20221129112133.rrpoywlwdw45k3qa@wittgenstein > > > > trying to point out that tmpfs can be mounted in user namespaces. Which > > means that the quota uids and gids need to take the idmapping of the > > user namespace in which the tmpfs instances is mounted in into account; > > not the one on the host. > > > > See the link above for some details. Before we can merge this it would > > be very good if we could get tests that verify tmpfs being mounted > > inside a userns with quotas enabled because I don't think this is > > covered yet by xfstests. Or you punt on it for now and restricted quotas > > to tmpfs instances mounted on the host. > > > > Thanks for the link, I've read it before, and this is by now a limitation I'd > like to keep in this series. I can extend it to be namespace aware later on, but > the current goal of this series is to be able tmpfs mounts on the host to limit > the amount of memory consumed by users. Being namespace aware is something I This is fine with me. But please point the restriction out in the documentation and in the commit message. This is especially important because the check is hidden in the bowls of dquot_load_quota_sb(). Ideally we'd probably check for fc->user_ns == &init_user_ns directly when parsing the quota mount options instead of waiting until fill_super.