From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 2/2] LSM/SELinux: inode_{get,set}secctx hooks to access LSM security context information. Date: Thu, 6 Mar 2008 08:54:44 -0500 Message-ID: <20080306135444.GA5216@infradead.org> References: <1204743288-3461-1-git-send-email-dpquigl@tycho.nsa.gov> <1204743288-3461-3-git-send-email-dpquigl@tycho.nsa.gov> <20080306123013.GB4648@lst.de> <1204811422.1397.205.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , "David P. Quigley" , casey@schaufler-ca.com, chrisw@sous-sol.org, jmorris@namei.org, viro@zeniv.linux.org.uk, selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Stephen Smalley Return-path: Content-Disposition: inline In-Reply-To: <1204811422.1397.205.camel@moss-spartans.epoch.ncsc.mil> Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Mar 06, 2008 at 08:50:22AM -0500, Stephen Smalley wrote: > In-core only: NFS client gets the file security context for an inode > from the server and needs to set the in-core security context for its > inode accordingly. But it does not want to call back to i_op->setxattr > and try to _set_ the context on the server when it does this. So it > only calls with the incore flag. > > On-disk: NFS server receives a file security context to set on a file > from the client, and wants to update both the in-core security context > for the inode and the on-disk xattr. So it calls with the ondisk flag. > > It actually only requires a boolean flag. Yes, the boolean might be better. I still don't quite understand why we would only set the security context in-core only as this looks like a potential loss of metadata updates for me.