From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267370AbUHXCxF (ORCPT ); Mon, 23 Aug 2004 22:53:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268277AbUHXCxF (ORCPT ); Mon, 23 Aug 2004 22:53:05 -0400 Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:39066 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S267370AbUHXCxA (ORCPT ); Mon, 23 Aug 2004 22:53:00 -0400 Date: Tue, 24 Aug 2004 03:52:59 +0100 From: viro@parcelfarce.linux.theplanet.co.uk To: James Morris Cc: Stephen Smalley , Christoph Hellwig , Andrew Morton , lkml , Chris Wright Subject: Re: [PATCH][2/7] xattr consolidation - LSM hook changes Message-ID: <20040824025259.GC21964@parcelfarce.linux.theplanet.co.uk> References: <1093288398.27211.257.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 23, 2004 at 08:54:14PM -0400, James Morris wrote: > On Mon, 23 Aug 2004, Stephen Smalley wrote: > > > On Mon, 2004-08-23 at 15:03, Christoph Hellwig wrote: > > > > Given that the actual methods take a dentry this sounds like a bad design. > > > Can;t you just pass down the dentry through all of the ext2 interfaces? > > > > Changing the methods to take an inode would be even better, IMHO, as the > > dentry is unnecessary. That would simplify SELinux as well. > > This could work for all in-tree filesystems with xattrs, except CIFS, > which passes the dentry to it's own build_path_from_dentry() function. > > (In this case, they probably want to use d_path() and have a vfsmnt added > to the methods?). No. Think for a second and you'll see why - we are doing an operation that by definition should not depend on where we have mounted the filesystem in question.