Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp726371pxb; Thu, 21 Jan 2021 19:32:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwthx7mPBaqbpT9GUX/XYCMgh1/NRetRbwqvSGcLPafeW4vH6XaVxBXgtaqeSUt5A02I7xT X-Received: by 2002:a17:906:d295:: with SMTP id ay21mr1678546ejb.400.1611286349542; Thu, 21 Jan 2021 19:32:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611286349; cv=none; d=google.com; s=arc-20160816; b=VLi6Xmk5KS/xPH/Mg+D9EOY9bQm1dEGIzuXqmRa4fAQYCXtrN33yxbWMQ6BFkincti VesTBPIcz2urQLbuGailSmChBNxR0ca6twW8w0DXRNoVAd4DKLGrHD25LtW9ma91rNnR WPJkHcToxBqUI/Nuan5MNbw5CRPVppoJDvlwRJRCN6B1Re/ukGUeR44MaSXNIs3c9cwp 97huhmP0ZoJCxgGpRCbwNR8jUnUFfskqhMdZiin6ukrWcZOpoXSkNdzkqeGlb1STLWeF llwuZAAwwN7R9r45sbUMR8ydylnQfoh0H4KvQzRfw0JH2c7IILvPvrN2RyISHG018Etl FWVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=1xEkUOVnCfGsJr8ZA/hpgVaBxdKm8EWu3/eHQhZXQaM=; b=sWO8d7JhmMo/IjsksBM12WMjn+nlE3hnqSorjZrnDXuAFn1349ifnzZJKoK/qWK4MZ WB1FGspKKvh1XSZZ+DDmIjmz3bCTo9ezwT87r/d3M7x5DLfUWreYXKcEtuBPnlXA+NMP TqMLVV9kNO0tD8wejcdQrzmC2523bPfqUVee51PWdLuRbKhlMW2jHd37EuAWmyeU3Jez LLBPMNhKmSZ+hWlijtZ1teI0A5qdw1SpNmxrLkP/P1WiCVZRLyzckYYrLX7mYh/NUw6h kGHzTR6BbK4Tm8Os8BbtTgETKp3NBV6RZFDzye/nmahrcecWE95WgFi2lF8DcT6fw7I3 cOLQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v1si2558284ejj.430.2021.01.21.19.32.06; Thu, 21 Jan 2021 19:32:29 -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; 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 S1726472AbhAVDa2 (ORCPT + 99 others); Thu, 21 Jan 2021 22:30:28 -0500 Received: from namei.org ([65.99.196.166]:52706 "EHLO mail.namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbhAVDaS (ORCPT ); Thu, 21 Jan 2021 22:30:18 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.namei.org (Postfix) with ESMTPS id 3328849C; Fri, 22 Jan 2021 03:28:46 +0000 (UTC) Date: Fri, 22 Jan 2021 14:28:46 +1100 (AEDT) From: James Morris To: Christian Brauner cc: Alexander Viro , Christoph Hellwig , linux-fsdevel@vger.kernel.org, John Johansen , 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 , =?ISO-8859-15?Q?St=E9phane_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 Subject: Re: [PATCH v6 11/40] stat: handle idmapped mounts In-Reply-To: <20210121131959.646623-12-christian.brauner@ubuntu.com> Message-ID: <841ffb88-b1a6-2497-a68a-f89ad903dd8@namei.org> References: <20210121131959.646623-1-christian.brauner@ubuntu.com> <20210121131959.646623-12-christian.brauner@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, 21 Jan 2021, 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 map it into 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. > > Link: https://lore.kernel.org/r/20210112220124.837960-19-christian.brauner@ubuntu.com > Cc: Christoph Hellwig > Cc: David Howells > Cc: Al Viro > Cc: linux-fsdevel@vger.kernel.org > Reviewed-by: Christoph Hellwig > Signed-off-by: Christian Brauner Reviewed-by: James Morris -- James Morris