From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbdBUC5n (ORCPT ); Mon, 20 Feb 2017 21:57:43 -0500 Received: from mail05-md.ns.itscom.net ([175.177.155.115]:58901 "EHLO mail05-md.ns.itscom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbdBUC5l (ORCPT ); Mon, 20 Feb 2017 21:57:41 -0500 From: "J. R. Okajima" Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount To: James Bottomley Cc: Djalal Harouni , Chris Mason , Theodore Tso , Josh Triplett , "Eric W. Biederman" , Andy Lutomirski , Seth Forshee , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Dongsu Park , David Herrmann , Miklos Szeredi , Alban Crequy , Al Viro , "Serge E. Hallyn" , Phil Estes In-Reply-To: <1487638135.2337.51.camel@HansenPartnership.com> References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <4608.1486351540@jrobl> <1486363583.2496.63.camel@HansenPartnership.com> <23764.1486398277@jrobl> <1487638135.2337.51.camel@HansenPartnership.com> Date: Tue, 21 Feb 2017 11:57:27 +0900 Message-ID: <25645.1487645847@jrobl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org James Bottomley: > I realised as I was trimming down the vestigial inode properties in the > patch that actually shiftfs does use the i_ino from the underlying for > userspace. The reason why is that it comes from the getattr call in > stat and that's fully what the underlying filesystem returns (including > the inode number). Let me make sure. - shiftfs has its own inode, but it will never be visible to userspace. - the inode attr visible to users are equivalent to the underlying one, includeing dev:ino pair. right? If so, I am afraid it will make users confused. The dev:ino pair is a system-wide identity, but shiftfs creates the same dev:ino pair with different owner. Though I don't know whether the actual application or LSM exists or not who will be damaged by this situation. For git-status case which I wrote previously, it might not be a problem as long as dev:ino is unchanged from git index. But such filesystem looks weird. J. R. Okajima