Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3132401pxb; Tue, 19 Jan 2021 14:52:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxd8Tw3RJYFf13TzcwYtP3nl7hfB8svsjHTTYTFyURJAyX2iElHyqjc8H6R73u9WpjARyWX X-Received: by 2002:a17:906:e09:: with SMTP id l9mr4477476eji.196.1611096752118; Tue, 19 Jan 2021 14:52:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611096752; cv=none; d=google.com; s=arc-20160816; b=WR5TkqMMU0MOyEOt2UrL/Fg9ZBYeWo4CFx56KtZQV+6LmlyGajWmVWgqhF89xKSnIk GnVv/GeFDq9kP/+OWZAsmREcqe1Qxg21p30g4mF1Qxpi/1OdKa+xKOUe/5i11FG3p5tv TX4Jtr5cmj33zBqN3TwfjoSW49zTSdu9Gn/0IoInJqjpVoj9RlJwRC/jOzTPBgHjTc+x +vgJcURuIy3DsEG4npgZlqeIERmRfv/R0BAT1A1FJ7jeK63BSWzxsQvrlwaGZnLU5/Mm SW6Ba6YcfklqhWjjPslUJMdPVyr5hGRUluo1Lb56ZptRzmI1oEmN12CAxxEnOF4oFmeM aBBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=scH8YVE1TB4OFwEW8FVKBzYlkag0wqmCJNKtr/ct77w=; b=KCAd96XemwXZCX/Z8WTZA5qe1pcxu+/FOcb5fqvZ5iOXEQTSuqGdxNanMA61CGz1Nk CGywHrHot+KJvkIdXT/vbgzhdmjWRF4Zoqy/yV22afUZOPDIO5bMRLeIb0b9Td07fUl6 sQoaHjBh5jN1gCChcMx/qqX/ekKFcN6soJfHZvVw3JRujwE7aSmc7Or7/XiR6gocUpHY CFLIHqE6cPqcOzJOPTLrUJ+OyAKDL3mtxK7xDpjNPrQoyg/VbizAhcHkdnRVN2pKqN5U exZjPt+2cAa/y/+4WRdJbVtJ+jG1yCKaCvRNx3O92AE++iNZT5V3A0RpLManWOAd2Y9k ug6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PEFEq57x; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l26si30454ejc.315.2021.01.19.14.52.08; Tue, 19 Jan 2021 14:52:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PEFEq57x; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404859AbhASO3b (ORCPT + 99 others); Tue, 19 Jan 2021 09:29:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387545AbhASJdU (ORCPT ); Tue, 19 Jan 2021 04:33:20 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F16AFC061573; Tue, 19 Jan 2021 01:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=scH8YVE1TB4OFwEW8FVKBzYlkag0wqmCJNKtr/ct77w=; b=PEFEq57x/HI6QbtM+vzQvXCZL3 vDLh4pq2ZJOI+5gq/0X3p4r8fc9gCEAIQVWn+RkMEuORq4dJMELH6mM0jNFudmHlNxglJMnSNW5dm WT0MMLf0VraTYVP0uerf/sEF1H6as8KhpMN4z8ik8pqaADaGHf7+GtrShVBumfZrBatu5DefgkuNv +2bv+kKrnNcjry7GfUcHioylfnRmbHyOcAW3vYzFUw496FqnF+I4gW4JHBf5Gzk/WdKhuzxT2WAuG wYFdPz5j2qd7B9uuUr4DN8z+yVmk72n4GvrUYNkjnoinE0bZBGiPkNE1RIlKWbwkphNHFgdP7UkR4 JhPKBVRA==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l1nN8-00E7Sv-8a; Tue, 19 Jan 2021 09:32:28 +0000 Date: Tue, 19 Jan 2021 09:32:22 +0000 From: Christoph Hellwig To: Christian Brauner Cc: Alexander Viro , Christoph Hellwig , linux-fsdevel@vger.kernel.org, John Johansen , James Morris , Mimi Zohar , Dmitry Kasatkin , Stephen Smalley , Casey Schaufler , Arnd Bergmann , Andreas Dilger , OGAWA Hirofumi , Geoffrey Thomas , Mrunal Patel , Josh Triplett , Andy Lutomirski , Theodore Tso , Alban Crequy , Tycho Andersen , David Howells , James Bottomley , Seth Forshee , St??phane Graber , Linus Torvalds , Aleksa Sarai , Lennart Poettering , "Eric W. Biederman" , smbarber@chromium.org, Phil Estes , Serge Hallyn , Kees Cook , Todd Kjos , Paul Moore , Jonathan Corbet , containers@lists.linux-foundation.org, linux-security-module@vger.kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v5 18/42] stat: handle idmapped mounts Message-ID: <20210119093222.GC3364550@infradead.org> References: <20210112220124.837960-1-christian.brauner@ubuntu.com> <20210112220124.837960-19-christian.brauner@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210112220124.837960-19-christian.brauner@ubuntu.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Jan 12, 2021 at 11:01:00PM +0100, Christian Brauner wrote: > The generic_fillattr() helper fills in the basic attributes associated > with an inode. Enable it to handle idmapped mounts. If the inode is > accessed through an idmapped mount we need to map it according to the > mount's user namespace before we store the uid and gid. > If the initial user namespace is passed nothing changes so non-idmapped > mounts will see identical behavior as before. Looks good, Reviewed-by: Christoph Hellwig