From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Mahoney Subject: Re: [RFC][PATCH] Generic fallback for security xattrs Date: Fri, 19 Aug 2005 16:41:29 -0400 Message-ID: <430643F9.30903@suse.de> References: <1124474276.32663.134.camel@moss-spartans.epoch.ncsc.mil> <20050819180244.GA5727@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Stephen Smalley , linuxfs , Andreas Gruenbacher , Darrel Goeddel , James Morris , Chris Wright , Alexander Viro Return-path: Received: from locomotive.csh.rit.edu ([129.21.60.149]:28683 "EHLO locomotive.unixthugs.org") by vger.kernel.org with ESMTP id S932713AbVHSUlf (ORCPT ); Fri, 19 Aug 2005 16:41:35 -0400 To: Christoph Hellwig In-Reply-To: <20050819180244.GA5727@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Christoph Hellwig wrote: > Very nice, and gets rid of lots of crap. Now that we started parsing > the attribute name in generic code we should deprecate the old > ->{get,set,list,remove}xattr inode operations and make the helpers > James added a while ago mandatory for the future. I'd be fine with making the generic xattr routines the default with a few exceptions: 1) Pass the entire name of the xattr (including prefix) to the underlying filesystem. ReiserFS needs the entire name, including the prefix, to look up an xattr. Reconstructing the name again, when it was available in the caller, is wasteful. Once the determination of the prefix is made, the filesystem code can just skip the prefix length anyway if it doesn't need it. 2) Keep i_op->listxattr. For xattrs like system.posix_acl_access, sure, it makes sense. But when selinux or user xattrs are introduced, the name and number of such xattrs will be unknown to a generic routine. I have a series of patches for reiserfs xattrs that I'm still working the kinks out of, mainly performance-wise. With the patch set applied, reiserfs_{set,get,remove}xattr look identical to the generic versions, except that find_xattr_handler_prefix doesn't modify the name. -Jeff -- Jeff Mahoney SuSE Labs