From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Morris Subject: Re: [PATCH 2/2] VFS: Reorder vfs_getxattr to avoid unnecessary calls to the LSM Date: Wed, 24 Oct 2007 09:42:02 +1000 (EST) Message-ID: References: <1193079974.30930.2.camel@moss-terrapins.epoch.ncsc.mil> <1193080313.30930.8.camel@moss-terrapins.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, sds@tycho.nsa.gov To: "David P. Quigley" Return-path: Received: from namei.org ([69.55.235.186]:51515 "EHLO us.intercode.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752902AbXJWXmG (ORCPT ); Tue, 23 Oct 2007 19:42:06 -0400 In-Reply-To: <1193080313.30930.8.camel@moss-terrapins.epoch.ncsc.mil> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, 22 Oct 2007, David P. Quigley wrote: > Originally vfs_getxattr would pull the security xattr variable using > the inode getxattr handle and then proceed to clobber it with a subsequent call > to the LSM. This patch reorders the two operations such that when the xattr > requested is in the security namespace it first attempts to grab the value from > the LSM directly. If it fails to obtain the value because there is no module > present or the module does not support the operation it will fall back to using > the inode getxattr operation. In the event that both are inaccessible it > returns EOPNOTSUPP. > > Signed-off-by: David P. Quigley Acked-by: James Morris -- James Morris